Calculating the Variance Covariance Matrix using stock daily Prices in Python, R and Excel

preview_player
Показать описание

Download Data from Yahoo Finance and estimate variance-covariance
We describe how to download daily Price data from Yahoo finance for 10 stocks (for a 1-year period). We install the yfinance package and load in the data seamlessly from yahoo finance. We then calculate daily returns using those same annual observations (using the python and r code explained in the portal outlined above). Finally, we estimate the variance-covariance matrix of the ten-asset portfolio. We also verify the R and Python Variance Covariance matrix estimation using a spreadsheet template suggested by Simon Benninga. Knowing that stocks have a high or low covariance can be useful in its own right. Covariance can tell how the stocks move together and the risks that arise in a portfolio context. We can determine the strength of the relationship and this is significant to those wanting to set up risk modelling.
Рекомендации по теме
Комментарии
Автор

Can you estimate Portfolio optimization and Efficient Frontier?

aarondelarosa