Skip to content

Add NSE Dashboard: live Indian market data + Kronos AI prediction + ORB levels#286

Open
tejasbsatish wants to merge 1 commit intoshiyu-coder:masterfrom
tejasbsatish:feature/nse-dashboard
Open

Add NSE Dashboard: live Indian market data + Kronos AI prediction + ORB levels#286
tejasbsatish wants to merge 1 commit intoshiyu-coder:masterfrom
tejasbsatish:feature/nse-dashboard

Conversation

@tejasbsatish
Copy link
Copy Markdown

Summary

A professional dark-themed trading terminal web UI for Indian markets (NSE) built on top of the Kronos financial foundation model.

Features

  • Live NSE data via yfinance: NIFTY 50 (^NSEI), Bank NIFTY (^NSEBANK), and top NSE stocks (Reliance, TCS, HDFC Bank, Infosys, ICICI, etc.)
  • Multi-interval support: 1m, 5m, 15m, 30m, 60m, 1d
  • Opening Range Breakout (ORB) calculation (configurable window, default 15 min after NSE open at 09:15 IST) overlaid on chart as dotted lines
  • Kronos AI prediction with async background inference via threading + job-id polling so the UI never blocks during CPU-bound model runs (1-5 min on CPU)
  • Model selector: Kronos-mini (4.1M params), Kronos-small (24.7M), Kronos-base (102.3M)
  • NaN sanitization: pred_df.fillna(0.0) + _safe() helper before JSON serialization, preventing JSON.parse failures when Kronos outputs NaN during denormalization
  • Zoom/pan controls, category x-axis (skips market gaps), IST clock, market status indicator

New files

File Description
webui/nse_dashboard.py Flask app (port 7072), chart builder, async prediction routes
webui/data_fetcher.py yfinance OHLCV fetcher + IST timezone normalization + ORB calculator
webui/templates/nse_dashboard.html Dark trading terminal UI (Plotly + vanilla JS)
webui/requirements_nse.txt flask flask-cors plotly yfinance pandas numpy pytz

Usage

pip install -r webui/requirements_nse.txt
python webui/nse_dashboard.py
# open http://localhost:7072

Adds a professional dark-themed trading terminal web UI for Indian markets
(NSE) built on top of the Kronos financial foundation model.

Features:
- Live OHLCV data for NIFTY 50, Bank NIFTY, and top NSE stocks via yfinance
- Opening Range Breakout (ORB) calculation and overlay (configurable window)
- Async Kronos AI prediction via background threading + job-id polling
  so the UI never blocks during CPU-bound inference (can take 1-5 min)
- Multi-interval support: 1m, 5m, 15m, 30m, 60m, 1d
- Zoom/pan controls, category x-axis (skips market gaps), dark terminal theme
- NaN sanitization: pred_df.fillna(0) + _safe() helper before JSON
  serialization, preventing browser JSON.parse failure when Kronos
  outputs NaN in denormalization step

New files:
- webui/nse_dashboard.py        Flask app (port 7072), routes, chart builder
- webui/data_fetcher.py         yfinance fetcher + ORB calculator
- webui/templates/nse_dashboard.html  Professional trading terminal UI
- webui/requirements_nse.txt    flask, flask-cors, plotly, yfinance, pandas
- .claude/launch.json           Claude Code launch config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants