How can calculate this formula?

1 view (last 30 days)
fede
fede on 5 Nov 2015
Edited: Torsten on 6 Nov 2015
I have a matrix of price time series (p1,p2...pn) and their weights w(1,n). How can calculate this formula?

Answers (1)

Matt J
Matt J on 5 Nov 2015
Edited: Matt J on 5 Nov 2015
v = w(:) .* sigma(:);
sigmaIndex = v.' * rho * v;
  3 Comments
Matt J
Matt J on 5 Nov 2015
I had a typo. The 2nd line should be
sigmaIndex = v.' * rho * v;
If that wasn't the misunderstanding, it's unclear what is. All of the variables are from notation given by you in your post.
Torsten
Torsten on 6 Nov 2015
Edited: Torsten on 6 Nov 2015
Note that the diagonal of the matrix rho has to be set to 1.
Best wishes
Torsten.

Sign in to comment.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!