My investment hypothesis is based upon the paper “market intraday momentum” from Lei Gao, Yufeng Han, Sophia Zhengzi Li and Guofu Zhou (2017 version), which documented the intraday momentum pattern: the first half hour return on the market since the previous day’s market close predicts the last half-hour return; the predictability, both statistically and economically significant, is stronger on more volatile days, on higher volume days, on recession days, and on major macroeconomic news release days. The paper presented that the first half hour return and the second to last half hour return are independent and complementary in forecasting the last half-hour return.
However, from the regression model I did in the Quantopian notebook. The first half hour return is statistically insignificant. So I change my backtesting model’s investment hypothesis from “if the 1st and second to last return are both positive, then buy the stock 35 minutes before the market close and sell it 5 minutes before the market close; if the 1st and second to last return are both negative, then short sell the stock 35 minutes before the market close and buy it back 5 minutes before the market close.” to “if the second to last return is positive, then buy the stock 35 minutes before the market close and sell it 5 minutes before the market close; vice versa.” The result seems much better than the previous hypothesis.
The normal trading hours in the United States begin at 9:30 am and end at 4pm. I do the regression from 2002-1-2 to 2013-12-31 because the Quantopian can only start from 2002. The paper’s time span is from 1993-2-1 to 2013-12-31 because the TAQ data from WRDS is available only until December 2014 as of June 2017. The tradable SPY, the most actively traded ETF that tracks the S&P 500 is used for trading for simplicity. For the backtesting, I did it for two periods: from 2002.1.2 to 2013.12.31 and from 2013.12.31 to 2019.7.31.