
In the week of 28 Jul 2025 the Nifty 50’s 21 day volatility was about 7% a year. In the week of 15 Apr 2026 it was about 28%. Calling the next day’s direction was no easier in either month. The efficient market hypothesis says prices reflect all available information, so returns are close to unpredictable. Decades of research say: mostly true, with well documented exceptions. Those exceptions are what factor investing is built on.
This module takes an Indian return series one test at a time: stationarity, the random walk, volatility clustering, India VIX, mean reversion, cointegration, regimes, and the data traps that flatter a back test. I run each on NSE's daily index files so you see the output, not the textbook.
21 day annualised volatility of the Nifty 50, sampled weekly from 30 September 2024 to 31 August 2026, ranged from about 7% to about 28%.
Computed by RupeeCase from NSE daily index files, closes 30 Aug 2024 to 31 Aug 2026, sampled every fifth session back from 31 Aug 2026.
3 terms this section turns on
- Stationarity checkPrices are not stationary; returns roughly are.
- TransformPrice to log return.
- FitA mean model, then a variance model such as GARCH.
- Check residualsLjung Box and ARCH LM tests.
- Walk forwardRefit on a rolling window, test on unseen data.
Most retail back tests skip steps 1 and 4, which is how a spurious pattern ends up looking like an edge.
4By the end you can
- Read an ADF test, an autocorrelation table and a variance ratio on an Indian index.
- Run a GARCH(1,1) forecast by hand and turn its persistence into a half life in trading days.
- Read India VIX from NSE's method, and use a half life for VIX or a spread.
- Name the look ahead and survivorship traps in Indian data and show their size.
The five properties

Stationarity and unit roots
A series is stationary when its average and its spread do not drift over time. Prices fail that test: the Nifty 50 at 24,080 on 31 Aug 2026 has a completely different level from the Nifty of a decade ago, so an average of past prices tells you little. Daily returns come much closer: they hover around a small average with a spread that changes, but does not trend away.
+ d1*dy(t-1) + ... + e(t)
Null: g = 0 (unit root)
Reject if t(g) < -2.86
| Series, 30 Sep 2016 to 30 Sep 2026 | ADF statistic | p value |
|---|---|---|
| Nifty 50, log of the index level | −1.21 | 0.67 |
| Nifty 50, level with a trend term | −2.56 | 0.30 |
| Nifty 50, daily log returns | −13.57 | below 0.001 |
| India VIX, level | −4.10 | 0.001 |
Computed by RupeeCase from NSE daily index files with statsmodels, constant in the regression, lag length chosen by AIC (12 lags for the level, 11 for returns). 2,468 daily returns; 2,469 closes.
Read 2 more paragraphs, 140 words
The standard check is the Dickey Fuller test (Dickey and Fuller, 1979), in its augmented form with extra lagged changes (Said and Dickey, 1984). Regress the change in the series on its own lagged level:
The index level cannot reject a unit root; its returns reject it overwhelmingly. That is the formal version of "model returns, not prices", and the reason spurious regressions (Granger and Newbold, 1974) fool people: two unrelated trending series show a high R² simply because both rose. One caution: failing to reject is not proof of a random walk, because the test has little power against a slow pull back, and an index that rose 2.7 times in ten years is a trending sample. India VIX does reject a unit root: it is pulled back to a level, though a spike can take weeks to fade.

Is the Nifty a random walk? Autocorrelation and variance ratios
The weak form of market efficiency says past returns carry no information on future returns. The simplest test is the autocorrelation of daily returns. Over the ten years, with 2,468 returns, the 95% band around zero is ±0.039.
| Lag, Nifty 50 daily | Returns | Absolute returns |
|---|---|---|
| 1 | −0.047 | 0.299 |
| 2 | 0.033 | 0.331 |
| 3 | 0.006 | 0.281 |
| 4 | 0.020 | 0.267 |
| 5 | 0.085 | 0.239 |
Computed by RupeeCase from NSE daily index files, closes 30 Sep 2016 to 30 Sep 2026, daily log returns. 95% band for returns: ±0.039.
Read one more paragraph, 85 words
Returns show small correlations, two of them just outside the band, worth almost nothing in rupees. Absolute returns show 0.24 to 0.33 at every lag. The Ljung and Box (1978) statistic, which tests the first 10 lags together, gives 76 for returns and 1,836 for absolute returns, both far beyond chance. Cut 15 February to 30 June 2020 and the return correlations vanish (Ljung Box p = 0.21) while the absolute return ones stay (p below 0.001). Direction is close to random; size is not.
The variance ratio
Lo and MacKinlay (1988) built a sharper test from one property: if returns are a random walk, the variance of a q day return is q times the variance of a one day return.
/ (q * Var(1 day return))
Random walk: VR = 1
VR > 1: trending
VR < 1: mean reverting
₹100 in Dynamic Asset Allocator became about ₹393 in the model
| Nifty 50, 2,468 days | VR | z, constant volatility | z, robust |
|---|---|---|---|
| q = 2 | 0.954 | −2.31 | −0.96 |
| q = 5 | 0.979 | −0.47 | −0.18 |
| q = 10 | 1.043 | 0.63 | 0.24 |
| q = 20 | 1.096 | 0.96 | 0.38 |
Computed by RupeeCase from NSE daily index files, closes 30 Sep 2016 to 30 Sep 2026, overlapping q day returns. A z beyond ±1.96 rejects the random walk at 5%.
Read 2 more paragraphs, 150 words
Read the first row. The constant volatility test rejects at q = 2 (z = −2.31), but only because volatility is not constant: the 2020 crash dominates the variance. The robust statistic, built for exactly that, is −0.96 and rejects nothing. Without the 2020 window the ratios sit within 7% of 1 and neither statistic rejects. For the Nifty in this decade, a random walk in direction is a reasonable description, once clustered volatility is allowed for.
Lo and MacKinlay rejected the random walk for US weekly returns, 1962 to 1985, largely because of small stocks, and warned that this did not prove inefficiency. A study of Indian indices and shares using the same test reports inefficiency at the daily level and a random walk at the monthly level (Gupta and Bothra, 2015). I hold that loosely: thin trading and circuit limits affect single stocks far more than the Nifty.
GARCH: modelling volatility clustering
Engle (1982) proposed modelling a variance that depends on the size of recent shocks, which he called autoregressive conditional heteroskedasticity; Bollerslev (1986) generalised it to GARCH. The idea: today's variance depends on yesterday's variance and yesterday's surprise.

Worked example: fitting GARCH to the Nifty 50
I fitted a GARCH(1,1) to the 496 returns of the two years to 31 Aug 2026, by maximum likelihood with the long run variance fixed at the sample variance. The result: α = 0.072, β = 0.911, so persistence α + β = 0.983. A volatility shock decays by about 1.7% a day, so half of it is gone after about 41 trading days, roughly two months.
Read one more paragraph, 94 words
Two years is a short sample. Refit on the ten years to 30 Sep 2026, 2,468 returns including 2020, and the answer changes: ω = 0.0249, α = 0.111, β = 0.863, persistence 0.974, half life 26 trading days. The daily return is in percent, so ω is in percent squared. With ω = 0.02488, α = 0.1112 and β = 0.8628, the long run variance is 0.02488 / (1 − 0.1112 − 0.8628) = 0.955, an annualised volatility of √(0.955 × 252) = 15.5%. Parameters depend on the window; the shape is stable.
Forecast by hand
The last close in the data, 30 Sep 2026, had a model conditional volatility of 14.0% a year, a variance of 0.778 for that day. The day's return was −0.422% against a fitted mean of 0.061%, a shock of −0.484. Tomorrow's variance:
| Days ahead from 30 Sep 2026 | Variance that day | Volatility, annualised |
|---|---|---|
| 1 | 0.722 | 13.5% |
| 21 | 0.818 | 14.4% |
| 63 | 0.910 | 15.1% |
| Long run | 0.955 | 15.5% |
Two terms to hold on to from 5.2
GARCH(1,1) fit by RupeeCase on NSE daily index files, 30 Sep 2016 to 30 Sep 2026. Variance in percent squared per day. Forecast: V + (α + β)^(h − 1) × (σ² of day 1 − V), with V the long run variance.
Read one more paragraph, 58 words
By hand: 0.0249 + 0.1112 × 0.484² + 0.8628 × 0.778 = 0.0249 + 0.0260 + 0.6713 = 0.722. A quiet day, so volatility steps down from 14.0% to 13.5%. A shock of −3% instead would lift tomorrow's volatility to 20.7%. Further out, forecasts drift to the long run level by the factor α + β a day:
Bad news counts more
Plain GARCH treats a +3% day and a −3% day alike. The data do not (Engle and Ng, 1993). The simplest fix adds a term for negative shocks only (the GJR form). On the Nifty, the ten year fit gives 0.031 for any shock plus an extra 0.150 for negative ones: a −1% day lifts next day's variance by 0.18, a +1% day by 0.03, 5.8 times less. The log likelihood improves by 30.2 for one extra parameter.
Read one more paragraph, 58 words
A check on the plain fit: the standardised residuals, returns divided by the model's volatility, have a kurtosis of 4.7 against 25.3 for the raw returns, and a Ljung Box test on their absolute values no longer rejects (p = 0.08, against effectively zero before). The model absorbed most of the clustering and much of the fat tail.
Volatility targeting in rupees
Put that in rupees. Suppose you size a ₹10 lakh equity position to a risk budget. On a calm day the model says annualised volatility is 10%, and you hold the full ₹10 lakh. After a week of 2% to 3% daily moves the estimate rises to 20%, so the same risk means about ₹5 lakh. That is volatility targeting: it forecasts the size of moves, not returns. Module 4.5 takes up risk budgets, and the Derivatives School pages at the end of this module cover the estimators.
Where this section sits in module 5.2
A note on Indian data length. Clean daily data for many Indian indices and stocks covers two decades at most, a few complete market cycles. That is enough for a GARCH fit, but the oldest data may describe a different market.
India VIX: a published volatility series
You do not have to model volatility to see it: NSE publishes an expectation of it every day. India VIX is computed from Nifty option prices. NSE's document "India VIX computation methodology" says it uses the CBOE method, adapted to the Nifty order book with cubic splines. It takes the highest bid and lowest ask of out of the money options in the near and next month, computes a variance for each expiry, interpolates the two to a constant 30 calendar days, and reports the square root times 100. The risk free rate is the NSE MIBOR for the matching tenor, and the forward level is the latest futures price. Whaley (2000) described the idea for the US index as an investor fear gauge.
India VIX at each month end from September 2016 to September 2026 mostly sat between 11 and 25; its daily close peaked at 83.61 on 24 March 2020.
NSE daily index files (ind_close_all), last session of each month, Sep 2016 to Sep 2026. Month end values miss intra month peaks: the daily close high was 83.61 on 24 Mar 2020.
NSE daily index files, 30 Sep 2016 to 30 Sep 2026, 2,469 closes: median 14.8, mean 16.4, 5th and 95th percentile 11.0 and 25.2, lowest 9.15 on 26 Dec 2025. VIX was below 12 in 16.7% of sessions, between 12 and 20 in 65.8%, above 20 in 17.5% and above 30 in 2.6% (64 sessions).

Read 3 more paragraphs, 213 words
Three tests. First, it moves against the market: the correlation of the Nifty's daily log return with the daily percentage change in VIX is −0.56. On 4 June 2024, the election result day, the Nifty fell 6.1% in logs and VIX closed at 26.75, up from 20.94.
Second, it forecasts the size of moves, at a premium. Set each session's VIX against the realised volatility of the next 21 sessions, about 30 calendar days, over 2,448 sessions. The correlation is 0.62. The average VIX was 16.5 against an average realised 13.8, and VIX was above the later realised figure on 82% of days. A regression of later realised on VIX has a slope of 0.82 and an R² of 0.39 (overlapping windows, so read it as description). The gap is the premium option sellers collect for carrying the risk; it is a feature of the market, not a flaw in the index.
Third, it mean reverts. An AR(1) fit on the log of VIX gives a daily coefficient of 0.9836, a half life of 41.8 sessions. The standard error of the coefficient is 0.0036, so the half life is anywhere from 29 to 75 sessions. Close to the 26 to 41 sessions that GARCH gave for the Nifty's own volatility.
Mean reversion vs trend following: the regime question
Mean reversion strategies (contrarian, value) and trend following strategies (momentum) both have empirical support. They do not work at the same time; each has stretches where it dominates.
Follows strength, 3 to 12 months
- Wins in long directional markets
- Whipsawed in choppy ranges
- Exits late at turning points
Fades weakness, weeks or years
- Wins in range bound markets
- Keeps adding to a falling stock in a real decline
- Needs patience and position limits
The workable answer is diversification across signal types, not switching between them. Identifying the regime in real time is very hard; holding both is easy.
Measuring mean reversion: the half life
To make "reverts" a number, fit an AR(1) to the deviation: x(t) = φ x(t−1) + ε(t). If φ is below 1, the deviation decays by the factor φ each period, and the half life is how long it takes to lose half.
Half life = ln(0.5) / ln(phi)

The same arithmetic prices a pairs trade: the half life of the spread is how long you wait for it to close, and it means something only if the spread is stationary, which the next test checks.
Read one more paragraph, 67 words
Mean reversion is noisy over short windows. Of the 24 month to month changes from August 2024 to August 2026, the Nifty 50 rose in 11 and fell in 13, and the lag 1 autocorrelation of its monthly returns was −0.25. Over the ten years to 30 Sep 2026, on 120 months, it was −0.07. Do not build a strategy on a pattern seen in 24 numbers.
Cointegration: when two non-stationary series move together
Two price series can each wander, yet a combination of them can be stationary. That is cointegration (Engle and Granger, 1987), the statistical basis of pairs trading: if the spread between two stocks, scaled by a hedge ratio, reverts, you can hold one against the other. The Engle Granger test has two steps: regress log price y on log price x, then run a unit root test on the residual, with stricter critical values (about −3.34 at 5% for two series) because the residual was estimated.
| Pair (y on x) | R² | EG t | p value |
|---|---|---|---|
| Nifty Bank on Nifty Financial Services | 0.979 | −1.66 | 0.70 |
| Nifty Bank on Nifty Private Bank | 0.993 | −3.09 | 0.09 |
| Nifty Private Bank on Nifty PSU Bank | 0.624 | −2.63 | 0.23 |
| Nifty Next 50 on Nifty 50 | 0.948 | −1.37 | 0.81 |
Computed by RupeeCase from NSE daily index files, price indices in logs, Engle Granger test with constant (statsmodels). The 5% critical value is about −3.34. None of the four rejects.
Read 3 more paragraphs, 230 words
I tested four pairs of NSE indices in logs, 2,469 closes from 30 Sep 2016 to 30 Sep 2026:
None of the four passes. The second row has an R² of 0.993 and a spread half life of 91 sessions. A high R² is what a spurious regression also shows; cointegration is about the residual. Notice also that the first pair overlaps by construction, since the Financial Services index holds banks (NSE also publishes an ex-bank version), and still fails.
Split the decade and the picture gets worse for the trader. The Private Bank on PSU Bank pair fails in the first five years (R² = 0.01, t = −1.82) and just passes in the last five (t = −3.38, p = 0.045), but its hedge ratio moved from 0.06 to 0.33. Fix the first five year hedge ratio for the Next 50 against the Nifty 50 and the spread over the following five years averaged 17% away, 2.9 times its earlier standard deviation, and at its widest was 6.3 times. The hedge ratio is not a constant. Gatev, Goetzmann and Rouwenhorst (2006) found US pairs profits of up to 11% a year over 1962 to 2002; in India the short leg usually sits in single stock futures, so margin and rollover costs are part of the test. The Derivatives School sets out Cointegration or correlation: what is the difference?

Regime switching
If volatility comes in waves, model the waves. Hamilton (1989) proposed a model in which the data come from one of a few states and the state follows a Markov chain: it stays with some probability and switches with the rest. He applied it to US output growth; for returns, let the variance depend on the state. Fitted to the Nifty's 2,468 daily returns with two states:
| State | Annual volatility | Stays put (daily) | Expected stay |
|---|---|---|---|
| Calm | 11.2% | 98.5% | 65.7 sessions |
| Turbulent | 35.6% | 89.0% | 9.1 sessions |
Two state Markov switching model with a switching variance, fitted by maximum likelihood by RupeeCase on NSE daily index files, 30 Sep 2016 to 30 Sep 2026. Expected stay is 1 / (1 − probability of staying).
Read 2 more paragraphs, 160 words
On the smoothed probabilities, 276 of the 2,468 sessions (11%) were more likely turbulent than calm. The longest spell ran from 24 February to 24 June 2020 (81 sessions). The next longest were 2 March to 10 April 2026 (26 sessions) and 18 April to 20 May 2022 (24 sessions). Calm most of the time, three times the volatility in short, violent stretches.
Look at which probability you use. Smoothed figures use the whole sample, including later days; filtered figures use data to each day, the only ones available in real time. On 24 February 2020 the smoothed probability of the turbulent state was 68%; the filtered one was 40% and then fell back to 6% before jumping on 28 February. The same lag appears in March 2026 (first filtered signal on 9 March, smoothed from 2 March). A regime model that looks perfect in hindsight is late when it matters, and its parameters were fitted on the future too.
Look ahead and survivorship traps in Indian data
The cleanest way to see a look ahead error is to commit one. A common rule: hold the Nifty when its close is above its 200 day average, otherwise cash. The honest version uses today's signal for tomorrow's position. The error applies today's signal to today's return, which nobody could trade, since the close is only known at the close.
| 200 day rule on the Nifty 50 | CAGR | Volatility | Worst fall |
|---|---|---|---|
| Hold the index throughout | 10.2% | 16.2% | −38.4% |
| Signal applied to the same day (look ahead) | 16.9% | 11.2% | −10.1% |
| Signal applied to the next day (honest) | 6.2% | 11.0% | −20.0% |
Computed by RupeeCase from NSE daily index files, 30 Sep 2016 to 30 Sep 2026. Price index, no costs, cash earns 0%, 80 switches. An illustration of the error, not a recommendation; the rule is a textbook one.
Read one more paragraph, 66 words
Same data, same rule, one line of code apart: the error shows 16.9% a year with a worst fall of 10.1%, the honest rule 6.2% with a worst fall of 20.0%. The honest rule also gave up four points a year against simply holding the index. Whenever a back test looks too smooth, check first whether the signal and the return come from the same bar.
Point in time data
- Results arrive late. SEBI's Listing Regulations (2015, regulation 33) give listed companies up to 45 days after a quarter ends, and 60 days after the year ends, to file results. A model that uses March quarter earnings on 31 March is using numbers nobody had. Lag fundamentals to the filing date.
- Index membership changes. NSE reviews the Nifty 50 twice a year on six months of data to January and July, applies changes from the last trading day of March and September, and gives four weeks' notice. Its table lists a maximum of 5 replacements a year. A back test that holds today's 50 names through 2016 holds winners it could not have known: survivorship bias. Elton, Gruber and Blake (1996) showed the same effect in mutual fund records. Use the constituent list as it stood on each date, at the announcement, not the effective date.
- Prices are adjusted later. Splits, bonuses and rights change history; adjust consistently and know whether dividends are in. The files used here are price indices.
Common mistake: modelling prices instead of returns
The common beginner mistake is fitting a model to price levels. Prices trend and wander, so almost anything fitted to them shows a high R² and a strong relationship. Work with returns, check they are roughly stationary, and test the residuals. If your model only works on prices, it does not work.
For volatility models on option data, the Derivatives School goes further: Measuring realised volatility: four estimators, Forecasting volatility: EWMA, GARCH and HAR and the short answer How do volatility forecasting models like GARCH work?
MythIf daily returns look random, nothing about the market is predictable.
FactDirection is close to random, but the size of moves is not: big days cluster. Volatility can be forecast usefully even when returns cannot.
How this shows up in RupeeCase
The RupeeCase strategies rank stocks with a momentum composite: price trend over several look back windows, adjusted for risk. That is property 3 put to work, with the risk adjustment acknowledging property 1. The fixed rebalance calendar, every 1 to 4 weeks depending on the strategy, keeps the signal fresh without trading on daily noise. Each factsheet shows the strongest and weakest week and the deepest falls of the model, which is volatility clustering written in the record. Read the methodology on any strategy page, for example Midcap, and the factor background in Path 2. The statistics behind a back test are in Module 5.1.
Key takeaways
- Nifty 50 daily returns had lag 1 autocorrelation of −0.02 in the two years to August 2026 while absolute returns had 0.19: direction is close to random, size clusters.
- The index level fails the ADF unit root test (p = 0.67) and returns pass it; a random walk in direction survives a robust variance ratio test.
- A GARCH(1,1) ten year fit has persistence 0.974 and half life 26 trading days; the two year fit has 0.983 and 41.
- India VIX averaged 16.4 and peaked at 83.61 on 24 Mar 2020; it exceeded later realised volatility on 82% of days and has a half life near 42 sessions.
- None of four NSE index pairs cointegrated at 5%, and one apparently passing pair changed hedge ratio.
- A two state model finds calm at 11.2% volatility and turbulence at 35.6%, and its filtered signal is days late.
- One line of look ahead turned a 6.2% rule into a 16.9% one.
Questions readers ask
Can time series models predict stock prices?
They predict the size of moves much better than their direction. Daily direction in a liquid index like the Nifty 50 is close to unpredictable; volatility is persistent and can be forecast over days to weeks.
What is the difference between momentum and mean reversion?
Horizon. Over a few weeks individual stocks tend to reverse; over 3 to 12 months they have tended to continue; over 3 to 5 years they have tended to reverse again. A well built strategy is explicit about which horizon it trades.
How is India VIX calculated?
From out of the money Nifty option quotes in the near and next month, using the CBOE method adapted by NSE with cubic splines. The two variances are interpolated to a constant 30 calendar days; the square root times 100 is the index.
Why is a high R² between two indices not enough for a pairs trade?
Because trending series give high R² whether or not they are linked. What matters is whether the residual spread is stationary, which the Engle Granger test checks, and whether the hedge ratio stays stable after you set the trade.
