Back to Community
Stochastic will work for 1 stock, but not in for-loop

I am doing some research on stocks, and trying to improve my python code. I created a stochastic oscillator for one stock, and now I am trying to do it for a universe of stocks. When I try to do the rolling max, I cannot get values, I only get NAN. I am not sure if I am supposed to reference my object somehow in the for loop.

Thanks in advance,


Loading notebook preview...
Notebook previews are currently unavailable.