Hi, I'm new to quantopian. I am trying to
make_pipeline
with 5 minute level pricing for the close
calculating moving averages
in the Notebook environment. I am able to do that with get_pricing, frequency=minute and
resample
but not sure how to do that using a custom factor in the research environment for a pipeline.
I am trying to replicate the code below for customer factor for make_pipline in the research environment
data = get_pricing('MSFT', start_date='2017-1-1', end_date='2018-3-28', frequency='minute')
ohlc_dict = {'open_price' : 'first', 'high' : 'max', 'low' : 'min', 'close_price' : 'last', 'volume' : 'sum'}
data_5=data.resample('5Min').apply(ohlc_dict).dropna(how='any')
import numpy as np
data_5['ma_5'] = data_5['close_price'].rolling(window=5).mean()
data_5['ma_10'] = data_5['close_price'].rolling(window=10).mean()
data_5['ma_25'] = data_5['close_price'].rolling(window=25).mean()