Open project

Asset Pricing

Market intelligence for Indian equities — from raw NSE ticks to point-in-time predictors, ML return forecasts, and Lean backtests.

9.2M daily candles, 25 years
5,224 NSE companies tracked
21 predictor families in the registry
0.79 best backtest Sharpe ratio

One pipeline, four layers

Kite Connect crawlers pull every NSE instrument and 25 years of daily candles into Postgres. Financial statements become point-in-time metrics, predictor panels feed an ML pipeline that ranks stocks monthly, and QuantConnect Lean turns those ranks into auditable backtests.

  crawlers            postgres              compute               serve
┌───────────┐   ┌──────────────┐   ┌───────────────┐   ┌──────────────┐
│ instruments│   │ instruments  │   │ metric        │   │ FastAPI      │
│ historical │──▶│ daily_candles│──▶│ registry       │──▶│ 1:1 REST     │
│ (Kite API) │   │ company_info │   │ (@metric,     │   │ + Python     │
└───────────┘   │ financial_   │   │  dual-tag)     │   │   library    │
                │   data      │   │ panels/*.csv   │   └──────┬───────┘
                └──────────────┘   └───────┬───────┘          │
                                          ▼                  ▼
                                   ML pipeline          dashboards /
                                   (rank stocks)       notebooks / Lean

Point-in-time everything

A metric value for any month uses only data that was knowable then — statements are availability-lagged, prices come from the month-end that observed them. No lookahead bias leaks into features or backtests.

One registry, two tags

Every predictor is a registered function carrying a standard financial category for humans and an ML feature-group alias for models. One decorator adds it to the panels, the API, and the docs.

Auditable backtests

Monthly ML stock ranks are executed in QuantConnect Lean with full transaction accounting — alpha is measured against the Fama-French six-factor benchmark, not a story.

Results first

Best monthly-ranking model: 1.36x cumulative return, 0.79 Sharpe, +0.26%/month alpha against the Fama-French six-factor benchmark — measured in Lean, not promised in a deck.

See the numbers