Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Can someone help me with a straight forward Trading Volume Formula?

Hi,

I am pretty new to this website, so my question may be pretty basic. I've attached a trading volume formula that is not working for some reason, Would anyone be able to help me get it up and running? I simply wan't to review the trading volume of a particular security for a few days in the past, printed in a straight forward grid format.

Any Assistance you could provide would be greatly appreciated!

3 responses

This may help you in the IDE:

def initialize(context):  
    schedule_function(volume_data, date_rules.every_day(), time_rules.market_close())

def volume_data(context, data):  
    securities = symbols('AAPL', 'MSFT', 'SPY')  
    Volume = data.history(securities, 'volume', 3, '1d')  
    print Volume  

Hi Vladimir!

Thanks for your code suggestion, however i am not getting any outputs when i attempt to run this code. When i enter this code in my notebook and run it, i do not receive any outputs or error messages, the only thing that happens is the number next to "In" outside the code textbox increases. Do you know why this maybe occuring?

This code is for the IDE. Try it there.