An auditable Shariah compliance engine for spot crypto trading — deterministic rails, attested screening, and a reference agent.
翻譯準備中
正在載入完整 README。 以下為已儲存的摘錄。
Website: keeltrading.com — the plain-English (and العربية, Français) tour: what keel is, how to start on paper, and the honest results.檢視完整 README ↗
English | العربية
Website: keeltrading.com — the plain-English (and العربية, Français) tour: what keel is, how to start on paper, and the honest results.
keel is an auditable Shariah-compliance engine for spot crypto trading — deterministic
safety rails, attested asset screening that fails closed, and §65.4 qabd (constructive
possession) encoded as an executable check — with a reference auto-trading agent built on top
of it for Coinbase. Plenty of people have a trading bot; almost nobody has this compliance
machinery, which is the part worth reading. There is also keel mcp, which speaks
MCP over stdio, so Claude Code, Cursor, Codex or any
other assistant can ask keel the same questions the browser view answers — and,
by construction rather than promise, cannot attest a subscription, promote a rule, arm
autonomy, or place an order, because the write surface does not exist in that package at all.
The honest result, stated by us first: no shipped rule family is net-positive at the taker fee actually paid on this venue — cost is the binding constraint, and the viable parameter/fee intersection is empty under production-faithful execution (the experiment record). The point of this project is the enforcement machinery and the honest measurement of what runs through it, not a claim of alpha. A visitor who finds that out themselves feels misled; one who is told upfront can read it as rigour.
A real run of python scripts/render_fee_reality.py, captured by
scripts/render_fee_reality_cast.py and regenerated whenever the measurement moves. Every figure
in it is read from docs/experiments/trials-ledger.jsonl,
the hash-chained record of what was actually run — none is typed by hand. The pacing is composed;
the output is not.
turtle_breakout on hourly bars, at each asset's best-swept configuration. The left column is
the number a fee-blind backtest reports. The right is the same run priced at the taker
fee this account actually pays. Nothing else changes between them.
| asset | trades | PF at 0% fee | PF at 1.2% taker | break-even fee, measured |
|---|---|---|---|---|
| BTC | 123 | 1.090 | 0.333 | 0.068% |
| ETH | 121 | 1.458 | 0.556 | 0.433% |
| SOL | 92 | 1.533 | 0.801 | 0.751% |
| ZEC | 50 | 2.713 | 1.303 | 1.741% |
Four of four are profitable with the fee removed. Zero of four survive the fee that is actually charged, and the break-even rate varies by a factor of ~26 across assets running the same rule on the same clock over the same window — the asset is a far larger lever than any parameter in an 864-trial sweep.
Read these as a comparison, never as edge estimates. Every configuration above is the argmax of that asset's 144-cell slice, selected on the same data it is re-priced on — a maximum of 144 draws, not an expectation. The bias runs against the finding, which is why the comparison survives it: it inflates the arm that wins with the fee removed, and that arm still dies when the fee is charged. Break-even fees were bracketed by real cells,not interpolated. Slippage is held at 0.0005 in every cell, so the zero column is zero fee, not zero cost.
Source: docs/experiments/2026-08-12-fee-curve-and-rsi-meanrev.md, rendered from the hash-chained trials ledger by
scripts/render_fee_reality.py.
Every backtest in this repository used to price fills at the floor of its own slippage model — the best case the model can produce, reached only at a $500M/day anchor. Measured against the 24 assets keel actually holds candles for, 0 of 24 reach it: the range runs from 1.1× the floor at the most liquid to 36.8× at the thinnest.
Re-pricing every rule per product — 5 rules, 24 assets, 240 trials — moved the median profit factor across 120 cells from 0.309 to 0.219. The one cell that had cleared 1.0 no longer does.
| profit factor | |
|---|---|
| the cost-model correction | -0.090 |
| the best strategy improvement we have measured | +0.033 |
The error in how we priced execution was 2.7× larger than the largest genuine gain any change to the strategy itself produced — a better exit, measured against the same entry on the same universe. For as long as that was true, comparing strategies meant comparing them through a lens distorted by more than the differences being compared.
What this is and is not. It is keel mis-pricing keel, on one venue, over one universe of cached candles — found, corrected and published. It is not a claim about any other framework's assumptions: we have not measured those, and an unsourced claim about someone else would be the exact failure this section exists to avoid making about ourselves.
Where the friction actually is. Two taker legs cost 2.4% of notional before a basis point of slippage is counted, so on the most liquid asset the fee is the overwhelming majority of the round trip and only at the thin end does slippage overtake it. A cheaper venue matters more than a better model of the book — and an honest model of the book is what tells you that.
Source: docs/experiments/2026-09-01-per-product-slippage-restatement.md, rendered from the hash-chained trials ledger by scripts/render_fee_reality.py.
以上為 README 的開頭部分。其餘內容請閱讀原文。 檢視完整 README ↗