Calibrate First
Overview
A backtest result is only as good as the instrument that produced it. This skill
makes Claude measure the instrument before it measures the signal. It drives
assay-lite, a single-file,
offline Python tool. floor injects synthetic signals of known strength into the
user's own returns to find the smallest effect the data can detect. test charges
every run to an append-only registry before computing, and a result below the
floor is reported as UNDECIDABLE rather than "the signal doesn't work".
When to Use
- The user asks whether a trading signal, factor or ranking "works", is
"significant", or has an "edge".
- The user wants to read an information coefficient (IC) or a cross-sectional
backtest result, especially a null one.
- The user is about to try several variants of an idea and pick the best one.
Do not use it for single-asset timing signals, intraday data, live trading or
position sizing. assay-lite does not cover them.
How It Works
Use only a previously reviewed local assay_lite.py at an explicit absolute path, verified against commit 78104a4356541affe2a469dfdf69cb1e418eb0c5, together with a fully locked and reviewed numpy/pandas/scipy environment. This skill does not download code or resolve dependencies. If absent, stop before execution and return the input schema and analysis plan. Do not substitute a same-named project file. A separate installation task must stage and inspect every file and dependency with installation hooks disabled, verify immutable bytes, then obtain approval before executing or writing the trial registry. uv caching is not isolation.
Four rules:
- Run
floor before interpreting any result. Until the floor is measured for
these prices and this horizon, a non-significant result means nothing either way.
- Never compare p with a conventional 0.05. The only bars are the ones the
registry prints: 0.05 divided by every trial ever charged. "Bar for the last
trial charged" and "the NEXT test will face" are different bars. Quote the one
that matches the question.
- Trials are never refunded. Re-running a signal, tweaking a parameter or
trying another horizon is a new trial. Never suggest deleting registry lines or
using a fresh
--home to reset the count.
- Below the floor is UNDECIDABLE, not "no effect". Say "too small for this data
to see", never "doesn't work".
Procedure:
- Check the inputs. Prices are
date,asset,close. The signal is
date,asset,signal, known at that date's close.
- Run
breadth, and state the effective number of independent bets next to the
asset count.
- Run
floor for the exact prices file and horizon you will test.
- Write down in one sentence what you expect and why, then run
test once.
- Report the verdict line verbatim, with IC, p, the bar it faced, the dispersion
ratio and the scaled floor.
Examples
python /absolute/reviewed/assay_lite.py demo # synthetic data; shows PASS, UNDECIDABLE, and a scaled floor
python /absolute/reviewed/assay_lite.py breadth --prices prices.csv
python /absolute/reviewed/assay_lite.py floor --prices prices.csv --horizon 1
python /absolute/reviewed/assay_lite.py test --prices prices.csv --signal signal.csv --name momentum_12_1 --horizon 1
python /absolute/reviewed/assay_lite.py registry
| verdict |
say this |
not this |
| PASS |
"cleared the multiple-testing bar" |
"proven", "profitable" |
| UNDECIDABLE |
"too small for this data to see" |
"doesn't work" |
| FAIL |
"large but unreliable" |
"zero" |
Limitations
- Cross-sectional and daily only, using Spearman IC. No timing signals and no
portfolio simulation.
- No transaction costs. A PASS says nothing about profit after costs.
- Bonferroni is conservative when trials are correlated.
- The floor is calibrated with independent noise and then scaled up by each
signal's daily-IC dispersion. That corrects for factor structure on average, not
exactly.
- Nothing here is investment advice. A PASS is evidence of a ranking effect, not
permission to trade.
Security & Safety Notes
- assay-lite makes no network calls and needs no API keys. It reads the CSVs the
user points it at and writes only to its own
.assay-lite/ folder.
- The registry is append-only on purpose. Don't edit or delete it on the user's
behalf.
1---2name: calibrate-first3description: Measure a dataset's detection floor before reading any trading-signal result, pre-register every test, and report too-small-to-see as UNDECIDABLE, not 'no effect'. 4category: AI & Agents5source: antigravity6tags: [python, api, claude, ai, security, rag, cro]7url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/calibrate-first8metadata:9 source: https://skillmd.com/skills/ranbot-ai/calibrate-first10---111213# Calibrate First1415## Overview1617A backtest result is only as good as the instrument that produced it. This skill18makes Claude measure the instrument before it measures the signal. It drives19[assay-lite](https://github.com/assaylabdesk-sudo/assay-lite), a single-file,20offline Python tool. `floor` injects synthetic signals of known strength into the21user's own returns to find the smallest effect the data can detect. `test` charges22every run to an append-only registry *before* computing, and a result below the23floor is reported as UNDECIDABLE rather than "the signal doesn't work".2425## When to Use2627- The user asks whether a trading signal, factor or ranking "works", is28 "significant", or has an "edge".29- The user wants to read an information coefficient (IC) or a cross-sectional30 backtest result, especially a null one.31- The user is about to try several variants of an idea and pick the best one.3233Do not use it for single-asset timing signals, intraday data, live trading or34position sizing. assay-lite does not cover them.3536## How It Works3738Use only a previously reviewed local `assay_lite.py` at an explicit absolute path, verified against commit `78104a4356541affe2a469dfdf69cb1e418eb0c5`, together with a fully locked and reviewed numpy/pandas/scipy environment. This skill does not download code or resolve dependencies. If absent, stop before execution and return the input schema and analysis plan. Do not substitute a same-named project file. A separate installation task must stage and inspect every file and dependency with installation hooks disabled, verify immutable bytes, then obtain approval before executing or writing the trial registry. `uv` caching is not isolation.3940Four rules:41421. **Run `floor` before interpreting any result.** Until the floor is measured for43 these prices and this horizon, a non-significant result means nothing either way.442. **Never compare p with a conventional 0.05.** The only bars are the ones the45 registry prints: 0.05 divided by every trial ever charged. "Bar for the last46 trial charged" and "the NEXT test will face" are different bars. Quote the one47 that matches the question.483. **Trials are never refunded.** Re-running a signal, tweaking a parameter or49 trying another horizon is a new trial. Never suggest deleting registry lines or50 using a fresh `--home` to reset the count.514. **Below the floor is UNDECIDABLE, not "no effect".** Say "too small for this data52 to see", never "doesn't work".5354Procedure:55561. Check the inputs. Prices are `date,asset,close`. The signal is57 `date,asset,signal`, known at that date's close.582. Run `breadth`, and state the effective number of independent bets next to the59 asset count.603. Run `floor` for the exact prices file and horizon you will test.614. Write down in one sentence what you expect and why, then run `test` once.625. Report the verdict line verbatim, with IC, p, the bar it faced, the dispersion63 ratio and the scaled floor.6465## Examples6667```bash68python /absolute/reviewed/assay_lite.py demo # synthetic data; shows PASS, UNDECIDABLE, and a scaled floor69python /absolute/reviewed/assay_lite.py breadth --prices prices.csv70python /absolute/reviewed/assay_lite.py floor --prices prices.csv --horizon 171python /absolute/reviewed/assay_lite.py test --prices prices.csv --signal signal.csv --name momentum_12_1 --horizon 172python /absolute/reviewed/assay_lite.py registry73```7475| verdict | say this | not this |76|---|---|---|77| PASS | "cleared the multiple-testing bar" | "proven", "profitable" |78| UNDECIDABLE | "too small for this data to see" | "doesn't work" |79| FAIL | "large but unreliable" | "zero" |8081## Limitations8283- Cross-sectional and daily only, using Spearman IC. No timing signals and no84 portfolio simulation.85- No transaction costs. A PASS says nothing about profit after costs.86- Bonferroni is conservative when trials are correlated.87- The floor is calibrated with independent noise and then scaled up by each88 signal's daily-IC dispersion. That corrects for factor structure on average, not89 exactly.90- Nothing here is investment advice. A PASS is evidence of a ranking effect, not91 permission to trade.9293## Security & Safety Notes9495- assay-lite makes no network calls and needs no API keys. It reads the CSVs the96 user points it at and writes only to its own `.assay-lite/` folder.97- The registry is append-only on purpose. Don't edit or delete it on the user's98 behalf.