0
votes
1answer
275 views

VaR Calculation - Covariance matrix is not positive semidefinite

This is a basic question. I have three assets, equally weighted, and all the mutual covariances are -1. Then, the covariance matrix looks like - ...
3
votes
2answers
719 views

Covariance for arbitrarily large portfolios

I am implementing a method in Java to calculate the variance, covariance, and value at risk for a portfolio, which should be flexible for use with any number of assets in a portfolio. I am struggling ...