Stutzer index (stutzer performance ratio)

However, i'm going somewhere detrimentally wrong
I run this matlab file, with stutzer.xls just having 5 random returns
% x0 = [0]; % Starting guess
x0=1;
returns=xlsread('stutzer.xls','Sheet1','A1:A5');
% optimopt = optimset('LargeScale','off');
% optimopt = optimset('fminsearch');
% optimopt = optimset('algorithm','interior-point');
% optimopt.MaxIter=9000000;
% optimopt.MaxFunEvals=9000000;
% optimopt.TolFun=1e-6;
% optimopt.TolX=1e-6;
% optimopt.Display='final';
% optimopt.HessUpdate='bfgs';
% optimopt.Tolcon=1e-6;
% optimopt.Diagnostics='off';
[result] = fminunc(@objfun,x0,options);
% x = fminunc(@(x) objfun(x,returns),options)
% x = fminsearch(@(x) objfun(x,returns),options)
and the OBJfun is written here;
function f = objfun(x,returns)
for i=1:5
returns=xlsread('stutzer.xls','Sheet1','A1:A5');
Omega = (-log((1/100)*(exp((x*returns(i,1))))));
Omega(:,i)=Omega;
f = sum(Omega);
end
I however do not get any results :( What am i doing wrong?

댓글 수: 1

Comment out the
returns=xlsread('stutzer.xls','Sheet1','A1:A5');
in objfun() function.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2012년 8월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by