Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Applying TA-Lib BBANDS to a DataFrame

It's not entirely clear to me how to apply the TA-Lib BBANDS function to a DataFrame obtained from the history() call.

Right now I have the following:

upper_band, _, lower_band = talib.BBANDS(  
    prices[sec], timeperiod = 10,  
    nbdevup = 2, nbdevdn = 2,  
    matype = 0)  

How would I go about applying the function to all of prices at once?

1 response

This should be along the lines of what you are trying to accomplish.