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

 채택된 답변

Ashley Winter
Ashley Winter 2017년 2월 9일
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에 대해 자세히 알아보기

질문:

2017년 2월 8일

답변:

2017년 2월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by