Skip to content

a problem with stockPortfolio without short selling

1 message · Alec Schmidt

#
Hi,
Here is my script:
So far, so good... Then I do the same without short selling:
... and get an error message: "Error in model$COV[these, these] : 
incorrect number of dimensions"

Note that covariances of modelS and modelL are equal:
[,1] [,2] [,3] [,4]
[1,] TRUE TRUE TRUE TRUE
[2,] TRUE TRUE TRUE TRUE
[3,] TRUE TRUE TRUE TRUE
[4,] TRUE TRUE TRUE TRUE


Thanks! Alec