Inserting options in plotFrontier function
Ältere Kommentare anzeigen
Matlab's Financial toolbox's built in function plotFrontier has two arguments in it: object and weights. Its easy to implement. However, I am trying to change color and style of plot. But it seems harder than I thought. We can use the following simulated data for illustration.
mu=[0.005674, 0.003283 , 0.0003174 , 0.0002323 , 0.0006188, 0.0006223];
sigma=[1.0000 , 0.1541 , 0.1816, 0.0985, 0.1827 , 0.1876;
0.1541 , 1.0000 , 0.2327 , 0.0457 , 0.1485 , 0.2548;
0.1816, 0.2327 , 1.0000 , -0.0017 , 0.2217 , 0.2643;
0.0985 , 0.0457 , -0.0017 , 1.0000 , 0.0539 , 0.0161;
0.1827 , 0.1485 , 0.2217 , 0.0539 , 1.0000 , 0.3191;
0.1876 , 0.2548 , 0.2643 , 0.0161 , 0.3191 , 1.0000];
returns= mvnrnd(mu,sigma,1000);
p=Portfolio;
meanmat=mean(returns);
varmat= cov(returns);
p=Portfolio(p,'assetmean',meanmat,'assetcovar',varmat);
p= Portfolio(p, 'lowerbudget', 1, 'upperbudget', 1);
p= Portfolio(p, 'lowerbound', 0);
wts = estimateFrontier(p, 100);
plotFrontier(p, wts )
I want to change default color and style of the line used in plot. Any help is greatly appreciated.
Thank you in advance.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Exploration and Visualization finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

