Webinar
August 15, 2021

# Video Tutorial: How to Calculate Correlation Between Stocks

Many investors pay close attention to the correlation between stocks in their portfolio. Why is this, and how do you make those calculations? Learn how, step-by-step in Python.  ### JP Hwang

https://iexcloud.io/community/blog/video-tutorial-how-to-calculate-correlation-between-stocks
@iexcloud https://iexcloud.io/community/blog/video-tutorial-how-to-calculate-correlation-between-stocks
@iexcloud

Investors have a long list of theories to choose from when it comes to crafting their investment strategy. One approach that remains particularly popular, however, is assessing the correlation between stocks in a portfolio.

Modern Portfolio Theory, or MPT, argues you can maximize returns for a given level of risk by collecting assets based on their correlations. For instance, it proposes that collecting uncorrelated assets may protect a portfolio from fluctuations by reducing the probability of asset prices moving together. Many investors seek to diversify their portfolios for these reasons.

But how do you make those calculations? In this video tutorial, JP Hwang demonstrates how to crunch the numbers and find correlation – which you can then use to inform how you construct your own portfolio and minimize risk.

Directory

• 0:00: Introduction and background on IEX Cloud
• 0:35: Background on volatility and correlation
• 4:45: Automation is the answer: Why use Python
• 5:38: First example and dataset (load data, create a pivot table, calculate correlation)
• 8:45: Next dataset (plotting, pivot data, and calculate correlation, the Pearson R function)