Need help understanding example "Porfolio Optimization Against a Benchmark" Step 5

I am working through a Mathworks example (link below) and am now stuck on Step 5 of 7. I am creating a function, but in the example, there is no end point. I am also not understanding what the 'targetReturn' and 'portObj' are supposed to be. I am following the example word for word. Any help on this section will be greatly appreciated!
P.S. I am extremely new to matlab, please be kind

 采纳的回答

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.

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Portfolio Optimization and Asset Allocation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by