December 2018
Beginner to intermediate
684 pages
21h 9m
English
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 ...