Value at Risk via Variance – Covariance Method

This post presents how to estimate Value at Risk via a variance – covariance method. The following steps outline how to calculate Value at Risk using this method.

1.) Gather stock data and calculate periodic returns (Including the average return of each asset).

2.) Generate a covariance matrix based upon the periodic returns.

3.) Calculate the portfolio mean and standard deviation based upon the defined weights in each asset and amount invested in the portfolio.

4.) Calculate the inverse of the normal cumulative distribution with a specified probability, standard deviation, and mean.

5.) Estimate the value at risk for the portfolio by subtracting the initial investment from the calculation in step 4.

Let’s jump into Python to see how this is implemented.

Below are some graphical results:

About the author

programmingforfinance

Hi, I'm Frank. I have a passion for coding and extend it primarily within the realm of Finance.

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *