I am trying to add a factor to a pipeline that requires multiple days of data in a row, I can achieve it outside of pipeline using data.history and then performing a calculation with that data, but is there a way to do something like this in the pipeline.
import pandas as pd
context.lookback = data.history(context.security_list, 'price', 7, '1d')
df = context.lookback
df['price_calculated'] = df['price_calculated'].rolling(5).sum()