Overview:
A lightweight end-to-end BTC pipeline to forecast next-day Bitcoin returns and evaluate a simple trading strategy.
- Python 3.7+
- pandas, numpy
- scikit-learn
- xgboost, lightgbm, catboost
- pysindy
Install dependencies:
pip install -r requirements.txt- Open the Jupyter notebook
main.ipynbin thedocs/directory. - Review the theoretical explanations and code cells for each step.
- Execute all cells sequentially (Shift + Enter) to reproduce the pipeline:
- Data loading & cleaning
- SINDy modeling and feature creation
- Model training, tuning, and ensembling
- Backtesting and trade log generation
- Find outputs in the notebook:
- Plots and metrics displayed inline
trade_log.csvsaved to disk
- Load & clean data : compute returns, moving averages.
- SINDy modeling : extract linear dynamics and create rate features.
- Feature engineering : raw OHLCV, technical indicators, SINDy rates.
- Model training : time-series CV tuning of XGBoost, LightGBM, CatBoost.
- Ensemble & predict : average model outputs, convert to simple returns.
- Backtest : generate signals, apply transaction costs, save trade log.
MIT License