Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Use data.history to extract price for certain period of time

Hi ppl,

Basically I'm converting from Research to IDE

In research,
price = get_pricing([s1,s2], fields='close_price', start_date= str_date, end_date = ref_date).dropna()

How do I achieve the same result in the IDE using data.history?

1 response

Use data.history, for example, data.history(context.security_list, 'open', context.lookback, '1d')