garroshub
Quant_Sector_Rotation_Strategy
Python

A sophisticated quantitative trading strategy leveraging momentum and volatility signals for ETF sector rotation, enhanced with LLM-powered strategy analysis.

Last updated Jul 1, 2026
11
Stars
2
Forks
0
Issues
0
Stars/day
Attention Score
47
Language breakdown
No language data available.
โ–ธ Files click to expand
README

Quant Sector Rotation Strategy ๐Ÿ“ˆ

A sophisticated quantitative trading strategy leveraging momentum and volatility signals for ETF sector rotation, enhanced with LLM-powered strategy analysis.

Python Streamlit License Streamlit App

๐Ÿš€ Try It Now!

Experience the strategy in action: Quant Sector Rotation App

๐Ÿš€ Strategy Overview

This project implements a systematic sector rotation strategy using ETFs, combining momentum signals with intelligent risk management. The strategy employs a unique "Moving Average Energy" indicator for momentum measurement and incorporates VIX-based position sizing.

๐ŸŽฏ Key Features

  • MA Energy Indicator: Proprietary momentum indicator using multiple timeframe moving averages, normalized by price volatility
  • Dynamic Risk Management: VIX-based position sizing with adaptive thresholds
  • LLM Strategy Review: AI-powered performance analysis and strategy behavior insights
  • Interactive Dashboard: Real-time strategy monitoring and backtesting visualization

๐Ÿ“Š Backtest Results (2010-2024)

  • Annual Return: 18.5%
  • Sharpe Ratio: 1.45
  • Information Ratio: 0.82

๐Ÿ› ๏ธ Technical Architecture

  • Signal Generation
- Multi-timeframe MA Energy calculation - Cross-asset momentum comparison - Volatility normalization
  • Risk Management
- VIX-based position sizing - Trailing stop implementation - Maximum drawdown control
  • Strategy Review
- LLM-powered strategy behavior analysis - Historical context integration - Performance attribution

๐Ÿ“ฆ Installation

git clone https://github.com/garroshub/QuantSectorRotation_Strategy.git
cd QuantSectorRotation_Strategy
pip install -r requirements.txt

๐Ÿš€ Quick Start

streamlit run app.py

AI Strategy Review Configuration

The AI strategy review is optional. To enable it, set a Gemini API key in your runtime environment:

export GOOGLEAPIKEY="yourgeminiapikeyhere"

On Windows PowerShell:

$env:GOOGLEAPIKEY="yourgeminiapikeyhere"

Do not commit real API keys to the repository. If no key is configured, the dashboard still runs and the AI review panel reports that the feature is disabled.

๐Ÿ“Š Dashboard Features

  • Strategy Parameters
- MA windows customization - Risk thresholds adjustment - Universe selection
  • Performance Analytics
- Rolling window analysis - Risk metrics visualization - Position history tracking
  • AI Strategy Review
- Strategy behavior analysis - Performance attribution - Improvement suggestions

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ“ง Contact

GitHub: @garroshub

โญ Star History

Star History Chart


Disclaimer: This strategy is for educational purposes only. Past performance does not guarantee future results. Always do your own research and consider your risk tolerance before trading.
๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท garroshub/Quant_Sector_Rotation_Strategy ยท Updated daily from GitHub