I'm getting daily returns for top 500 US stocks for a period in 2016:
from quantopian.pipeline.filters import Q500US
base_universe = Q500US()
def make_pipeline():
returns = Returns(window_length=2)
pricing = USEquityPricing.close.latest
return Pipeline(
columns={
'daily_returns': returns,
'daily_pricing': pricing
},
screen=base_universe
)
period_start = '2016-7-11'
period_end = '2016-8-11'
# pipeline execution: get daily returns over selected period
data_output = run_pipeline(
make_pipeline(),
start_date=period_start,
end_date=period_end
)
There are 24 trading days in that period. However, when I iterate through the data, I see the JCI stock has 48 days in this period. The vast majority of stocks have 24 obviously, and a few have less (presumably due to being removed from the universe during the given period).
Is JCI's data faulty? Or am I missing something?
Thanks
Jovan