research: a 200-day SMA filter on the daily turtle -- no arm distinguishable from the baseline (#830) - #833
Merged
Merged
Conversation
…kout (#830) trend_filter in {off, above, slope, both} gates entries on a simple moving average of trend_sma_period closes (default 200): the close above it, the SMA rising over trend_slope_lookback bars (default 5), or both. Default off: every existing rule behaves exactly as before. Too little history to compute the SMA declines the entry (trend_filter_history) rather than passing it, so a filtered arm never trades a bar its filter did not see. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ily turtle (#830) The driver's docstring is the pre-registration: four arms (off, above, slope, both) at 200/5, the daily paper rule set, the 2026-09-26 window, a common eligibility window for every arm, the cluster-bootstrap difference interval, the N>=100 floor, the decision rule, and the expectation -- committed before any arm has been run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d back Two write-side gaps in _validate_summary, found recording #830. A non-numeric string (a verdict, an arm name) is decoded as a Decimal by read_trials and raises, making the append-only ledger unreadable from that row on. A float is hashed as a JSON number but read back as a Decimal, so verify_chain reports the row as tampered forever. Both are now refused at append time, with a test each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rm distinguishable from the baseline (#830) Pre-registered (696bc5b, before the run). On a common window, off: 202 trades +0.270 R; above 181 +0.218 R; slope and both 121 at ~+0.41 R, 95% difference intervals ~[-0.52, +0.83]. No lower bound above zero, so under the pre-registered rule nothing goes to walk-forward. Four ablation rows appended to the trials ledger (diagnostic_only, a priori, R series). Co-Authored-By: Claude Opus 5.5 <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.
Closes #830.
Four commits, in the order that matters:
d5e1485feat(strategy): an optionaltrend_filteronturtle_breakout(off|above|slope|both,trend_sma_period200,trend_slope_lookback5).off, so every existing rule behaves exactly as before.trend_filter_history) rather than letting it through.696bc5bThe pre-registration. The driver's docstring holds the arms, data, window, statistics, decision rule and my expectation. It was pushed at 00:39 UTC before any arm ran.37cc6acfix(research): the trials ledger now refuses two kinds of summary value it could never read back:verify_chainreports it as tampered forever.Both were found when the first run's four rows failed to read back. Those rows were never committed. One test each.
8604e80The record, data and four ledger rows (ablation,a_priori,diagnostic_only, with R series).Result (1.20% taker plus per-product slippage, in R, common window)
off, 95% CI (cluster bootstrap by entry day)offaboveslopebothPre-registered verdict: no arm is promising. Every arm clears the 100-trade floor, and no lower bound is above zero, so nothing goes to walk-forward.
slopeandbothpoint the hypothesised way, but inside an interval about 1.3 R wide.abovebarely binds and does slightly worse.Honesty notes
params).git diff 696bc5b -- docs/experiments/2026-09-27-turtle-sma200-filter.pyshows every line.above, not the 40–60% I predicted.Verification
mypy,ruff checkandruff format --checkare clean.verify_chainon the tracked ledger: 98 rows, no problems.🤖 Generated with Claude Code