UNPKG

kestrel.markets

Version:

A typed, token-efficient language + runtime for agentic trading: agents author bounded plans, the runtime fires them at the tick. CLI + typed library + MCP server.

95 lines (71 loc) 4.38 kB
# First Grade — the honest result of a run A **Grade** is the honest **result** of a run — realized EV, P&L, fills, counterfactuals, and the fidelity and certification stamps that say how much to trust them — *and* the surface an author writes to request and score one. It answers *did it actually work?* **Every run, however produced, carries a Grade.** Unlike a View, Wake, or Plan, a Grade is not standing: it is **imperative** — a job that runs, terminates, and returns a result. It is never armed. This page reads one Grade clause by clause. ```kestrel id=grade-open-drive check=roundtrip GRADE plan open-drive OVER 2024-01..2026-06 FILL maker-v1 VS ungated null BY regime.intraday, lineage ``` ## The subject: grade judgment, not parameters ``` GRADE plan open-drive ``` The subject is the judgment under test — the `open-drive` Plan from [First Plan](./first-plan.md), replayed exactly as it was authored. A Grade scores **judgment, never parameters**: it never sweeps a knob looking for a flattering setting. That discipline is why the counterfactuals below are *syntax* and not a search — the thesis is fixed, and the run asks only whether that fixed thesis earned its keep. ## The window and the fills ``` OVER 2024-01..2026-06 FILL maker-v1 ``` `OVER 2024-01..2026-06` is the span of recorded history to replay across. `FILL maker-v1` names the fill model — the rule for turning intent into fills — because the same Plan graded under a generous model and a strict one earns different, and separately citable, results. Fills carry receipts: a fill model tags each assessment `calibrated` or `extrapolated`, and a Grade **refuses to bank expected-$ from an extrapolated cell**, so a strategy can never hill-climb into an uncalibrated corner of the model. ## The counterfactuals: as syntax, never a search ``` VS ungated null ``` Counterfactuals are first-class syntax. `VS ungated` asks whether the Plan's regime gate earned its keep — the same thesis with the gate removed. `VS null` asks whether there is any edge at all: the same fills, the same window, and no judgment. If the graded result cannot beat `null`, there is nothing there to keep, and the Grade says so plainly. ## The stratification: honest cells, not one average ``` BY regime.intraday, lineage ``` `BY` stratifies the answer into cells instead of one flattering average. Here the result is split by `regime.intraday` and by `lineage`, so a strategy that works only in one regime cannot hide inside a blended number. An average is a claim; a cell is a receipt. ## Grade is the result — the run may be a Backtest or a Simulate This is the one thing to keep straight: **Grade is the result, not the run**, and it is *not* a synonym for "backtest." Every run carries a Grade, but a run can be produced two distinct ways: - A **Backtest** replays a *fixed* authored Plan autonomously over recorded data — **no agent in the loop** — under a named fill model. It is deterministic and reproducible; it is exactly the run that `GRADE plan open-drive …` executes above. - A **Simulate** puts a *live agent* in the loop: an AI manages the book in `sim` mode over the strategy's own horizon in compressed wall-clock, defining its own Wakes and revising its Plans as new data arrives. The loop is non-deterministic — the judgment is the variable. Both produce a run; both runs carry a Grade. So a backtest is one *way to produce* a run, and the Grade is the honest result that run earns — never the run itself, and never a stand-in for the word "backtest." ## What is real today Every claim here is *graded, not asserted*. The `GRADE` statement above **parses and round-trips** today, but its **evidence** axis is held most strictly of all: the certified honest-tier cohort is **0**. Every graded result today is `mechanical (practice)` — machinery that ran end-to-end, never proven trading edge. Read [Capability truth](./capability-truth.md) before treating any grade as a blessed result. ## Next - **[The shared lexical core](./lexical-core.md)** — see this Grade beside a Wake and a Plan over the same series, in the one core all four kinds share. - **[Capability truth](./capability-truth.md)** — Grade is the honest result; this page teaches how to read the evidence axis, mechanical versus certified, where the cohort is still 0.