I am a student and new in R. I found many post about it, but didn't understand what to do with my data. I try to make a Box-Constrained Portfolio Frontier but get this error (it's incredible, but earlier I used to do this task on other assets, there was no such error)
> tail(ALIGNED)
GMT
ASBN FBPRP FBTT FCPB FCRGF FLWS FPAFF FQVLF MSFT PGQWF OPMZ VALE PIH USEL TURN
2018-02-16 20.55 22 32.9 7.95 16.62 11.00 0.70 16.50 92.00 0.08 2e-04 14.12 7.10 0.1901 1.78
2018-02-19 20.55 22 32.9 7.95 16.62 11.00 0.70 16.50 92.00 0.08 2e-04 14.12 7.10 0.1901 1.78
2018-02-20 20.14 22 32.9 7.95 16.62 11.35 0.67 16.31 92.72 0.08 1e-04 13.98 6.95 0.3020 1.87
2018-02-21 20.14 22 32.9 8.50 16.62 11.50 0.67 16.45 91.49 0.08 1e-04 13.66 6.90 0.3020 1.88
2018-02-22 20.14 22 32.9 8.50 16.62 11.95 0.67 16.36 91.73 0.08 1e-04 13.98 6.70 0.3020 1.90
2018-02-23 20.11 22 32.9 9.00 16.62 12.50 0.64 16.66 94.06 0.08 1e-04 14.20 6.65 0.3020 1.92
> class(ALIGNED)
[1] "timeSeries"
attr(,"package")
[1] "timeSeries"
boxSpec <- portfolioSpec()
setNFrontierPoints(boxSpec) <- 15
boxConstraints <- c("minW[1:15]=0.3", "maxW[1:15]=0.12")
boxFrontier <- portfolioFrontier(data = ALIGNED, spec = boxSpec, constraints = boxConstraints)
#Error in `colnames<-`(`*tmp*`, value = names(getMu(Data))) :
# attempt to set 'colnames' on an object with less than two dimensions