Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

Correlation Study on Nifty Stocks

3 min read

This Nifty stocks correlation study measures how 15 Nifty 50 stocks moved relative to each other during 2009 and sorts them into highly positive, highly negative and near-zero correlated pairs. A correlation coefficient always lies between -1 and +1: positive pairs tend to rise and fall together, negative pairs move in opposite directions, and pairs near zero behave independently, which is what you want for diversification.

Key Takeaways

  • The study covers 15 randomly picked Nifty 50 stocks between 1 January 2009 and 14 December 2009.
  • A coefficient near +1 means the two stocks move together; near -1, opposite; near 0, independently.
  • Holding stocks that are not perfectly correlated reduces portfolio risk without necessarily giving up return.
  • Correlations change over time, so recompute them on recent data before using them in a portfolio or a pairs trade.

What Correlation Between Two Stocks Means

The correlation between any two stocks (or sets of variables) summarizes a relationship, whether or not there is any real-world connection between the two stocks. The correlation coefficient will always be between -1 and +1. These two extremes are considered perfect correlations. A negative coefficient means that the two stocks,, will move in opposite directions (if one stock increases, the other will decrease); a positive coefficient will mean that the two will move in the same direction (as one increases, the other will increase). And if Correlation is zero(perfectly uncorrelated) or almost zero then both the stock will behave independently

About Correlation Table

Correlation table is a two-dimensional matrix that shows correlation coefficient between pairs of securities. The cells in the table are color-coded to highlight significantly positive and negative relationships.

Nifty stocks correlation table 2009

(Click on the Picture for Big Table)

Nifty Stocks Correlation Table (2009 Study)

Here I had taken randomly some 15 stocks from the Nifty 50 Pack with the sample duration between 1st Jan 2009 – 14 Dec 2009 and the correlation table is presented above. Also Highly correlated pairs (Both Positive & Negative ) and Zero Correlated Pairs are identified from the above table

Positive, Negative and Zero Correlated Pairs

An Investopedia article explains how USD is correlated with the US Indices

If we compare the US Dollar Index (USDX), an index that tracks the value of the U.S. dollar against six other major currencies, and the value of the Dow Jones Industrial Average (DJIA), Nasdaq and S&P 500 over a 20-year period, the correlation coefficient calculated for the USDX versus the DJIA, Nasdaq and S&P 500, is 0.35, 0.39 and 0.38, respectively. Note that all of the coefficients are positive, which means that as the value of the U.S. dollar increases, so do the stock indexes, but only by a certain amount. Notice also that each coefficient is below 0.4, which means that only about 35% to 40% of the stock indexes’ movements are associated with the movement of the U.S. dollar.

List of High Positive Correlated Pairs

Highly positive correlated Nifty stock pairs

List of High Negative Correlated Pairs

Highly negative correlated Nifty stock pairs

Zero Correlation Stocks

Zero correlated Nifty stock pairs

Correlation can also be used for Portfolio Diversification. An investor can reduce portfolio risk simply by holding instruments which are not perfectly correlated. In other words, investors can reduce their exposure to individual asset risk by holding a diversified portfolio of assets.

How to Calculate the Correlation Between Two Stocks

The correlation coefficient used here is the Pearson correlation of daily returns. You can calculate it in three common ways:

Always use returns rather than raw prices. Two stocks that both trend up for a year will show a high price correlation even if their day-to-day moves have little in common.

Open Varsity: 13 free courses for traders and investors

FREE AND SELF-PACED

Open Varsity: 13 free courses for traders and investors

From stock market basics to options strategies, quant trading and taxation, built around Indian market examples.

  • 407 chapters, beginner to expert
  • Options, Python, AmiBroker AFL and quant tracks
  • Risk management and trading psychology

How Traders Use Nifty Stock Correlation

  • Diversification: combine stocks with low or negative correlation so that one position’s losses are not repeated across the portfolio.
  • Hidden concentration: five highly correlated banking stocks are closer to one big bet on banks than to five separate positions.
  • Pairs trading: highly correlated pairs from the same sector are candidates for long-short trades when their spread stretches unusually far.
  • Hedging: a stock that is negatively correlated with your holdings can offset part of a sell-off.

Do the 2009 Correlations Still Hold?

Not necessarily. Correlations depend on the market regime, sector news and the time window you choose. 2009 was a sharp recovery year after the 2008 crash, when most stocks rallied together. Treat the tables above as a snapshot of that year, and recompute correlations on recent data before you act on them. For a ready-made table inside Amibroker, see how to create a correlation matrix table using Amibroker.

Frequently Asked Questions

What is a good correlation between two stocks for diversification?

Pairs with a correlation below about 0.3, or a negative correlation, add the most diversification. Pairs above 0.7 tend to move almost as one.

Which Nifty stocks are negatively correlated?

It depends on the period. Negative correlations among Nifty stocks are usually weak and short-lived, often between defensive sectors such as pharma or FMCG and cyclical sectors such as banks or metals. Recompute on current data to find them.

How do I calculate stock correlation in Excel?

Calculate the daily percentage returns of both stocks in two columns, then use the CORREL function on the two return columns.

Does correlation between stocks change over time?

Yes. Correlations shift with market conditions and usually rise during sharp sell-offs, when most stocks fall together.

Marketcalls Elite Traders Club

MEMBERSHIP

Marketcalls Elite Traders Club

Every Marketcalls course and live mentorship in one membership: 127 courses and 2,500+ hours of learning.

  • Market Profile, Orderflow, AFL, Pine Script and Python
  • Live mentorship and TradEdge trading room
  • Premium tools and the Elite Slack community

Learn by watching: free videos every week

Market Profile, order flow, Python, AI and OpenAlgo tutorials on YouTube.

Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

10 Replies to “Correlation Study on Nifty Stocks”

  1. Usually, it is seen that stocks from the same industry are highly correlated. Maruti and Hero Honda are highly correlated at around 0.95. Another example can be say Bharti, RCOM.ss

  2. Nope Its working…. I just removed that gupshupwidget from my blog just to make it light weight

  3. Hello,
    Kindly share the code of “Correlation Study on Nifty Stocks” and guide us how to use this.
    Thank you

  4. Dear Mr. Rajandran

    That “table” is cooooool.

    I have one idea.
    Do you have any interst in “cointegration”?

    Cointegration seems to be better than correlation in some tradings.
    Could it transfer to “cointegration”?

    Thanks.

  5. Hi Rajandran ,

    Could you please guide me on how to create that table above? What data do you use to calculate it? Can I use the EXCEL corr() function to do it? What timeframe is most useful ?

    Thanks.

  6. Could you please guide me on how to create that table above? What data do you use to calculate it? Can I use the EXCEL corr() function to do it? What timeframe is most useful ?

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More