Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Disregard this post - found solution, can't delete post

Hi - please pardon my naivete here - up til now I've been analyzing individual stocks using data from yahoo where Open, High, Low, Close, and Volume are imported right into my dataframe as separate columns. I'm now trying to replicate my work on a quantopian notebook but can't find any tutorials or info on how to do what should be extremely straight forward - pulling OHLC and Volume for a single symbol straight into a dataframe. Can anyone point me to some sample code or tutorials where I can learn this basic step?

Thank you.

Solution:

import pandas as pd
import quantopian.research as qr

ts_start = pd.Timestamp('2018-4-1 09:30:00-05:00')
ts_end = pd.Timestamp('2019-4-27 10:31:00-05:00')

pricing_df = qr.get_pricing('SPY', start_date=ts_start, end_date=ts_end, frequency='minute',
fields=['open_price', 'high', 'low', 'close_price', 'volume'])

pricing_df