Skip to content
Prev 274013 / 398506 Next

Rolling optimization

Not having played with portfolio.opim() much, I can't guarantee this
will fix it, but if it requires a matrix rather than a vector and you
are sure about the rest of the syntax, this might do the trick:

asset_forecast[i, , drop = FALSE]

This is because:

R> x = matrix(1:9, 3)
R> is.matrix(x[,1])
FALSE
R> is.matrix(x[,1,drop=FALSE])
TRUE

Michael
On Mon, Oct 10, 2011 at 9:33 PM, Darius H <xenon99 at hotmail.com> wrote: