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 日

1 投票

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 ExchangePortfolio 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