Check a signal for lookahead
check_leakageCompare backtest outputs on truncated data cuts to detect look-ahead bias; changed rows expose leakage, naming its pattern and horizon. No code is sent.
Instructions
Does a signal look ahead? plan gives cuts; rerun your code on the first cut rows for each, then compare. Rows that changed used later rows; the result names the pattern and horizon. No code is sent. A pass covers only these cuts: the columns are the caller's, and survivorship, vendor revisions or a leak no cut reaches leave no trace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cuts | No | compare: plan's cuts. | |
| seed | No | ||
| action | Yes | ||
| columns | No | compare: {name: {full: [all rows], prefixes: [[first cuts[i] rows], ...]}}, null for missing. | |
| prefixes | No | plan: cuts, default 5. | |
| tolerance | No | Default 1e-9. | |
| timestamps | No | ||
| columns_file | No | compare, on your machine: a JSON file {cuts, columns} instead. | |
| observations | No | plan: rows in the series. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cuts | No | ||
| seed | No | ||
| limits | No | ||
| source | No | ||
| columns | No | ||
| verdict | No | ||
| plain_reading | No | ||
| flagged_columns | No |