Download config.py from AcyLa/crypto-predictive-model: direct link, hf CLI and curl.
- Browser
- Download file 2.25 kB
-
https://huggingface.co/AcyLa/crypto-predictive-model/resolve/main/config.py
- Command line
-
hf download hf://AcyLa/crypto-predictive-model/config.py
-
curl -L -o config.py https://huggingface.co/AcyLa/crypto-predictive-model/resolve/main/config.py
2.25 kB
| """ | |
| Configuration for the Crypto Predictive Model Pipeline. | |
| All hyperparameters in one place for easy tuning. | |
| """ | |
| from dataclasses import dataclass, field | |
| from typing import List, Dict | |
| class Config: | |
| # βββ Data βββ | |
| tickers: List[str] = field(default_factory=lambda: [ | |
| "BTC-USD", "ETH-USD", "BNB-USD", "XRP-USD", | |
| "ADA-USD", "SOL-USD", "DOGE-USD", | |
| ]) | |
| primary_ticker: str = "BTC-USD" | |
| period: str = "max" | |
| interval: str = "1d" | |
| # βββ Feature Engineering βββ | |
| trend_windows: List[int] = field(default_factory=lambda: [7, 14, 21, 50, 100, 200]) | |
| momentum_windows: List[int] = field(default_factory=lambda: [7, 14, 21, 28]) | |
| volatility_windows: List[int] = field(default_factory=lambda: [7, 14, 21, 30, 60]) | |
| volume_windows: List[int] = field(default_factory=lambda: [7, 14, 21, 30]) | |
| # βββ Labels / Targets βββ | |
| horizons: List[int] = field(default_factory=lambda: [1, 3, 7, 14, 30]) | |
| classification_threshold: float = 0.02 | |
| # βββ Walk-Forward Backtest βββ | |
| train_window: int = 1095 | |
| val_window: int = 180 | |
| test_window: int = 90 | |
| step_size: int = 365 | |
| purge_gap: int = 30 | |
| # βββ LightGBM βββ | |
| lgbm_params: Dict = field(default_factory=lambda: { | |
| "objective": "regression", | |
| "metric": "rmse", | |
| "boosting_type": "gbdt", | |
| "num_leaves": 63, | |
| "learning_rate": 0.01, | |
| "feature_fraction": 0.8, | |
| "bagging_fraction": 0.8, | |
| "bagging_freq": 5, | |
| "verbose": -1, | |
| "min_data_in_leaf": 50, | |
| "lambda_l1": 0.1, | |
| "lambda_l2": 0.1, | |
| "max_depth": -1, | |
| "n_estimators": 500, | |
| "early_stopping_rounds": 50, | |
| }) | |
| # βββ LSTM βββ | |
| lstm_seq_len: int = 60 | |
| lstm_hidden_size: int = 128 | |
| lstm_num_layers: int = 2 | |
| lstm_dropout: float = 0.2 | |
| lstm_learning_rate: float = 0.001 | |
| lstm_batch_size: int = 64 | |
| lstm_epochs: int = 25 | |
| lstm_patience: int = 10 | |
| # βββ Ensemble βββ | |
| ensemble_weights: List[float] = field(default_factory=lambda: [0.6, 0.4]) | |
| # βββ Output βββ | |
| model_dir: str = "models" | |
| results_dir: str = "results" | |
| cfg = Config() | |