Case Study: How a Simple Moving Average Crossover Strategy Performs on Nifty
A hands-on case study for coders and quant-curious engineers who want to run their first real backtest. You will take the most famous trend-following rule in the world, buy Nifty 50 when its 50-day moving average crosses above its 200-day average and sell when it crosses back below, and test it honestly on two decades of Indian index data in Python. Along the way you will download and clean Nifty 50 history, compute moving averages and crossover signals in pandas, build positions without look-ahead bias, simulate an equity curve, and then subtract the brokerage, STT, slippage and capital gains tax that separate a textbook chart from a real trading account. The course ends with a verdict on whether the golden cross has actually worked on Nifty, why it behaves the way it does in Indian bull and sideways markets, and a checklist of what to test before risking a rupee.