Turn of the month on SPY self-test, 2026-11-04T09:48:20.360Z 1. Hand-worked months A. Jan->Feb: buy at the close of Thu 28 Jan (day -2), sell at the close of Wed 3 Feb (day +3); dividend 0.50 ex 2 Feb [ok] 3 complete turns in the file (Jan->Feb, Feb->Mar, Mar->Apr): 3 [ok] trade 1 2021-01-28 -> 2021-02-03, gross 4.4164% (hand 4.4164%), net minus 0.04 [ok] B. Feb->Mar: 2021-02-25 -> 2021-03-03 (day -2 Thu 25 Feb, day +3 Wed 3 Mar), gross 3.6036% [ok] C. Mar->Apr with holidays: day -1 is Tue 30 Mar (no 31 Mar), day +1 is Fri 2 Apr (no 1 Apr): 2021-03-29 -> 2021-04-06 [ok] the March turn is flagged as a quarter-end month [ok] reference identical on the hand months D. incomplete turns: a file starting on the last day of a month, or ending on day +2, does not trade that turn [ok] file from 29 Jan: first trade is the Feb->Mar turn (2021-02-25) [ok] file ending on day +3 of February: the Jan->Feb turn is traded [ok] file ending on day +2: not traded [ok] reference identical E. neighbouring windows on the hand months [ok] TOM -2..+3: 3 trades of 5 days, reference identical [ok] TOM -3..+3: 3 trades of 6 days, reference identical [ok] TOM -1..+2: 3 trades of 3 days, reference identical [ok] TOM -1..+4: 3 trades of 5 days, reference identical [ok] TOM -1..+1: 3 trades of 2 days, reference identical [ok] -3..+3 buys at the close of day -4 (Tue 26 Jan): 2021-01-26 F. equity: in SPY from each entry close to its exit close, cash in between (3.6% / 360 a calendar day), half the cost per fill [ok] equity at the close of 3 Mar 1.08330518 (hand 1.08330518) [ok] buy-and-hold 1.13281979 (hand 1.13281979) G. control: draws stay in the entry month and keep the length; drawing the real entries gives back the real trades [ok] identity draw = the real trades [ok] first-day draws: 26 Jan, 1 Feb, 1 Mar (the first file days of each entry month), 4 days each [ok] last-day draws keep the exit inside the file 2. Real data: engine against the independent reference 8489 days 1993-01-29 .. 2026-10-20; dividends 136; month-ends in the file 405 [ok] TOM: 404 trades, reference 404, identical [ok] TOM -2..+3: 404 trades, reference 404, identical [ok] TOM -3..+3: 404 trades, reference 404, identical [ok] TOM -1..+2: 404 trades, reference 404, identical [ok] TOM -1..+4: 404 trades, reference 404, identical [ok] TOM -1..+1: 404 trades, reference 404, identical [ok] first trade at the Feb->Mar 1993 turn (the Jan 1993 turn starts before the file): entry 1993-02-25 3. Control with the real entries drawn [ok] 404 control trades = the 404 real trades COUNTS ONLY: 404 trades (DEV 155, VAL 120, HOLDOUT 129); quarter-end turns 135 PASSED