Code covered by the BSD License  

Highlights from
Developing a Financial Market Index Tracker using MATLAB OOP and Genetic Algorithms

Developing a Financial Market Index Tracker using MATLAB OOP and Genetic Algorithms

by

 

01 Aug 2008 (Updated )

Files used in the webinar of the same name

Batch_Run_Results.m
%% Batch Run Results

load BatchRunData
D = IndexFund.Dates;
figure('position',fpos,'numbertitle','off','name','Results of Batch Run');

plot(D,ValInd,'color','k','linewidth',2);
strs{1} = 'Index';

for ii = 1:numel(Val)
    if A(ii) == .001
        col = 'b';
    elseif A(ii) == .0050
        col = 'g';
    else
        col = 'r';
    end
    line(D,Val{ii}(:),'color',col);
    strs{ii+1} = ['N = ',sprintf('%2.2g',NN(ii)),...
        ', \alpha = ',sprintf('%2.2g',A(ii)),...
        ', \beta = ',sprintf('%2.2g',B(ii))];
end
title('Results of Batch run varying Number of stocks used (N) "Soft Target" (\alpha) and "Hard Target" (\beta)',...
    'fontsize',18);

datetick('x');

legend(strs,'location','sw');

Contact us