I would like to generate a random covariance matrix with variances in certain range.
How can it be done? (In R if possible)
I tried to generate a lower triangular matrix $L$ where the diagonal $D = \sqrt{V}$, where $V$ is the vector of variances. The problem lies with the rest of the values that do not lie on the diagonal. I do not know how to generate them in order to get at the end a meaningful covariance matrix. Finally, I would just do $C = LL^T$ (Cholesky) in order to get a positive definite matrix with the diagonal being $V$.
random
covariance matrix is not that easy as a random matrix is very unlikely to have cov. matrix (grows really fast in number of assets) properties (positive semi definitness etc...) there are methods though. $\endgroup$ – Jan Sila Jan 9 '17 at 14:49