This is a professional-grade modular framework for backtesting and live trading of Bitcoin strategies. It supports classical strategies, machine learning models, and real-time Binance integration.
├── setup.py
├── README.md
├── requirements.txt
├── .vscode/
│ └── launch.json
├── Quantlib/
│ ├── __init__.py
│ ├── backtest/
│ │ ├── engine.py
│ │ ├── metrics.py
│ │ └── ...
│ ├── strategies/
│ │ ├── sma_crossover.py
│ │ ├── rsi_reversion.py
│ │ └── ...
│ ├── indicators/
│ │ ├── sma.py
│ │ ├── macd.py
│ │ └── ...
│ └── ...
├── py_example/
│ ├── run_backtest_sma.py
│ ├── Train_XGBoost_and_Backtest.py
│ └── ...
├── notebook_example/
│ ├── 01_train_xgboost.ipynb
│ └── ...
├── data/
│ └── BTCUSDT.csv
Make sure you are using Python >= 3.8. Then run:
cd gptquant_project
# Install dependencies
pip install -r requirements.txt
# Install project as editable module
pip install -e .python py_example/run_backtest_sma.pypython py_example/Train_XGBoost_and_Backtest.pyOpen any notebook in notebook_example/ with Jupyter.
To switch from backtest to live execution:
from Quantlib.execution import TradeExecutor
executor = TradeExecutor(mode="live", broker="binance")- If you get
ModuleNotFoundError, runpip install -e . - In VS Code, use
.vscode/launch.jsonto ensure cwd is set to project root
Set proxy for local to check in code when connecting VPN git config --global http.proxy 'http://127.0.0.1:7890' git config --global https.proxy 'http://127.0.0.1:7890'
unset: git config --global --unset http.proxy git config --global --unset https.proxy