This project is a fully automated Relative Rotation Graph (RRG) built to track sector rotation in the US equity market using a Python data pipeline and a lightweight web app.
It provides a daily-updated visual of sector strength and momentum, helping identify where capital is flowing — and where it’s going next.
This system automatically:
- Pulls market data (daily)
- Computes Relative Strength (RS) and Momentum
- Builds RRG-compatible data
- Updates JSON data files
- Rebuilds the frontend app
- Deploys to GitHub Pages
👉 No manual work required.
- Time: 4:15 PM PST (after market close)
Python (yfinance) ↓ Generate RS + Momentum ↓ Update JSON files ↓ Commit to repo ↓ Build frontend (Vite) ↓ Deploy via GitHub Pages
public/raw-data.json→ Raw price datapublic/rrg-data.json→ Processed RRG data (used by app)
scripts/update_rrg.py→ Fetches data + computes RS/Momentum
- Built using Vite
- Outputs to
/distfor deployment
.github/workflows/update-data.yml- Handles data update + build + deploy
👉 https://friedjalapeno.github.io/rrg/
Each sector ETF (SPDR):
- XLK – Technology
- XLF – Financials
- XLE – Energy
- XLI – Industrials
- XLB – Materials
- XLU – Utilities
- XLP – Staples
- XLY – Discretionary
- XLV – Healthcare
- XLRE – Real Estate
- XLC – Communication
| Quadrant | Meaning |
|---|---|
| 🟢 Leading | Strong RS + rising momentum |
| 🟡 Weakening | Strong RS, but losing momentum |
| 🔴 Lagging | Weak RS + weak momentum |
| 🔵 Improving | Weak RS, but gaining momentum |
This tool is designed for top-down analysis:
- Watch sectors moving from:
- Improving → Leading
- Only scan stocks inside:
- Leading sectors
- Improving sectors (early moves)
- Supply/Demand
- Structure
- Momentum confirmation
- Data is based on weekly aggregation
- Updated once per trading day
- Uses
yfinance(subject to occasional API hiccups) - If a workflow fails, last successful data remains live
- Python (yfinance, pandas)
- GitHub Actions (automation)
- Vite (frontend build)
- GitHub Pages (hosting)
- Alerts for quadrant transitions
- Sector ranking / scoring
- Stock-level scanner integration
- Momentum velocity tracking
- Intraday update option
Most traders react to price.
This tool helps you:
👉 Track where money is rotating BEFORE the move fully develops
It’s not about predicting —
it’s about positioning early.
This project is for educational and informational purposes only.
It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any securities.
All market data is sourced from third-party providers and may be delayed or inaccurate. Always do your own research and consult with a qualified financial professional before making investment decisions.
Use at your own risk.