[R] fPortfolio group constraint problem

이현열 leebisu at gmail.com
Fri Oct 28 10:30:37 CEST 2016


recently, I bought Portfolio optimization with R/Rmetrics
and i have some problem doing it (fPortfolio Package)



*group.1 = c("minsumW[ sec1 ] = 0.215688 " ,  "maxsumW[ sec1 ] = 0.3126 "
)  groupConstraints = c(group.1)  portfolioConstraints(ret, mv,
groupConstraints)*

it works, but




*x = 0.215688group.1 = c("minsumW[ sec1 ] = x " ,  "maxsumW[ sec1 ] =
0.3126 " )  groupConstraints = c(group.1)  portfolioConstraints(ret, mv,
groupConstraints)*

then, if i check the constraint, the error


*Warning message:NAs introduced by coercion*

I guess, if group constraint is not a numeric number, it cannot work.

How can i deal with it?
because group constraint level is different for backtest time, not a
constant numeric.

-- 

*이 현 열(Hyun-Yul Lee )*

Web : http://henryquant.blogspot.kr/

Mobile : +82 10 3057 0072

Email : *leebisu at gmail.com <leebisu at gmail.com>*

	[[alternative HTML version deleted]]



More information about the R-help mailing list