How can calculate this formula?

1 次查看(过去 30 天)
fede
fede 2015-11-5
编辑: Torsten 2015-11-6
I have a matrix of price time series (p1,p2...pn) and their weights w(1,n). How can calculate this formula?

回答(1 个)

Matt J
Matt J 2015-11-5
编辑:Matt J 2015-11-5
v = w(:) .* sigma(:);
sigmaIndex = v.' * rho * v;
  3 个评论
Matt J
Matt J 2015-11-5
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 2015-11-6
编辑:Torsten 2015-11-6
Note that the diagonal of the matrix rho has to be set to 1.
Best wishes
Torsten.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by