0
Q:

how to get the lowest price quantopian

def initialize(context):  
   schedule_function(ohlcv, date_rules.week_end())  
   context.stock = sid(24)  #AAPL  
def handle_data(context,data):  
    pass

def ohlcv(context,data):  
    weekly_high = max(history(5, '1d', 'high'))  
    weekly_low = min(history(5, '1d', 'low'))  
    close_prices = history(5, '1d', 'price')  #gives close price for the last 5 days for all stocks in the algo  
0

New to Communities?

Join the community