Serving the Quantitative Finance Community

 
BuffaloFan32
Topic Author
Posts: 10
Joined: July 14th, 2016, 10:53 pm

Calculating marginal risk from a covariance matrix

July 22nd, 2016, 11:44 pm

I have a portfolio of assets (positive and negative weights) and a corresponding covariance matrix.  I know I can estimate the VaR at the 95 percentile by doing -1.645*sqrt(wNw) but now I am interested in estimating each assets contribution to the risk.  Using historical data in excel, I would use the slope() function but right now I only have a covariance matrix.  I am trying to remember back to my college days and take the derivative of the portfolio with respect to each asset but I can't figure it out.
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Calculating marginal risk from a covariance matrix

July 23rd, 2016, 2:09 pm

Using the chain rule and the symmetry of c, if I haven't made a mistake: 
[$]\frac{\partial}{\partial w_i} (\sum_{j,k} w_j w_k c_{jk})^{1/2} = \frac{\sum_j w_j c_{ij}}{ (\sum_{j,k} w_j w_k c_{jk})^{1/2}}[$]
 
BuffaloFan32
Topic Author
Posts: 10
Joined: July 14th, 2016, 10:53 pm

Re: Calculating marginal risk from a covariance matrix

July 23rd, 2016, 2:55 pm

Thanks again Alan.  If I understand correctly, the denominator is just the variance of the portfolio.  The numerator is the sum of each asset's weight times its covariance with the asset in question.
 
BuffaloFan32
Topic Author
Posts: 10
Joined: July 14th, 2016, 10:53 pm

Re: Calculating marginal risk from a covariance matrix

July 23rd, 2016, 3:41 pm

Hmmmmmmm...I must be doing something wrong.  I multiplied my vector of weights by the first column in my covariance matrix and then divided that product by the portfolio variance.  Then, I repeated that for each position in the portfolio.  The risk contributions I am seeing are tiny and do not sum to 100%.
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Calculating marginal risk from a covariance matrix

July 23rd, 2016, 5:41 pm

The denominator of the expression I posted is the portfolio's std dev.

Note: I was just answering what I thought was your question about a derivative of the portfolio std dev. But, now, I suspect that you don't really want that derivative, but instead the decomposition explained on pgs 11-12 here
 
BuffaloFan32
Topic Author
Posts: 10
Joined: July 14th, 2016, 10:53 pm

Re: Calculating marginal risk from a covariance matrix

July 24th, 2016, 4:45 am

Yes, that was exactly what I was looking for.  thank you!