docs(readme): the cost-distortion finding, rendered from the ledger (#646) - #688
Merged
Conversation
…646) #646 asks the README to lead with the fee-drag benchmark. The table half shipped already; this is the finding that came out of measuring it properly. WHAT IT SAYS. Every backtest here used to price fills at the FLOOR of keel's own slippage model -- the best case the model can produce, reached only at a $500M/day anchor -- and 0 of 24 assets reach it. Re-pricing per product moved the median profit factor across 120 cells from 0.309 to 0.219. That 0.090 correction is 2.7x the +0.033 the best strategy change ever bought. WHAT IT DELIBERATELY DOES NOT SAY. Nothing about any other framework. The temptation was a headline framing crypto backtesting generally as living on fantasy friction assumptions; we have not measured anyone else's defaults, and an unsourced claim about a named third party is the exact failure this section exists to avoid making about ourselves. #646 forbids competitor naming in the asset on trademark grounds; the stronger reason is that the finding needs no help. A test asserts six framework names are absent and that the scope sentence is present. THE HEADLINE IS NARROWER THAN THE ONE PROPOSED. "Strategy optimization is irrelevant under flat slippage assumptions" generalises from one comparison on one universe at one venue. What is written instead -- "we mis-priced our own execution by more than any strategy change we ever made" -- is checkable line by line, and is the more damaging claim precisely because it is about us. The 2.7x is DERIVED at render time from two separate hash-chained ledger rows, not typed. A literal would survive either number changing underneath it, which is exactly the trap a headline ratio sets. Two rendering bugs the tests caught, both invisible in the source and obvious on the page: `textwrap` broke the source link mid-URL so it rendered as literal text, and a blank line after every paragraph turned one four-row table into four one-row tables. Tests: `tests/test_fee_reality_block.py` (+6). 6 mutants, 6 killed -- a hardcoded ratio, a dropped scope disclaimer, a named competitor, a hand-edited README number, a wrapped link, and a split table. STILL OPEN on #646: the terminal capture. The issue also asks for a ~10-second GIF of a real run with committed generation tooling; that is unbuilt and the issue stays open for it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NzuKAe2RVrPt9acVAWjRyL
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.
The README already leads with the fee-drag table (shipped earlier). This adds the finding that came out of measuring it properly.
What it says
Every backtest here used to price fills at the floor of keel's own slippage model — the best case the model can produce, reached only at a $500M/day anchor. 0 of 24 assets reach it. Re-pricing per product moved the median profit factor across 120 cells from 0.309 → 0.219.
2.7× — derived at render time from two separate hash-chained ledger rows, not typed. A literal would survive either number changing underneath it, which is exactly the trap a headline ratio sets, and a test asserts the ratio is computed.
What it deliberately does not say
Nothing about any other framework.
The tempting version of this section framed crypto backtesting generally as living on fantasy friction assumptions. We have not measured anyone else's defaults, and an unsourced claim about a named third party is the exact failure this section exists to avoid making about ourselves. #646 forbids competitor naming in the asset on trademark grounds; the stronger reason is that the finding needs no help.
A test asserts six framework names are absent and that the scope sentence — "keel mis-pricing keel, on one venue" — is present.
The headline is narrower than proposed
"Strategy optimization is irrelevant under flat slippage assumptions" generalises from one comparison, one universe, one venue. What's written instead — "we mis-priced our own execution by more than any strategy change we ever made" — is checkable line by line, and is the more damaging claim precisely because it's about us.
Two rendering bugs the tests caught
Both invisible in the source, both obvious on the page:
textwrapbroke the source link mid-URL, so it rendered as literal text.Verification
Tests:
tests/test_fee_reality_block.py(+6, 16 total).6 mutants, 6 killed: a hardcoded ratio, a dropped scope disclaimer, a named competitor, a hand-edited README number, a wrapped link, a split table.
Full suite 5253 passed / 3 skipped; ruff and mypy clean.
Regenerate with
python scripts/render_fee_reality.py --write; the drift pin fails if the README and the ledger disagree.