I'm trying to use DEoptim but I'm getting this error, following this instructions:
Warning: stack imbalance in '.Call', 13 then 12
Warning: stack imbalance in '<-', 11 then 10
This is my code
optOmega = function(x,ret,L)
{
retu = ret %*% x
obj = -Omega(retu,L=L,method="simple")
weight.penalty = 100*(1-sum(x))^2
return( obj + weight.penalty )
}
n.assets = 10
wmax = 1
lower = rep(0,n.assets)
upper = rep(wmax,n.assets)
r<- c(.1,.3,.4,.3,.02,.4,.7,.24,.3,.4)
r<-.5
res = DEoptim(optOmega,lower,upper,
control=list(NP=2000,itermax=1000,F=0.2,CR=0.8),
ret=coredata(r),L=0)