tinyurl.com/sunbingo-uk

Tag Archives: Risk

Implement Portfolio Variance Calculation in R

It is critical to calculate total variance of portfolio given inputs of variance of assets within the portfolio .   There is a little hardship in dealing with the correlation of the assets .   Interaction for each pair of assets should be calculated separately. (See second term in below ) if we construct a function with input two vector, (weight vector and volatility vector) it is quite easy to implement first term with R by above: sum(w^2 * s^2) for the second term , we need a correlation Read more [...]