Downloads · 30 days
0
AcyLa/multi-asset-predictive-model
multi-asset-predictive-model is a machine learning model from AcyLa. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Ensemble ML pipeline (LightGBM + LSTM with attention) covering 14 ETFs, commodities, and international market assets.
Downloads · 30 days
0
Access
Public
Updated Sep 12, 2026
Repo size
58.4 MB
Likes
0
Public
Click a slice to open those files.
.pt54.2 MB · 93%
From the Hugging Face model README
Ensemble ML pipeline (LightGBM + LSTM with attention) covering 14 ETFs, commodities, and international market assets.
Trained on 15+ years of Yahoo Finance historical data with 202+ engineered features per asset, including Nadaraya-Watson envelope estimation and multi-window Bollinger Band systems.
| Ticker | Name | Bars | Date Range |
|---|---|---|---|
| QQQ | Invesco QQQ (Nasdaq 100) | 6,920 | 1999–2026 |
| SPY | SPDR S&P 500 ETF | 8,462 | 1993–2026 |
| GLD | SPDR Gold Shares | 5,487 | 2004–2026 |
| SLV | iShares Silver Trust | 5,125 | 2006–2026 |
| USO | US Oil Fund (Crude Oil) | 5,138 | 2006–2026 |
| Ticker | Name | Market | Bars |
|---|---|---|---|
| EEM | iShares Emerging Markets | Emerging Markets | 5,891 |
| EFA | iShares MSCI EAFE | Developed non-US | 6,297 |
| EWJ | iShares MSCI Japan | Japan | 7,671 |
| EWG | iShares MSCI Germany | Germany | 7,671 |
| EWU | iShares MSCI United Kingdom | UK | 7,671 |
| FXI | iShares China Large-Cap | China | 5,516 |
| INDA | iShares MSCI India | India | 3,672 |
| EWZ | iShares MSCI Brazil | Brazil | 6,579 |
| KWEB | KraneShares China Internet | China Internet | 3,298 |
Data Download (Yahoo Finance) → Feature Engineering (202+ indicators) → Label Generation (multi-horizon) → LightGBM + LSTM Ensemble → Prediction API
close[t+h] / close[t] - 1| Asset | 1d Dir.Acc | 5d Dir.Acc | 21d Dir.Acc | Best Sharpe |
|---|---|---|---|---|
| SPY | 56.8% | 62.5% | 72.0% | 7.23 |
| QQQ | 54.3% | 59.4% | 68.7% | 6.25 |
| EFA | 52.7% | 57.7% | 67.9% | 5.93 |
| EWU | 53.2% | 59.2% | 67.5% | 6.80 |
| EWJ | 49.9% | 51.1% | 69.4% | 5.60 |
| EEM | 46.5% | 57.3% | 64.1% | 5.74 |
| EWG | 54.2% | 54.7% | 52.3% | 2.34 |
| EWZ | 49.6% | 55.5% | 55.7% | 1.98 |
| FXI | 51.1% | 53.0% | 53.5% | 3.45 |
| USO | 46.0% | 48.8% | 50.6% | 1.44 |
| GLD | 47.8% | 40.6% | 40.4% | -0.19 |
| SLV | 49.4% | 44.4% | 36.8% | -0.13 |
| INDA | 48.5% | 44.2% | 49.5% | 0.22 |
| KWEB | 46.7% | 50.9% | 47.6% | -0.26 |
Key findings:
pip install yfinance pandas numpy scikit-learn lightgbm ta torch pyarrow joblib scipy huggingface_hub
python predict.py --ticker QQQ
# Output:
# QQQ — Invesco QQQ (Nasdaq 100)
# Consensus: BUY (1/3)
# h= 1d: HOLD conf=50% pred=-0.0077
# h= 5d: HOLD conf=50% pred=+0.0042
# h=21d: BUY conf=65% pred=+0.0130
python predict.py --all
# Output:
# QQQ: BUY (1/3)
# SPY: HOLD (3/3)
# GLD: HOLD (3/3)
# ...
python predict.py --ticker SPY --no-lstm
from predict import AssetPredictor
predictor = AssetPredictor("QQQ")
results = predictor.get_multi_horizon()
print(results['consensus']) # "BUY (2/3)"
for h in [1, 5, 21]:
print(f"{h}d: {results[h]['signal']} conf={results[h]['confidence']:.0%}")
# Single asset
python train.py --ticker QQQ
# All assets
python train.py --all
# With walk-forward backtest
python train.py --all --backtest
# LightGBM only (faster)
python train.py --all --no-lstm
multi_asset_predictor/
├── config.py # All hyperparameters (assets, features, model params)
├── data_loader.py # Yahoo Finance download with parquet caching
├── nadaraya_watson.py # Vectorized NW envelope estimator
├── features.py # 202+ feature engineering (NW, BB, trend, momentum, etc.)
├── labels.py # Multi-horizon regression + classification + triple-barrier
├── models.py # LightGBMPredictor + LSTMPredictor + EnsemblePredictor
├── backtest.py # Walk-forward CV with purging (López de Prado)
├── train.py # CLI training pipeline
├── batch_train.py # Batch LightGBM training for all assets
├── batch_train_lstm.py # Batch LSTM training for all assets
├── predict.py # Prediction API + CLI
├── asset_models/ # Trained models (per-ticker subdirectories)
│ ├── QQQ/
│ │ ├── lgbm_h1.joblib # LightGBM model (1-day horizon)
│ │ ├── lgbm_h5.joblib # LightGBM model (5-day horizon)
│ │ ├── lgbm_h21.joblib # LightGBM model (21-day horizon)
│ │ ├── lstm_h1.pt # LSTM model (1-day horizon)
│ │ ├── lstm_h5.pt # LSTM model (5-day horizon)
│ │ ├── lstm_h21.pt # LSTM model (21-day horizon)
│ │ ├── weights_h*.joblib # Ensemble weights per horizon
│ │ ├── feature_cols.joblib # Feature column names
│ │ └── meta.json # Asset metadata
│ ├── SPY/ ...
│ └── ... (14 assets total)
└── asset_results/ # Evaluation metrics (JSON per asset)
asset_data_cache/Target_*) are excluded from features. Verified via feature importance check.--backtest flagsliding_window_view for O(n) computation (vs O(n²) naive)yfinance pandas numpy scikit-learn lightgbm ta torch pyarrow joblib scipy huggingface_hub
This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.