Validate trades (layer 5)
validate_tradesJudge closed trades against a sealed preregistration: enforce its universe and era, subtract costs, run bootstrap, permutation, power, and kill criteria, then return a deterministic read-only verdict.
Instructions
Layer 5: judge a set of closed trades against the registration sealed before them.
Rejects trades outside the registered universe or era, subtracts `cost_bps` from every trade,
then runs the eight requirements of layer 5, among them a block bootstrap interval, a
permutation test against a null (`null_mode` "sign" or "cross_sectional") and the power
achieved against the power required, and applies the registration's kill criteria.
Deterministic for a given `seed`. Use it once per registration; running it again with other
settings is the forking the seal exists to prevent. Read-only: the verdict is returned, never
written to the ledger.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | random seed; the same seed gives the same verdict | |
| n_perm | No | permutations of the null | |
| cost_bps | Yes | round-trip cost subtracted from every trade, in bps, as a decimal string | |
| null_mode | No | "sign" (flip each trade's sign) or "cross_sectional" | sign |
| n_resamples | No | bootstrap resamples | |
| trades_path | Yes | path to trades.jsonl, the closed trades to judge | |
| block_length | No | block length of the bootstrap, in trades | |
| registration_path | Yes | path to the sealed preregistration.json |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||