1

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)
Joshua Ulrich
  • 173,410
  • 32
  • 338
  • 418
Filipe Ferminiano
  • 8,373
  • 25
  • 104
  • 174

1 Answers1

2

You need to get the sources from R-Forge, which have this fixed:

http://r-forge.r-project.org/scm/?group_id=773

And you can build using these instructions Cannot install R-forge package using install.packages (changing where appropriate to DEoptim instead of returnanalytics)

Community
  • 1
  • 1
  • Can you explain a little more instead of providing just links. It is advised to add as much as information you can in your answer because links may be removed or may not wok due to some reasons. – Vikasdeep Singh Apr 13 '15 at 02:00
  • @VicJordan: the first link is to the source code. The second is to another StackOverflow question. I'm not sure what you want them to include in their answer... – Joshua Ulrich Jun 16 '15 at 12:27