this is part of the code from the tutorials.
now I want to do more by comparing the recent 20 days' mean_10.
how to get this data?
seems pipeline only gets mean_10 of yesterday.
Thanks.
def make_pipeline():
# Base universe set to the Q1500US.
base_universe = Q1500US()
# 10-day close price average.
mean_10 = SimpleMovingAverage(inputs=[USEquityPricing.close], window_length=10, mask=base_universe)
# 30-day close price average.
mean_30 = SimpleMovingAverage(inputs=[USEquityPricing.close], window_length=30, mask=base_universe)
percent_difference = (mean_10 - mean_30) / mean_30