I Ran All 83 Phases of the Clock. Here's Where $9,870 Sits.
The short version. #26 ended with a promise: run the 83-bar grid at offsets 20 and 62 and trace the phase curve. Then Kamal pointed out the sharper version in #25's comments — one offset is a second draw; the decisive test is the full phase distribution. So I ran all of it: every offset of the 83-bar grid (83 phases) and every offset of the 121-bar grid (121 phases), fee on and fee off — 408 runs, same script, same exits, same $10,000, same 4,252 bars. In our testing:
- The $9,870 clock was a top-3% phase. #24's clock sits at the 97.6th percentile of its own grid's distribution — 81 of 83 phases below it, +2.25 standard deviations from the grid mean. #26's shifted clock is at the 90.4th percentile. #25's count-matched clock is at the 71.9th percentile of its grid — inside the interquartile range, an ordinary phase.
- The typical clock is worth about $1,245, not $9,870. The 83-grid median is +$1,244.58 (mean +$2,347.29, SD $3,347.27); the 121-grid median is +$1,541.57 (mean +$1,513.01, SD $1,973.84). Three in four phases end positive on both grids — and three in five beat the RSI. The grid has something; the phase decides how much of it you keep, and #24 kept nearly all of it.
- The top of the distribution is one event, not six confirmations. The six best 83-grid phases are consecutive — 77, 78, 79, 80, 81, 82 — and they all bought the COVID-low rebound within days of each other. The best phase made +$16,039.21, and $4,665.89 of it is a single trade entered on the COVID-low day itself. Adjacent phases share nearly every holding period, so the distribution's effective sample size is far smaller than 83.
The contract: two questions, chosen before I looked
Two questions, both from readers, both printed before this run existed. Kamal's, from #25's comments: "a single offset is just a second draw — the decisive version is the full phase distribution, all 83 offsets and all 121 offsets, with each tested grid placed in its own distribution and the percentile pre-registered." Shashank's, from #26's comments: "twenty seeds give a fairly coarse percentile — do you plan to run a few hundred seeds to see where the shifted clock really sits?" This post is the answer to both: not more placebo seeds, but the full phase distribution — 83 phases on one grid, 121 on the other — so every clock in the series can be placed inside a distribution instead of beside a single number. The headline was pre-registered with the community officer on 2026-12-02: distribution vs distribution (median vs median + overlap), #24's percentile as the second number, per-bar-in-market dollars in the method box. The rules were fixed before I ran anything:
-
Same script, same exits. The #22 policy-A script, entry swapped only:
longSignal = bar_index >= k and bar_index % G == k, G = 83 (k = 0..82) or 121 (k = 0..120), 2×ATR stop from the entry average price, trailing stop at highest close minus 2×ATR, 100% of equity, market orders, policy A drop, 0.1% round-trip fee, $10,000 starting equity, patched PyneCore runtime. All 408 scripts compiled with zero diagnostics; each fee/no-fee pair differs in title + commission_value only. - Signal counts, computed before the run, not from the trade files after. On 4,252 bars the 83-grid fires 52 signals for phases 0–18 and 51 for phases 19–82 (4,252 = 51×83 + 19); the 121-grid fires 36 signals for phases 0–16 and 35 for phases 17–120 (4,252 = 35×121 + 17). The one-signal difference between phases is a grid boundary effect, stated here so nobody mistakes it for a trade-count effect later.
- Same data, same placebo. 4,252 bars of S&P 500 daily, 2010-01-04 to 2026-11-27 (Yahoo Finance ^GSPC), the same file #24 used. The placebo distribution is #24's twenty seeds, reused unchanged (fee mean +$1,169.48, SD $1,621.21, median +$851.22; no-fee mean +$1,462.11, SD $1,612.99, median +$1,114.75).
- Fee on and fee off, both. Each phase lands in its matching distribution, and the no-fee run is the shape check on the fee run.
One note on method, borrowed from a post I read this week: AlphaForge's rule is that a backtest without out-of-sample validation is "just curve-fitting with extra steps," and its honesty mechanism is walk-forward — train in-sample, test out-of-sample, require a majority of windows positive. I have no walk-forward here; what I have instead is the phase distribution, which is the same device pointed at a different question. A single phase is an in-sample draw. All 83 phases are the out-of-sample check on that draw: if #24's clock were the grid, every phase would look like it. They don't.
Probe 1: the two distributions
Closed trades only (exit Signal != 'Open'), the convention #18–#26 used. Fee-on first — the headline:
| 83-grid (n = 83) | 121-grid (n = 121) | |
|---|---|---|
| Mean | +$2,347.29 | +$1,513.01 |
| SD | $3,347.27 | $1,973.84 |
| Median | +$1,244.58 | +$1,541.57 |
| Q1 … Q3 | $56.06 … $4,053.89 | −$43.63 … $2,933.53 |
| Range | −$2,267.57 … +$16,039.21 | −$2,518.70 … +$8,194.26 |
| Positive phases | 63 / 83 (75.9%) | 90 / 121 (74.4%) |
| Beat the RSI (+$1,029.36) | 49 / 83 (59.0%) | 70 / 121 (57.9%) |
| Beat the placebo median (+$851.22) | 50 / 83 (60.2%) | 73 / 121 (60.3%) |
| Beat the best placebo seed (+$3,673.34) | 24 / 83 (28.9%) | 16 / 121 (13.2%) |
| Per-bar-in-market $ (median phase) | $1.54 (Q1 $0.07 … $4.41) | $2.48 (Q1 −$0.08 … Q3 $4.45) |
The no-fee picture is the same shape: 83-grid median +$1,779.57 (mean +$2,920.39, SD $3,503.58, range −$1,990.02 … +$17,471.40, 71 / 83 positive); 121-grid median +$1,873.32 (mean +$1,897.95, SD $2,129.67, range −$2,258.69 … +$11,336.17, 98 / 121 positive). The fee drag is real but small next to the phase spread: on the 83-grid the fee moves the median by $535, while moving the phase moves it by $18,307.
Two readings, both pre-registered. First, the medians: the 121-grid median (+$1,541.57) is higher than the 83-grid median (+$1,244.58) in raw dollars — despite firing 35 signals against 51. The overlap says the same thing from the other side: 38 of 83 phases on the 83-grid beat the 121-grid median, and 66 of 121 phases on the 121-grid beat the 83-grid median (no-fee: 41 / 83 and 62 / 121). The two distributions overlap so heavily that on raw net you cannot tell the grids apart. Second, per bar in market — the comparison the design pre-registered, because the raw medians mix a trade-count effect into the grid effect: the median 83-grid phase earns $1.54 per bar it is in the market; the median 121-grid phase earns $2.48. Per unit of exposure, the wider grid's median phase earns more. The 83-grid's headline wins were bought with more time in the market (median phase ~20% in market vs ~14%), not with better dollars per bar.
Buy and hold, for scale, as in every post since #24: $10,000 into the index over the same window becomes $64,409.13 (+544.1%, a $54,409.13 profit). The best phase in either distribution — +$16,039.21 — is under a third of that profit. The median phase is about 2% of it. Both sentences are true, and the second one is the one that matters if you're choosing what to do with money.
Probe 2: where the three clocks sit — and the assumption that failed
The verdict table, fee-on:
| Distribution | Percentile | Distance from mean | Inside IQR? | Inside 1-SD band? | |
|---|---|---|---|---|---|
| Clock #24 (+$9,870.59) | 83-grid | 97.6% (81 / 83 below) | +2.25 SD | no | no |
| PS clock #26 (+$5,610.10) | 83-grid | 90.4% (75 / 83 below) | +0.97 SD | no | yes |
| EC clock #25 (+$2,719.03) | 121-grid | 71.9% (87 / 121 below) | +0.61 SD | yes | yes |
Read it plainly: the clock that opened this whole investigation was a top-3% draw from its own grid. Two phases in the entire distribution beat it (79 and 80). The shifted clock was a top-10% draw. The count-matched clock was an ordinary phase — 71.9th percentile, inside the interquartile range, +0.61 SD from its grid's mean. And the two offsets #26 pre-committed — 20 and 62, the quarter- and three-quarter-period points — landed at the 54.2nd percentile (+$1,633.36) and the 68.7th percentile (+$3,156.57). The pre-committed points are in the middle; the published clocks are at the top. That is the whole post in one paragraph.
Now the part I got wrong, because it matters more than the table. The design assumed phase 0 would reconstruct #24 minus its first trade: phase 0's first signal is bar 0 (entry bar 1), #24's first signal is bar 83, so phase 0 minus the bar-1 trade should equal #24. It doesn't. Phase 0 made +$9,238.06 against #24's +$9,870.59 — a gap of −$632.53 — and the gap decomposes exactly, trade by trade, into three parts:
| Part | Amount |
|---|---|
| The bar-1 trade itself (entry 2010-01-05, exit 14 bars later) | −$330.98 |
| Equity-path effect on 10 shared trades | −$179.08 |
| One extra trade phase 0 filled that #24 dropped (entry bar 2,242) | −$122.47 |
| Total | −$632.53 |
The middle part is the one worth understanding. Ten trades share entry bar and exit bar in both runs — same price move — and earn different money: the entry-167 trade made +$1,151.58 in phase 0 and +$1,295.53 in #24. The rule sizes at 100% of equity, so the early −$330.98 loss shrinks every later position by the same fraction; the same price move on a smaller position is less money. The third part is a policy-A drop: at signal 2,241 the fee version of #24 refused the fill (the same quantity cost more than the account held at the fill bar's open), while phase 0's run filled it — the no-fee version of #24 filled it too, which is why #24 fee closed 50 trades and no-fee closed 51. The 121-grid tells the same story in miniature: phase 0 made +$2,466.03 against #25's +$2,719.03, a gap of −$253.00 — the bar-1 trade (−$330.98) plus $77.99 of equity-path effect on two shared trades, no extra or missing trades.
The consequence is a correction to the design itself: #24 and #25 are not members of these distributions. They are the phase-0 grid with the bar-0 signal suppressed — and suppressing one signal changes the equity path, which changes every trade after it. Their percentiles above are "where the published clock would sit if you placed it against the distribution," not "where it sits in the distribution." I am reporting them anyway, because that placement is the question Kamal and Shashank asked — but the label matters, and the design file now carries the correction in full. The one clock that is a member is #26: phase 41, reproduced by this batch to the cent (+$5,610.10), so its 90.4th percentile needs no caveat at all.
Probe 3: the top of the distribution is one event
The 83-grid's top ten phases, in order: 80 (+$16,039.21), 79 (+$15,084.16), 81 (+$9,625.63), 82 (+$9,419.16), 0 (+$9,238.06), 78 (+$8,973.06), 77 (+$6,724.51), 41 (+$5,610.10), 30 (+$5,429.57), 19 (+$5,345.18). Six of the top seven are consecutive phases — 77 through 82. The 121-grid's top ten does the same thing: 88 (+$8,194.26), 90 (+$6,523.57), 86 (+$5,418.14), 89 (+$5,278.68), 95 (+$5,119.72), 94 (+$5,000.09), 87 (+$4,817.05), 41 (+$4,433.59), 39 (+$4,255.31), 40 (+$4,212.46) — five of the top seven inside 86–90.
Adjacent phases are not independent draws. Phase 80's signals are 80, 163, 246, …; phase 79's are 79, 162, 245, … — one bar apart, so the two grids hold nearly identical positions on nearly identical days. Their biggest trades are the same event: phase 80's biggest winner is +$4,665.89, entered bar 2,571 — 2020-03-23, the COVID-low day itself — and exited bar 2,628; phase 79's biggest is +$3,818.09, entered bar 2,570 (2020-03-20) and exited on the same bar 2,628. #24's clock bought three days after the low (+$2,834.82); phases 79–82 bought on and around the low itself. The top of the distribution is one rebound, sampled six times at one-bar intervals — not six confirmations of anything.
But the top is not only that trade, and the check matters. Take phase 80's biggest winner away and it still makes +$11,373.32 — third in the distribution. Take phase 88's biggest away (+$2,601.62, entry bar 3,840) and it still makes +$5,592.64 — third in its distribution. The COVID rebound decides who ranks first; it doesn't decide whether the grid is worth anything. The mechanism sentence for this post: phase decides how much, and one trade decides the ranking — but the grid's median phase still beats the dice, and it does that on both grids, with or without the fee.
The bottom of the distribution deserves one line too, because it is the honest mirror: the worst 83-grid phase is 57 (−$2,267.57, 49 trades, −$2.95 per bar in market); the worst 121-grid phase is 21 (−$2,518.70, 35 trades, −$5.95 per bar). Twenty phases on the 83-grid and thirty-one on the 121-grid lose money. Pick a phase blind and you lose a quarter of the time.
Probe 4: the shape check — no-fee says the same thing
The no-fee distributions, for the readers who will ask whether the fee is doing the work:
| 83-grid, no fee | 121-grid, no fee | |
|---|---|---|
| Mean | +$2,920.39 | +$1,897.95 |
| SD | $3,503.58 | $2,129.67 |
| Median | +$1,779.57 | +$1,873.32 |
| Q1 … Q3 | $500.42 … $4,772.01 | $319.27 … $3,439.35 |
| Range | −$1,990.02 … +$17,471.40 | −$2,258.69 … +$11,336.17 |
| Positive phases | 71 / 83 (85.5%) | 98 / 121 (81.0%) |
Same shape, same ordering, same overlap (41 / 83 above the other median; 62 / 121 the other way). The fee moves the medians by about $500; the phase moves them by $18,000. The fee is not the story. The phase is.
How I checked the numbers
The checks, so anyone can repeat them:
- Signal counts, before the run. Computed from the rule on 4,252 bars: 83-grid phases 0–18 fire 52 signals, 19–82 fire 51; 121-grid phases 0–16 fire 36, 17–120 fire 35. Every phase's closed-trade count in the trade files matches its signal count minus policy-A drops and minus any trade still open at the final bar — spot-checked on phases 0, 20, 41, 62, 80 (83-grid) and 0, 88 (121-grid).
- #26 reproduced exactly. Phase 41's compiled output differs from #26's script in the title only; its fee net is +$5,610.10, identical to #26's published value to the cent. The batch reproduces the series, it doesn't just resemble it.
- The phase-0 decomposition, trade by trade. Phase 0 fee vs #24 fee, matched on entry bar: 50 shared trades, 10 with different profits (same entry, same exit, different size — the equity-path effect, −$179.08 in total); one extra trade in phase 0 (entry 2,242, −$122.47); the bar-1 trade (−$330.98). The three parts sum to the −$632.53 gap exactly. The 121-grid decomposition was done the same way (−$253.00 = −$330.98 + $77.99, with a $0.01 rounding difference from per-trade 2-decimal rounding).
- Percentiles recomputed by hand. 83-grid: 81 of 83 nets below $9,870.59, 75 below $5,610.10; 121-grid: 87 of 121 below $2,719.03. Z-scores: (9,870.59 − 2,347.29) / 3,347.27 = +2.25; (5,610.10 − 2,347.29) / 3,347.27 = +0.97; (2,719.03 − 1,513.01) / 1,973.84 = +0.61.
- The COVID trades. Phase 80's biggest: entry bar 2,571 = 2020-03-23, exit bar 2,628; phase 79's: entry bar 2,570 = 2020-03-20, exit 2,628. Bar 2,570 is 2020-03-20 in SPX_daily.csv (open 2,431.94, low 2,295.56) — the crash week. Phase 80's net minus its biggest (+$11,373.32) and phase 88's (+$5,592.64) were recomputed from the trade files, and their ranks (3rd in each distribution) from the full sorted lists.
- Per-bar dollars. #24 $9.58/bar ($9,870.59 / 1,030 hold bars), #25 $3.91/bar ($2,719.03 / 695), #26 $5.94/bar ($5,610.10 / 944) — each recomputed from the raw trade files. Distribution per-bar medians ($1.54 and $2.48) are the medians of the per-phase per-bar values, not the median net divided by the median hold.
- Placebo reuse. #24's twenty-seed distribution, unchanged: fee mean +$1,169.48, SD $1,621.21, median +$851.22, max +$3,673.34; no-fee mean +$1,462.11, SD $1,612.99, median +$1,114.75, max +$4,164.39. All 408 scripts compiled with zero diagnostics.
What I couldn't verify
- Adjacent phases are correlated, so 83 is not the sample size. Phases 77–82 share nearly every holding period; the top six are one event sampled six times. The distribution's effective sample size is much smaller than 83 — closer to the number of distinct market episodes the grid can catch, which I have not counted. The percentiles are exact counts of phases, not confidence statements about the grid.
- One market, one window. Everything here is the S&P 500, 2010–2026, a market that rose 544%. The phase distribution on a flat or falling market would look different, and I have not run it. The CSI 300 version of this test is the obvious next market, not yet run.
- The exits are still untested as an edge. The phase distribution says the entry grid adds something given these exits — the median phase beats the dice on both grids. It doesn't say the exits have an edge: the mean phase is 6–8 standard errors from zero on this market, but that is the drift talking, and buy-and-hold's profit beats even the best phase by about 3.4×.
- Twenty placebo seeds, not fifty. The placebo bands are the same twenty seeds as #24. The phase distribution doesn't depend on them — the percentiles in Probe 2 are counts of phases, not of seeds — but the "beats the best seed" shares (24 / 83, 16 / 121) would move with more seeds.
- One fee level, one sizing rule. All fee-on runs carry the same 0.1% round trip and 100%-of-equity sizing, and the equity-path effect in Probe 2 is a property of that sizing, not of the grid. A fixed fractional size would change both the decomposition and the distribution.
- The pre-registration itself changed. #26's closing line promised offsets 20 and 62; this post ran the full distribution instead, on Kamal's suggestion, locked with the community officer on 2026-12-02. The promised offsets are inside the distribution (54.2nd and 68.7th percentiles) and are reported above — but the change of plan is stated here, not buried, because a pre-commitment you quietly upgrade is not a pre-commitment.
Bottom line
24's clock made $9,870.59, and for two posts the question was whether that was spacing or luck. Now there is a distribution to place it in, and the answer is both, in a proportion I can finally state: the 83-bar grid's median phase makes +$1,244.58 — the grid is worth something, about $1,245 of something, on a market that rose 544% — and #24's phase kept $9,870.59 of it, the 97.6th percentile, +2.25 standard deviations from the grid's mean. The shifted clock kept the 90.4th percentile. The count-matched clock kept an ordinary 71.9th. The two offsets #26 promised in advance landed in the middle, where most phases live. And the top of the distribution is one rebound in March 2020, sampled six times at one-bar intervals — which is why the percentiles are counts, not confidence, and why the next test has to be a different market, not a different phase. The form the exits impose survived a fifth time — the median phase on either grid still looks like a clock — but the money was never in the form. It was in the phase, and the phase was a draw.
Next post (#28): the clustered placebo — random entries drawn only from down days (RSI < 40), in 5-day blocks, 50 seeds. The uniform placebo is too easy a null: real entries cluster on selloff days, and the question is whether the clocks beat dice that are allowed to cluster too. If the median phase still beats a clustered placebo, the grid's edge survives a sharper null. If it doesn't, the edge was the clustering all along.
Disclosure: I built Pine2Py (pine2py.com), the Pine Script → Python converter this series runs on. The strategy in this post is a test script, not a recommendation; nothing here is investment advice, and past backtest results don't predict anything. Free accounts get 3 conversions total; Pro is $12/month via Paddle. The runs above used the patched PyneCore runtime build provided on the site (stock PyPI PyneCore is not supported). All numbers are from local runs on 2026-12-03, in our testing: 1,909 real-world scripts compile at 99.7% and fully translate at 98.4%.
Top comments (1)
You ran the exact test I asked for in #25 — and the answer is sharper than I expected. #24 sitting at the 97.6th percentile, +2.25 SD from its own grid's mean, is the headline: the clock that opened this whole series was a top-3% draw from its own distribution, not a representative phase.
The detail that changes how I read the whole distribution is the top six phases being consecutive (77–82) and all buying the COVID-low rebound within days of each other — with $4,665.89 of the best phase's +$16,039.21 coming from a single trade entered on the COVID-low day itself. Adjacent phases share nearly every holding period, so the effective sample size is far smaller than 83. One check that would make that explicit: cluster the 83 phases by how many entry dates they share, and report the effective n alongside the raw n. If the top 6 collapse into essentially one draw, the "distribution" is really a handful of independent bets, and the 97.6th percentile is a statement about one event, not 83.
The phase-0 vs #24 gap decomposing exactly (−$632.53 = −$330.98 bar-1 trade, −$179.08 equity path, one extra trade) is the kind of accounting that makes the rest of the numbers believable. And the pre-committed points landing mid-distribution (54.2nd, 68.7th) while the published clocks sit at the top is the whole story in one paragraph.