Calculating Value at Risk (VaR) of portfolio
Suppose you're given a portfolio of equities and asked to calculate the 'value at risk' (VaR) via the variance-covariance method.
The VaR is a statistical risk management technique measuring the maximum loss that an investment portfolio is likely to face within a specified time frame with a certain degree of confidence. The VaR is a commonly calculated metric used within a suite of financial metrics and models to help aid in investment decisions.
In order to calculate the VaR of your portfolio, you can follow the steps below:
- Calculate periodic returns of the stocks in your portfolio
- Create a covariance matrix based on (1)
- Calculate the portfolio mean and standard deviation (weighted based on investment levels of each stock in the portfolio)
- Calculate the inverse of the normal cumulative distribution with a specified probability, standard deviation, and mean
- Estimate the value at risk for the portfolio by subtracting the initial investment from the calculation in step 4
To help get you started, you can reference this Google Colab notebook with the historical returns for a portfolio of the following equities:
['AAPL','FB', 'C', 'DIS']
Subscribe to premium account to see the solution.Get premium now