Download config.py from AcyLa/forex-predictive-model: direct link, hf CLI and curl.
- Browser
- Download file 2.17 kB
-
https://huggingface.co/AcyLa/forex-predictive-model/resolve/main/config.py
- Command line
-
hf download hf://AcyLa/forex-predictive-model/config.py
-
curl -L -o config.py https://huggingface.co/AcyLa/forex-predictive-model/resolve/main/config.py
2.17 kB
| """Forex Predictive Model Configuration — tuned for intraday FX.""" | |
| from dataclasses import dataclass, field | |
| from typing import List, Dict | |
| class ForexConfig: | |
| tickers: List[str] = field(default_factory=lambda: [ | |
| "EURUSD=X", "GBPUSD=X", "USDJPY=X", "USDCHF=X", | |
| "AUDUSD=X", "USDCAD=X", "NZDUSD=X", | |
| ]) | |
| primary_ticker: str = "EURUSD=X" | |
| period: str = "max" | |
| interval: str = "1h" | |
| nw_bandwidth: float = 8.0 | |
| nw_lookback: int = 300 | |
| nw_envelope_mult: float = 1.5 | |
| bb_windows: List[int] = field(default_factory=lambda: [20, 50, 100]) | |
| bb_std_mult: List[float] = field(default_factory=lambda: [2.0, 2.5, 3.0]) | |
| rsi_windows: List[int] = field(default_factory=lambda: [7, 14, 21]) | |
| macd_fast: int = 12; macd_slow: int = 26; macd_signal: int = 9 | |
| atr_windows: List[int] = field(default_factory=lambda: [14, 21, 50]) | |
| stoch_windows: List[int] = field(default_factory=lambda: [14, 21]) | |
| ema_windows: List[int] = field(default_factory=lambda: [9, 21, 50, 100, 200]) | |
| sma_windows: List[int] = field(default_factory=lambda: [20, 50, 100, 200]) | |
| horizons: List[int] = field(default_factory=lambda: [1, 4, 8, 24]) | |
| classification_threshold_pips: float = 10.0 | |
| train_window: int = 4380; val_window: int = 720; test_window: int = 480 | |
| step_size: int = 720; purge_gap: int = 24 | |
| lgbm_params: Dict = field(default_factory=lambda: { | |
| "objective": "regression", "metric": "rmse", "boosting_type": "gbdt", | |
| "num_leaves": 127, "learning_rate": 0.01, "feature_fraction": 0.7, | |
| "bagging_fraction": 0.8, "bagging_freq": 5, "verbose": -1, | |
| "min_data_in_leaf": 100, "lambda_l1": 0.1, "lambda_l2": 1.0, | |
| "max_depth": -1, "n_estimators": 500, "early_stopping_rounds": 50, | |
| }) | |
| lstm_seq_len: int = 48; 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 = 15; lstm_patience: int = 10 | |
| ensemble_weights: List[float] = field(default_factory=lambda: [0.6, 0.4]) | |
| model_dir: str = "fx_models"; results_dir: str = "fx_results" | |
| cfg = ForexConfig() | |