Refine the results by GA to true values

1 view (last 30 days)
Khoo
Khoo on 23 Aug 2013
I am currently using GA optimization toolbox.
My true values to generate my dataset is, say like [0.4 0.5 0.6],
after i run my simulation, it gives me [0.9, 3.5 0.2],
What to do in order to obtain the result near to my true values?
  2 Comments
Walter Roberson
Walter Roberson on 23 Aug 2013
Could you show a bit of your code?
Khoo
Khoo on 23 Aug 2013
This is my constrained function file:
function [c,ceq]=nonlincon(z)
c=z(3)*exp(z(2)*(1-z(1)))-1;
ceq=[];
this is my main file
for iter=1:iterate
z=[0.3 0.5 0.4];
options=gaoptimset('TolFun',1.0000e- 008,'Display','iter','UseParallel','always','InitialPopulation',z);
h=@mptest;
contraint=@nonlincon;
est=ga(h,3,[],[],[],[],[0 0 0],[1.0 10.0 1.0],contraint,options);
sumest=sumest+est;
SE=(est-z).^2;
sumSE=sumSE+SE;
fprintf('Iteration= %1.0i\n',iter);
end
I am doing the monte carlo simulation. Is that possible to find the estimated parameters near the initial point?

Sign in to comment.

Answers (0)

Categories

Find more on Portfolio Optimization and Asset Allocation 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!