docs(experiments): restate #252 and #255 on a production-faithful engine, and record why the defects were invisible - #261
Merged
Conversation
…ine, and record why the defects were invisible Both experiments re-run under #256 (pending setups no longer freeze the detector) and #258 (entries fill at the next bar's open, as production's market orders do). Same designs, same combinations, same fee grid and slippage pin -- only the engine differs. EVERY CONCLUSION SURVIVES EXCEPT ONE. ZEC-turtle no longer clears the maker line (1.034 -> 0.968), so #252 section 6's three-probe narrative describes a survivor the faithful engine never produces. The replacement is simpler and worse for the library: the viable quadrant is empty at every reachable fee -- 0 of 90 in #252, 0 of 82 in #255 -- with nothing needing three gates to die. #255 strengthens: the level shift across the trade floor widens from 1.1631 -> 0.8938 to 1.1251 -> 0.8396, gross-positive cells at the floor nearly halve (11/76 -> 6/82), and the 34x UNI-USD monotonicity anomaly that exposed both defects is structurally gone (3 assets -> 0). The two defects pushed in OPPOSITE directions -- #256 suppressed opportunity, #258 flattered execution -- so correcting both moved everything one way rather than adding noise: trade counts rose in 87 of 90, gross profit factors fell in 69 of 90. Arm B's transfer is restated on a single engine: 0.5770 in-sample vs 0.5427 out-of-sample, a gap of 0.034. #252's 0.6335 vs 0.6346 compared figures from one engine and was partly luck. The conclusion is unchanged -- the sweep winner is not overfit, it is stably unprofitable. Records the operational takeaway as section 5: NEITHER DEFECT WAS FOUND BY LOOKING FOR DEFECTS, and neither was findable by the means we had. 2,712 tests passed throughout. A frozen backtest and a highly selective strategy produce identical-looking output, so no summary ledger distinguishes them. The fix is invariants the engine reports about itself -- a dead-tail warning, intent-vs-fill divergence logging (#260), and cost anchored to output (#247, shipped, and the model for the rest) -- not more unit tests, which only assert behaviour someone already imagined. Annotates rather than rewrites, per the convention #247 set: the original numbers were real outputs of the code as it stood. Both documents keep their figures and carry a banner pointing here. Two ledger rows; chain verifies clean at 85. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both experiments re-run under #256 (pending setups no longer freeze the detector) and #258
(entries fill at the next bar's open, as production's market orders do). Same designs, same
combinations, same fee grid and slippage pin — only the engine differs.
Every conclusion survives except one
ZEC-
turtleno longer clears the maker line — 1.034 → 0.968. That collapses #252 §6'sarchitecture: its three-probe narrative (fee curve, tail-sensitivity, temporal — each catching what
the others miss, with ZEC as the through-line) describes a survivor the faithful engine never
produces.
The replacement is shorter and worse for the library: the viable quadrant is empty at every
reachable fee — 0 of 90 in #252, 0 of 82 in #255 — with nothing needing three gates to die. The
probes aren't worthless; they're repositioned from "what killed the last survivor" to
"forensics explaining an artifact a defective engine manufactured."
#255 strengthens: the level shift widens from 1.1631 → 0.8938 to 1.1251 → 0.8396,
gross-positive cells at the floor nearly halve (11/76 → 6/82), and the 34× UNI-USD monotonicity
anomaly that exposed both defects is structurally gone (3 assets → 0) — an independent check on
the fixes, not a restatement.
The two defects pushed opposite ways
#256suppressed opportunity;#258flattered execution. Correcting both didn't add noise— it moved everything one way:
Every prior conclusion in
docs/experiments/was measured on an engine simultaneously toopessimistic about how often a rule fires and too optimistic about what it pays to get in.
Arm B, restated on a single engine
#252 reported 0.6335 vs 0.6346 — a three-decimal agreement across one engine each, so partly
luck. Conclusion unchanged and now engine-consistent: the sweep winner is not overfit, it is
stably unprofitable.
§5 is the part worth reading
Neither defect was found by looking for defects, and neither was findable by the means we had.
2,712 tests passed throughout. #256 surfaced only from a 34× non-monotonicity visible because a
grid happened to sweep wide enough; #258 only from asking why #256's fix reduced trade counts.
The reason tests couldn't catch either generalises:
Adding tests doesn't fix that — a test asserts behaviour someone already imagined. The document
recommends invariants the engine reports about itself: a dead-tail warning (#256 had a
4.7-year dead tail in plain sight of every run), intent-vs-fill divergence logging (#260 — the
order row already stores both numbers and nothing compares them), and cost anchored to output
(#247, shipped, and the model for the rest).
Also corrected: a distinction that would have misled future work
pullback_continuation's median n doubled (58 → 124) when the market fill removed its offsetentry. That is not evidence offset entries generate alpha — both sides lose money gross
(0.9219 filtered, 0.7736 unfiltered). The filter separated bad from worse. §3.1 says so explicitly
so this dataset can't later be cited the other way.
Method
Annotates rather than rewrites, per the convention #247 set — "past numbers were real outputs
of the code as it stood; they are annotated by this change, not restated." Both documents keep
their figures and carry a banner pointing here, so each remains a true record of what its engine
produced.
Two ledger rows (
diagnostic_onlyfor the intersection restatement,rejectedfor the rsi grid,which decides against the rule);
verify_chainclean at 85. Both re-run harnesses committed.2711 passed, 1 skipped.
🤖 Generated with Claude Code