Skip to content

docs(spec): accumulation policy -- value averaging and band rebalancing vs static DCA (#831) - #834

Merged
eaitbrahim merged 2 commits into
mainfrom
docs/spec-accumulation-policy
Sep 27, 2026
Merged

eaitbrahim merged 2 commits into
mainfrom
docs/spec-accumulation-policy

Conversation

@eaitbrahim

@eaitbrahim eaitbrahim commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Refs #831. A draft for review. No code and no simulation until it's approved. Merging this PR is the approval; comments or edits here are the review.

docs/superpowers/specs/2026-09-27-accumulation-policy-design.md covers:

  • The formulas.
    • Bounded value averaging: ΔC = clamp(w·D·t − H, C_min·w·D, C_max·w·D), with a zero-growth target path, buy-only, and C_max = 3.
    • Contribution steering: the monthly deposit goes to underweight assets first; it never sells.
    • Band rebalancing: a ±15% band relative to each target weight, checked monthly, trimming and topping up back to target.
  • The account model every arm shares.
    • Deposits: identical $500 monthly deposits. Idle cash earns nothing, consistent with the fiqh constraints.
    • Fees: modelled the way this account is actually billed. Buys are fee-free up to the $500/month Basic allowance; sells always pay the 1.20% taker fee. A flat-taker sensitivity run sits beside it.
  • Harness requirements.
    • A new pure allocator module, separate from portfolio_sim.
    • Static DCA must reproduce dca_into_allowlist exactly, as the oracle for the whole harness.
    • Tests come first.
  • Rails. This phase is simulation only. The spec records what a live version would hit. Most notably, sell_only_on_rule requires a rule_kind on every sale, so rebalancing trims need a policy decision. The two buy-only arms avoid that question entirely.
  • The prior it has to answer. The knowledge base (§51) calls fixed-weight rebalancing the wrong paradigm here, because correlated crypto offers little dispersion to harvest. The spec sharpens the hypothesis: any rebalancing benefit should come through PAXG, the one low-correlation leg.

Revision 2 (from review): selective trimming in arm D, a ±1.5-point band floor for the small sleeves, and 20- and 60-day bootstrap blocks reported side by side, with the decision rule required to hold under both.

Decisions for you (§9)

# Decision Proposed
D1 Universe and window PAXG's Coinbase history starts in May 2025, so: a 5-year PAXG-free primary run plus a 1.4-year with-PAXG secondary run
D2 Monthly deposit $500
D3 Fee model allowance-aware, plus a flat-taker sensitivity run
D4 Value averaging C_min 0, C_max 3, g = 0
D5 Band and trimming max(0.15·w_i, 0.015), monthly; selective: trim only upper-band breaches, proceeds to underweights
D6 Decision rule P(ΔSortino > 0) ≥ 0.95 and median Δmax-drawdown not worse, under both 20- and 60-day bootstrap blocks

Once D1–D6 are settled, §3–§8 become the driver's pre-registered docstring, committed before any run, exactly as for #830.

🤖 Generated with Claude Code

…ebalancing vs static DCA (#831)

Draft for review; no code or run until approved. Declares the account
model (equal $500 monthly deposits, idle cash earns nothing,
allowance-aware fees: buys free to $500/month, sells always at taker),
four arms with every parameter stated, the rails a live version would
meet (sell_only_on_rule for trims), the KB section 51 prior against
fixed-weight rebalancing, and six decisions (D1-D6) for the review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eaitbrahim eaitbrahim added research Measurement, validation or KB work (Research & validation) docs Documentation (Docs, CI & tooling) labels Sep 27, 2026
…strap block lengths (#831)

Arm D trims only assets above their upper band, down to target, and
redeploys the proceeds to underweights by shortfall; a lower-band breach
alone triggers no trade. The band is max(0.15 w_i, 0.015), so the 6%
sleeves trade on a 4.5-7.5% corridor, not on noise. The bootstrap reports
20- and 60-day blocks side by side, and the decision rule must hold under
both, so the block length cannot be chosen after the fact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eaitbrahim
eaitbrahim merged commit 844dd4c into main Sep 27, 2026
1 check passed
@eaitbrahim
eaitbrahim deleted the docs/spec-accumulation-policy branch September 27, 2026 01:43
eaitbrahim added a commit that referenced this pull request Sep 27, 2026
…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>
eaitbrahim added a commit that referenced this pull request Sep 27, 2026
…831) (#835)

* feat(sim): accumulation-policy harness -- four allocators, allowance-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>

* docs(experiments): pre-register the accumulation-policy experiment -- 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>

* docs(experiments): accumulation policy after fees -- no arm beats static 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>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation (Docs, CI & tooling) research Measurement, validation or KB work (Research & validation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant