A Python-based backtesting framework that uses SMA crossovers with an arbitrary number of SMA indicators of the user's choice
- Only go long if all faster SMA indicators (with shorter lookback windows) are strictly higher in value than all slower SMAs (with larger lookback windows)
- Only go short if all faster SMAs are strictly lower than all slower SMAs
- Otherwise take a hold position
- Real market data downloaded from Yahoo Finance of the ticker and timeframe of the user's choice
- Building SMA indicators with the SMA windows of the user's choice
- Trading strategy logic
- Evaluation using performance metrics like profit factor, Sharpe ratio, etc.
- Plotting of strategy returns against benchmark returns
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python main.py