Files
bitcoin-model/btcmodel/models/__init__.py
T

16 lines
548 B
Python
Raw Normal View History

"""
Candidate models.
A model is any object with a `name` and a
`forecast(history: pd.DataFrame, horizons: np.ndarray) -> Forecast` method.
`history` holds every row up to and including the forecast origin and nothing
after it; the harness guarantees that, so models can use all of it freely.
"""
from .baselines import DriftRandomWalk, RandomWalk
from .cycle import CycleModel
# Order is fixed: it sets each model's colour in every chart.
MODELS = {m.name: m for m in (RandomWalk(), DriftRandomWalk(), CycleModel())}
BASELINE = RandomWalk.name