SwitchGain is a Python-based algorithmic trading project that explores Momentum Trading and Mean Reversion strategies. The project leverages data science techniques to generate automated buy/sell signals and evaluates their performance using key financial metrics.
- Two Trading Strategies:
- Momentum Trading: Uses RSI and short-term price changes to identify trends.
- Mean Reversion: Applies Bollinger Bands and Z-Score to detect overbought/oversold conditions.
- Automated Data Pipeline: Fetches historical AAPL data from Yahoo Finance (yfinance).
- Interactive Visualizations: Plotly-based charts for strategy analysis.
- Performance Metrics: Evaluates strategy effectiveness in different market conditions.
git clone https://github.com/albinjm/SwitchGain.git
cd SwitchGain | Strategy | Key Indicators | Signal Condition |
|---|---|---|
| Momentum | RSI, 5-day % change | Buy: Momentum_5D > 0 & RSI (30-70) |
| Mean Reversion | Z-Score, Bollinger Bands | Buy: Price < Lower Band (Z < -1.5) |
- Momentum performs best in trending markets (e.g., sustained bullish runs).
- Mean Reversion excels in ranging markets (e.g., price bouncing between bands).
- Combining both strategies could improve adaptability.
Pull requests are welcome! For major changes, open an issue first.
MIT Β© 2025 Albin James Maliakal
π Relevant Links
SwitchGain β Trade smart, not hard! π