Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
looking for help with maximizealpha

Hello,

I'm trying to use opt.maximizealpha(alpha) in my model but whenever the alpha signal includes negative numbers it throws the error "cannot convert NA to integer"

does anyone know what I'm doing wrong? does the alpha signal simply not accept negative numbers? and if so, how does one have a dollar neutral algorithm with it?

1 response

It definitely accepts negative values. Sounds like you might have NaNs in your factor though, which I don't think the optimizer accepts. Try either dropping the NaN (factor.dropna()) or fill with a neutral value.