Target return computation

We will test predictions for various lookahead periods to identify the best holding periods that generate the best predictability, measured by the information coefficient. More specifically, we compute returns for 1, 5, 10, and 20 days using the built-in Returns function, resulting in over 50,000 observations for the universe of 100 stocks over two years (that include approximately 252 trading days each):

lookahead = [1, 5, 10, 20]
returns = run_pipeline(Pipeline({'Returns{}D'.format(i): Returns(inputs=[USEquityPricing.close],
window_length=i+1, mask=UNIVERSE) for i in lookahead},
screen=UNIVERSE),
start_date=START,
end_date=END)
return_cols = ['Returns{}D'.format(i) for i in lookahead]
returns.info()

MultiIndex: 50362 entries, (2014-01-02 00:00:00+00:00, Equity(24 [AAPL])) to (2015-12-31 00:00:00+00:00, Equity(47208 [GPRO]))
Data columns (total 4 columns):
Returns10D 50362 non-null float64
Returns1D 50362 non-null float64
Returns20D 50360 non-null float64
Returns5D 50362 non-null float64

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.165.66