Back to Risk & Return
Risk & Return
Covariance (with Nifty)
Covariance measures whether two things move together. In this case, it measures whether the stock and the Nifty 50 move in the same direction and by similar magnitudes over the last 30 days.
β Why It Matters
Covariance is the mathematical building block of beta. It tells you whether the stock tends to go up when the market goes up (positive covariance), move opposite (negative), or ignore the market (near zero). It's the raw signal, before normalizing for volatility.
π The Formula
Covariance = Ξ£[(Stock_Return β Stock_Mean) Γ (Nifty_Return β Nifty_Mean)] Γ· (N β 1)
Computed over the last 30 trading days.
π Data Sources
Yahoo Finance, NSE
π¬ How We Compute It
We compute the 30-day rolling covariance between the stock's daily returns and Nifty's daily returns. This is the numerator of the beta formula β dividing by Nifty's variance yields beta.
π How to Read It
- Positive β stock tends to move with the market.
- Zero β no relationship with the market.
- Negative β stock tends to move opposite the market (rare; often gold or inverse assets).
- High absolute value β strong co-movement with the market.
- Use together with correlation and beta β covariance alone is scale-dependent.
β οΈ Common Mistakes
- Comparing covariance across stocks directly β it depends on the units of the returns.
- Ignoring the sign β a large negative covariance is just as meaningful as a large positive one.
- Expecting it to be stable β covariance drifts as market conditions change.
π Related Metrics
Stockenza Method Β· Updated 2026-10-14 Β· Educational use only
