Skip to content
Prev 7413 / 15274 Next

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

Krishna has a good point.  Getting the
variance matrix to be barely positive
definite is still not a good thing for
optimization.

An eigenvalue that is essentially zero
says that there is a portfolio that is
essentially riskless.  And we haven't
had any of those since subprime mortgages
fell out of favor.

As Krishna says a factor model will give
you a better result.  A good (possibly
better) alternative is a Ledoit-Wolf
shrinkage estimate.

Functions to estimate either of those are
in the 'BurStFin' package which still hasn't
arrived in CRAN.  But you can get it with:

install.packages('BurStFin', repos="http://www.burns-stat.com/R")


The 'tawny' package has a function for
Ledoit-Wolf.
On 29/01/2011 21:32, krishna wrote: