Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Calculate the volume average of a specific stock in pipeline


I've been trying to calculate the average volume of a stock in a pipeline but can't figure out how.

All I could find is data.history but it doesn't work in a pipeline.

I looked at the forum but didn't find anything that work in my case.

Any help would be greatly appreciated.


2 responses

If you're looking for a 200 SMA of an equities volume you can use the below:

SimpleMovingAverage(inputs=[USEquityPricing.volume], window_length=200)  

Thanks so much for the fast reply Daniel!

That's what I did for the moment, but I just wanted to create a 90-day avg volume to compare the data to Finviz or Yahoo finance and make sure my filter is accurate.