Hello Peter,
I think I see your point. In the attached backtest, I jotted down the SPY closing price for 4-10, and then ran the backtest, starting 4-11. The SPY return for 4-11 is 0.32% whereas the benchmark return is 0.4%. On https://www.quantopian.com/faq it states "The benchmark is an ETF designed to match the S&P 500." Is the ETF SPY? If so, why don't the returns match exactly?
I think that you are pointing out that for the example above, starting the benchmarking on 4-11 doesn't make sense, since the earliest an order can be submitted is 4-11, to be filled on 4-12 at closing. The earliest the position could be closed out would be 4-15 at closing. So, it seems that the earliest a gain/loss could be realized would be 4-15, right?
To be consistent with the trading, it seems that the benchmark should start two trading days after the start of the backtest (two minutes, when running on minute data). In the example, it would start on 4-15, using the 4-12 and 4-15 closing prices to compute the benchmark return for the first day when a gain/loss could be realized in trading.
Or am I missing something here?
Grant