From: Anna Ziliani on
I am trying to do a portfolio optimization with real data from yahoo finance.

The portalloc function doesn't seems to work.
I tried with different assets. It always says :
??? Error using ==> portalloc
at 199
Unable to compute indifference
curve tangency portfolio.
From: Bob Taylor on
"Anna Ziliani" <bethelijah(a)infinito.it> wrote in message <i1q4r5$2a2$1(a)fred.mathworks.com>...
> I am trying to do a portfolio optimization with real data from yahoo finance.
>
> The portalloc function doesn't seems to work.
> I tried with different assets. It always says :
> ??? Error using ==> portalloc
> at 199
> Unable to compute indifference
> curve tangency portfolio.

Anna - This problem may occur if the risk-free rate is much lower than the efficient frontier formed from risky assets. Assuming everything is scaled correctly, the only thing I would suggest is to try different values (usually larger values) for the RiskAversion parameter in the calling sequence for the function portalloc.

Try doing this without outputs so you can see a plot of what is going on because you should be able to see a red line that is the tangent line to the efficient frontier. If, as I suspect might be the problem, you do not see this red line, the "tangency" portfolio is the minimum-risk portfolio on the efficient frontier (it might take a few iterations to find a RiskAversion value that gets you to this portfolio).

Hope this helps. - bob