How can calculate this formula?

I have a matrix of price time series (p1,p2...pn) and their weights w(1,n). How can calculate this formula?

Antworten (1)

Matt J
Matt J am 5 Nov. 2015
Bearbeitet: Matt J am 5 Nov. 2015

1 Stimme

v = w(:) .* sigma(:);
sigmaIndex = v.' * rho * v;

3 Kommentare

fede
fede am 5 Nov. 2015
I don't understand
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 am 6 Nov. 2015
Bearbeitet: Torsten am 6 Nov. 2015
Note that the diagonal of the matrix rho has to be set to 1.
Best wishes
Torsten.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Financial Toolbox finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 5 Nov. 2015

Bearbeitet:

am 6 Nov. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by