research: accumulation policy after fees -- no arm beats static DCA (#831) - #835
Merged
Merged
Conversation
…aware account, joint stationary bootstrap, D6 rule (#831) Implements the approved design (docs/superpowers/specs/2026-09-27-accumulation-policy-design.md, revision 2) as a pure module, apart from portfolio_sim: static DCA, bounded buy-only value averaging, shortfall-steered DCA and DCA with selective upper-band trimming; an account loop with next-open fills, the monthly fee-free buy allowance (sells always taxed; a flat-taker mode), per-asset slippage and average-cost lots; a deposit-neutral TWR index; a stationary block bootstrap of joint daily rows; and the D6 verdict over both block lengths. Arm A reproduces benchmark.dca_into_allowlist to the cent under zero fees on gapless candles; the one divergence (next open vs same-day close) is pinned by its own test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… driver written, NOT yet run (#831) The driver's docstring is the pre-registration: spec §3-§8 frozen with D1-D6 settled, the expectation recorded, both runs (5-year PAXG-free primary to now_ts=1790455996; ~1.4-year with-PAXG secondary from PAXG's first cached daily bar), both fee modes, both bootstrap block lengths (20, 60; 2,000 paths; seed 831) and the D6 decision rule. No real candle has been run through it; it was smoke-tested only on synthetic candles in a throwaway database. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tic DCA (#831) Pre-registered (design #834; driver 4113ed0 pushed before the run, and unchanged since). On equal $500 monthly deposits with allowance-aware fees, over 5 years without PAXG and 1.4 years with it: no arm clears P(dSortino>0) >= 0.95 under both bootstrap block lengths. Band trimming leads the historical path by 13.5% but improves Sortino in only 36-43% of paths; value averaging is the most consistent at 58-61%. 16 ablation rows appended to the trials ledger. 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 #831. Implements the approved design (#834, revision 2).
Three commits, in the order that matters:
7a1e900feat(sim):keel/sim/accumulation_policy.py. Four allocators; an account with allowance-aware fees and average-cost lots; a joint stationary bootstrap; the D6 decision rule.dca_into_allowlistto the cent under zero fees on gapless candles. It fills at the next open where the benchmark fills at the close, as the design requires, and a second test pins that difference.4113ed0The pre-registration. The driver's docstring is the design's §3–§8, frozen. It was pushed at 02:04 UTC before the run.git diff 4113ed0 -- docs/experiments/2026-09-27-accumulation-policy.pyis empty: the driver hasn't changed since.bd18caeThe record, data and 16 ledger rows (ablation,a_priori,diagnostic_only; chain verified, 114 rows).Result (headline: 5 years without PAXG, allowance-aware fees, $30,500 deposited)
No arm is better than static DCA after fees, in either run or fee model.
Verification
mypyandruffare clean.verify_chainon the ledger: no problems.🤖 Generated with Claude Code