Skip to content
Prev 7411 / 15274 Next

portfolio.optim and error in solve.QP: matrix D not positive definite

Hello everybody,

sorry for my delayed "thanks" note - I was travelling.

@Arun: Debugging the underlying code is a little bit difficult since
the optimizer was written in FORTRAN. I think going for the nearest PD
(as Krishna also suggested) might be the best way. However, I honestly
don't understand why it is not PD... Does anybody have an explanation
for that?
@Guy: The weird thing is that I got the error code without the t(x) in
the first place. t(x) solved the problem (for some assets) and the
result indicated that it took a look at the assets and not the
observations... I am going to give it a try with the covariance matrix
again and let you know if it worked out... strange though.
@Krishna: Thanks for your link! I think that really helps... I am
going to try it out! Do you have an explanation why this is a common
problem with a large number of assets?

Thank you! Have a nice weekend!

Lui
On Fri, Jan 28, 2011 at 3:51 PM, krishna <kriskumar at earthlink.net> wrote: