I believe to have answered my own question.
I created a new, separate script for the function. I then called the function with the command "type infoRatioTargetReturn.m' with the remaining code (starting at "objFun...").
Now it looks like: type infoRatioTargetReturn.m objFun = @(targetReturn) -infoRatioTargetReturn(targetReturn, pAct); options = optimset('TolX', 1.0e-8); [optPortRetn, ~, exitflag] = fminbnd(objFun, 0, max(portRetnAct), options); [optInfoRatio, optWts] = infoRatioTargetReturn(optPortRetn, pAct); optPortRisk = estimatePortRisk(pAct, optWts)
I was able to get a value for the optPortRisk and continue with the example.
Best Answer