Skip to content

divyankm/Stock-Exchange-Data-Analysis

Repository files navigation

Stock Exchange Data Analysis

Python Jupyter Plotly Stars

A comprehensive collection of quantitative finance analyses on NSE indices and stocks — covering ML forecasting, options strategies, backtesting, DCF valuation, and pair trading. All analyses come with interactive Plotly visualisations.

🌐 Live Dashboard: divyankm.github.io/Stock-Exchange-Data-Analysis


📁 Repository Structure

├── ml_model/                        ← Forecasting models (ARIMA, HW, KATS, LSTM)
├── backtesting/                     ← Momentum strategy backtest
├── pair_trading/                    ← Pair trading with z-score signals
├── DCF & Reverse DCF/               ← Valuation models
├── html files/                      ← Interactive Plotly charts
├── frontend_html_files/             ← Web dashboard pages
├── images/                          ← Assets
└── index.html                       ← Live dashboard entry point

🔬 Analyses

📈 ML Forecasting — ml_model/

Notebook Description
Nifty_50_Future_Prediction_using_arima.ipynb ARIMA time series forecast on NIFTY 50
nifty_mc_algo.ipynb Monte Carlo simulation for NIFTY 50 price paths
infy_mc_algo.ipynb Monte Carlo simulation on Infosys stock
nifty_50_usd_inr_forecasting_with_kats_lstm_algo.ipynb NIFTY 50 & USD/INR forecasting using KATS (Facebook) + LSTM

📉 Backtesting — backtesting/

  • Momentum Strategy — entry/exit signals based on price momentum, P&L analysis

🔄 Pair Trading — pair_trading/

  • Statistical arbitrage using z-score signals on correlated NSE stock pairs
  • BNF/NF ratio analysis for pair trading opportunities

💰 DCF & Reverse DCF — DCF & Reverse DCF/

  • DCF Model — Discounted Cash Flow valuation for Indian equities
  • Reverse DCF — back-calculate the growth rate implied by current market price

📊 Options Strategies

Interactive charts covering:

  • Max Pain — weekly expiry max pain calculation
  • Iron Fly & Iron Condor — options income strategies
  • Calendar Spread — NIFTY, BNF, RELIANCE, TCS, HAVELLS futures
  • PE/CE Ratio Spread — put-call ratio analysis
  • Mean Reversion — probability distribution of weekly expiry returns

🌊 Volatility & Distributions

  • INDIA VIX volatility analysis
  • NIFTY 50 & BNF daily returns distribution
  • Normalised probability distribution of returns
  • ATR time series analysis

🛠️ Tech Stack

  • Python — pandas, numpy, statsmodels, scikit-learn
  • Plotly — all interactive charts
  • KATS (Facebook) — time series forecasting toolkit
  • LSTM — deep learning price forecasting
  • Jupyter Notebook
  • GitHub Pages — live interactive dashboard

🌐 Live Dashboard

All analyses are accessible as an interactive web dashboard:

👉 divyankm.github.io/Stock-Exchange-Data-Analysis

Includes charts for: NIFTY forecasting, momentum backtests, pair trading signals, options strategies, volatility analysis, and more.