Bloomberg Terminal-style market dashboard for swing traders
Features • Quick Start • Scoring System • Architecture • Contributing
Should I Be Trading? is a live, auto-refreshing market quality terminal that evaluates the current stock market environment and outputs a clear, actionable trading decision. It aggregates volatility, trend, breadth, momentum, and macro data into a single composite score — then tells you whether to trade, be cautious, or sit on your hands.
- 📉 One-glance decision: YES / CAUTION / NO — no ambiguity
- 🧮 Quantified market quality: 0–100 composite score with transparent weights
- ⚡ Real-time data: Auto-refreshes every 45 seconds via Yahoo Finance
- 🏦 Bloomberg Terminal feel: Dense, high-signal, dark UI built for traders
- 🎛️ Two modes: Swing Trading and Day Trading with adjusted thresholds
- 📊 Market Quality Score — Weighted composite of 5 categories (0–100)
- 🟢🟡🔴 Decision Engine — YES (press risk) / CAUTION (A+ setups only) / NO (preserve capital)
- ⚡ Volatility Analysis — VIX level, trend, 1-year percentile, Put/Call ratio
- 📈 Trend Detection — SPY vs 20/50/200-day MAs, QQQ trend, regime classification
- 📊 Breadth Indicators — % above MAs, NYSE A/D, Nasdaq Highs/Lows
- 🚀 Momentum Tracking — 11 sector ETFs, leaders/laggards, participation breadth
- 🏛️ Macro Awareness — 10Y yield, DXY, Fed stance, FOMC event alerts
- 🎯 Execution Window — Are breakouts holding? Are pullbacks being bought?
- 📡 Live Ticker Bar — Scrolling quotes for SPY, QQQ, VIX, DXY, TNX, sectors
- 🔄 Auto-refresh — 45-second cycle with 30-second server cache
- 🌗 Mode Toggle — Swing Trading / Day Trading
- Node.js 22+
- macOS, Linux, or Windows WSL
# 1. Clone the repository
git clone https://github.com/utfcmac/should-i-be-trading.git
cd should-i-be-trading
# 2. Install dependencies (automatically sets up Git hooks)
npm install
# 3. Start development server
npm run devThe dashboard will be available at http://localhost:3000.
npm run build
npm run start| Category | Weight | Key Inputs |
|---|---|---|
| Volatility | 25% | VIX level, 5-day trend, 1-year percentile, Put/Call |
| Momentum | 25% | Sector participation, leaders/laggards, RSI, ROC |
| Trend | 20% | SPY vs 20/50/200 MA, QQQ trend, regime classification |
| Breadth | 20% | % above 50d/200d/20d MA, NYSE A/D, NAS Highs/Lows |
| Macro | 10% | 10Y yield, DXY, Fed stance, FOMC proximity |
80–100 → YES Full position sizing, press risk
60–79 → CAUTION Half size, A+ setups only
<60 → NO Avoid trading, preserve capital
Evaluates whether setups are actually working:
- Are breakouts holding above pivot levels?
- Are leading stocks maintaining gains?
- Are pullbacks being bought quickly?
- Is there multi-day follow-through?
┌──────────────────────────────────────────────────────┐
│ Browser (React / Next.js) │
│ │
│ ┌─────────┐ ┌────────┐ ┌──────────┐ ┌───────────┐ │
│ │ Hero │ │ Detail │ │ Sectors │ │ Terminal │ │
│ │ Panel │ │ Grid │ │ Heatmap │ │ Analysis │ │
│ └────┬────┘ └───┬────┘ └────┬─────┘ └─────┬─────┘ │
│ └──────────┴───────────┴──────────────┘ │
│ │ SWR (45s) │
├─────────────────────────┼────────────────────────────┤
│ Server (Next.js API) │ │
│ ▼ │
│ ┌──────────────────────────────┐ │
│ │ /api/market-data │ │
│ │ - Score calculation │ │
│ │ - Decision logic │ │
│ │ - Analysis generation │ │
│ │ - 30s server cache │ │
│ └──────────────┬───────────────┘ │
│ │ │
│ ┌──────────────▼───────────────┐ │
│ │ yahoo-finance2 │ │
│ │ - Quotes (SPY, QQQ, VIX…) │ │
│ │ - Historical bars (12mo) │ │
│ └──────────────────────────────┘ │
└──────────────────────────────────────────────────────┘
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router, Turbopack) |
| Language | TypeScript 5 |
| Styling | Tailwind CSS 3.4 |
| Data Fetching | SWR (client), yahoo-finance2 (server) |
| Font | Inter (Google Fonts) |
| Type | Symbols |
|---|---|
| Index | SPY, QQQ, ^VIX, ^TNX, DX-Y.NYB |
| Sectors | XLK, XLF, XLE, XLV, XLI, XLY, XLP, XLU, XLB, XLRE, XLC |
Uses yahoo-finance2 (free, no API key required).
For production use with higher rate limits, consider:
- Alpha Vantage (free tier available)
- Polygon.io (paid, real-time)
- IEX Cloud (paid, reliable)
# Development
npm run dev # Start dev server with Turbopack
# Production
npm run build # Build for production
npm run start # Start production server
# Code Quality
npm run lint # Run ESLint
# Git Hooks
npm run setup:hooks # Manually configure git hooksshould-i-be-trading/
├── src/
│ ├── app/
│ │ ├── page.tsx # Main page
│ │ ├── layout.tsx # Root layout (Inter font)
│ │ ├── globals.css # Tailwind + custom styles
│ │ └── api/
│ │ ├── market-data/ # Main data endpoint
│ │ └── events/ # FOMC/macro events
│ ├── components/
│ │ ├── Dashboard.tsx # Main layout orchestrator
│ │ ├── HeroPanel.tsx # Decision + score + mini scores
│ │ ├── GridPanel.tsx # Category detail cards
│ │ ├── SectorHeatmap.tsx # Horizontal bar chart
│ │ ├── ScoreBreakdown.tsx # Weighted score visualization
│ │ ├── ExecutionPanel.tsx # Execution window signals
│ │ ├── TerminalText.tsx # AI analysis output
│ │ ├── TickerBar.tsx # Scrolling ticker
│ │ ├── AlertBanner.tsx # Event warnings
│ │ ├── ModeToggle.tsx # Swing/Day toggle
│ │ └── LoadingSkeleton.tsx # Loading states
│ ├── hooks/
│ │ └── useMarketData.ts # SWR data hook
│ └── lib/
│ ├── scoring.ts # Score calculation engine
│ ├── indicators.ts # Technical indicators (SMA, RSI, MACD)
│ ├── yahoo.ts # Yahoo Finance wrapper
│ ├── events.ts # FOMC/macro event calendar
│ ├── cache.ts # Server-side cache
│ ├── symbols.ts # Symbol definitions
│ └── types.ts # TypeScript types
├── docs/
│ └── tradingview.png # Dashboard screenshot
├── .githooks/ # Git hooks (conventional commits)
├── .github/ # PR/issue templates, CI/CD
├── scripts/
│ └── setup-hooks.sh # Hook setup automation
├── package.json
├── tailwind.config.ts
├── tsconfig.json
└── CHANGELOG.md
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Follow the Conventional Commits format
- Update
CHANGELOG.mdunder[Unreleased] - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
feat(scoring): add McClellan Oscillator
fix(dashboard): correct sector heatmap rendering
docs(readme): update installation guide
chore(deps): bump next to v16.3.0
This project is licensed under the MIT License - see the LICENSE file for details.
TL;DR: You can do whatever you want with this code! Use it, modify it, distribute it, even commercially.
- @investingluc — Original idea and inspiration for the "Should I Be Trading?" concept. Thank you for sharing this with the community!
- Yahoo Finance — Market data
- Next.js — React framework
- Tailwind CSS — Utility-first CSS
- SWR — Data fetching
Made with ❤️ for disciplined traders
Not financial advice. This tool is for informational purposes only.
