Skip to content
All projects
Analysis

BSE Ltd — Correlation & Swing-Trading Analysis

bse-ltd-correlation-analysis

A quantitative study of BSE Ltd (the exchange operator, BSE.NS — not the Sensex index): correlation with Nifty 50, Bank Nifty, Sensex and Nifty 500, both static and 21-day rolling.

Adds seasonality (month, weekday, day-of-month, quarter), a full technical-indicator suite (SMA/EMA/MACD/RSI/Bollinger/volume ratio), five rule-based strategy backtests against buy-and-hold, volatility-regime and mean-reversion analysis, and holding-period sensitivity across 1/2/3/5/10/20-day forward return, win rate and Sharpe.

Fixed in review

  • A missing f-string prefix that printed a literal {most_corr_index} instead of the real index name.
  • Nifty 500 data fetched but never used in the correlation matrix.
  • A hardcoded future end date.
  • A Sharpe-ratio divide-by-zero on low-trade-count signals.
  • Reorganized from one 800-line cell into nine labeled sections.
  • Made the synthetic-data fallback (if BSE.NS fails to fetch) loud and explicitly labeled rather than silent.
CorrelationSeasonalityBacktestingNSE
Next projecthdfc-bank-technical-entry-analysis