preregistered-studies
Pre-registered market-signal studies: sha256-frozen hypotheses, block-bootstrap p-values, Benjamini-Hochberg correction and a hold-out opened once. Two studies failed and were abandoned; a third is registered and not yet evaluated.
Why it exists
Historical market data makes it easy to fool yourself. Try enough lags, thresholds and assets and something will look significant. The aim, before building any trading automation, was a process that could return “no” and have that answer stick.
Each study follows the same routine:
- Before any data is fetched, write down the hypothesis, the data, the statistic, the multiple-testing correction and the pass/fail thresholds.
- Hash that document with SHA-256. Every analysis script refuses to run if the hash no longer matches.
- Split the data chronologically. The last 30% goes to a separate hold-out file that the discovery code never reads.
- Record the discovery result, then open the hold-out once, only for the tests that survived discovery.
- If a gate fails, the idea is abandoned. It is not re-lagged, re-thresholded or re-specified.
Round 1 ran 72 tests. Two survived discovery and both failed the hold-out. Round 2 ran 6 tests. Three survived discovery and all three failed the hold-out, the closest at p = 0.055 against a frozen p < 0.05 gate. The gate held, and both studies are closed. Round 3 is registered and has not yet been evaluated.
What it demonstrates
- Pre-registration enforced in code. The frozen spec is hashed and each analysis script asserts the hash before running. The hold-out scripts refuse to run a second time.
- Inference that respects autocorrelation. p-values come from block bootstraps, not naive shuffles. Benjamini-Hochberg FDR (q = 0.10) is applied across every test declared up front: 72 in round 1, 6 in round 2. Results that are significant only without correction are recorded as failures.
- Separation between discovery and hold-out data. The harvester writes the hold-out to its own file, and the discovery scripts load only discovery files (round 1 also asserts this). In round 1, before the hold-out is touched, a selftest runs the hold-out code on discovery data and must reproduce the discovery numbers exactly.
- Accepting a negative result. Round 2’s best variant kept a positive mean out-of-sample but missed significance by 0.005. It is recorded as FAIL, with the reasoning written next to it.
- Reproducibility. Every run is seeded and deterministic. On 2026-09-30 rounds 1 and 2 were re-run from the scripts published here on the original data, and every output JSON matched the recorded one apart from its generation timestamp.
Results
|
Round 1 — signal-study-2026-09 |
Round 2 — strategy-study-2026-09 |
Round 3 — copyshadow-study-2026-09 |
| Question |
Does hourly trading volume on a new, retail-heavy L2 (Robinhood Chain) lead SOL / BTC / ETH returns by 1–24 h? |
Do BTC breakouts (H-A) or negative perp funding (H-B) give a long-only edge within 72 h, after 0.30% round-trip costs? |
Do OKX lead-trader entries keep an edge after translation to spot longs, a 2-minute delay, small fixed legs and all-taker costs? |
| Tests declared |
72 (24 lags × 3 targets), BH q = 0.10 |
6 (3 breakout + 3 funding variants), BH q = 0.10 |
2 (pooled + majors-only slice), BH q = 0.10 |
| Discovery |
2 survivors: BTC at lag 6 h and lag 23 h (p_adj 0.072). The primary target, SOL, had none. |
3 breakout variants survived (p 0.026–0.048). Funding variants failed: at most 20 episodes, with negative means wherever there were any. |
Forward design: the future is the hold-out |
| Hold-out (opened once) |
Lag 6 h flipped sign (rho −0.008, p 0.89). Lag 23 h: rho +0.026, p 0.66. |
All positive means, but p = 0.184 / 0.183 / 0.055 against the gate of p < 0.05 |
Not evaluated (see Status) |
| Verdict |
FAIL, abandoned |
FAIL, abandoned |
Registered only |
Full tables are in each study’s RESULT-discovery.md and RESULT-holdout.md.
Architecture
Each study is a small stdlib-only Python pipeline built around one frozen document.
flowchart LR
H["HYPOTHESIS.md<br/>(frozen spec)"] --> S["HYPOTHESIS.sha256"]
S --> HV["harvest.py<br/>public APIs, no auth"]
HV --> D["raw/DISCOVERY<br/>first 70%"]
HV --> HO["raw/HOLDOUT-DO-NOT-OPEN<br/>last 30%"]
D --> AD["analyze_discovery.py<br/>asserts sha, reads discovery only"]
AD --> RD["RESULT-discovery.md"]
RD -->|survivors only| AH["analyze_holdout.py<br/>asserts sha, runs once"]
HO --> AH
AH --> RH["RESULT-holdout.md<br/>PASS / FAIL"]
signal-study-2026-09/ round 1: 72-test lead-lag study (runnable end to end with the data included)
HYPOTHESIS.md / .sha256 / FROZEN-AT.txt
harvest.py analyze_discovery.py analyze_holdout.py
RESULT-discovery.md RESULT-holdout.md
out/ machine-readable results + run logs
raw/DISCOVERY.json, raw/HOLDOUT-DO-NOT-OPEN.json aggregate index + major closes, no per-token data
strategy-study-2026-09/ round 2: 6-test BTC strategy study
HYPOTHESIS.md / .sha256
harvest.py analyze_discovery.py analyze_holdout.py
RESULT-discovery.md RESULT-holdout.md out-discovery.json out-holdout.json
raw/harvest-manifest.json raw/ORIGINAL-SHA256SUMS.txt (candles not included, see below)
copyshadow-study-2026-09/ round 3: forward-only registration
HYPOTHESIS.md / .sha256
Key design decisions
- Rank correlation (Spearman) in round 1. Crypto returns and volume changes are heavy-tailed. A few outliers would dominate a Pearson correlation.
- The bootstrap null keeps the structure that matters. Round 1 resamples the target return series in circular 24-hour blocks. That keeps the target’s own autocorrelation but breaks any link to the volume index. Round 2 builds synthetic hourly price paths (a stationary bootstrap with a mean block of 72 h, keeping each bar’s open/high/low/close shape) and re-runs the full trading rule on each path, stops and time-stops included. Because the null keeps the period’s upward drift, a pass means the entry timing beat random exposure to the same drift, not just that BTC went up.
- One correction across everything declared. The number of tests is fixed before the data exists and reported with every result, so every p-value is read against the full count.
- The hold-out is a confirmation, not a second search. It tests only discovery survivors, once, against three gates: same sign, p < 0.05, and a minimum effect size (|rho| ≥ 0.05 in round 1, mean net return ≥ +0.10% per episode in round 2). An effect too small to cover fees does not count.
- Conservative costs. Round 2 assumes every fill is a taker (0.10% fee + 0.05% slippage per side), fills stops with slippage, and applies a 72-hour time stop and a 24-hour cooldown inside the simulated rule, not afterwards.
- A failed test counts as a finished study. Each hypothesis says in advance what a FAIL means (stop, report, build nothing) so the outcome can’t be renegotiated after the numbers arrive.
How to run / test
Requirements: Python 3.11 or later (the scripts use datetime.UTC); standard library only. Tested with Python 3.14.
# every script compiles
python3 -m py_compile signal-study-2026-09/*.py strategy-study-2026-09/*.py
# the frozen documents are byte-identical to their recorded hashes
(cd signal-study-2026-09 && shasum -a 256 -c HYPOTHESIS.sha256)
(cd strategy-study-2026-09 && shasum -a 256 -c HYPOTHESIS.sha256)
(cd copyshadow-study-2026-09 && shasum -a 256 -c HYPOTHESIS.sha256)
Round 1 (runs fully from this repo):
cd signal-study-2026-09
python3 analyze_holdout.py selftest # a few seconds; must print "selftest OK"
python3 analyze_discovery.py # about 2 minutes; rewrites out/discovery-results.json and
# RESULT-discovery.md (only the "Generated" timestamp changes)
# to repeat the one-shot hold-out test, first delete out/holdout-results.json (the script refuses otherwise)
python3 analyze_holdout.py holdout
harvest.py does not need to be run to reproduce the results. It needs a token registry (TOKEN_REGISTRY=path/to/registry.json), which is not published, and it overwrites raw/DISCOVERY.json and raw/HOLDOUT-DO-NOT-OPEN.json with fresh data from a different time window.
Round 2: the raw OKX candles (about 4.3 MB) are not included. python3 harvest.py re-fetches them from OKX’s public API with no credentials, but it walks back from the current date, so the split and the numbers will differ from the recorded run. raw/ORIGINAL-SHA256SUMS.txt lists hashes of the original files so any copy of them can be verified. With the original files in raw/, analyze_discovery.py takes about 4 minutes and analyze_holdout.py about 1.5 minutes (it refuses to run while out-holdout.json exists).
Status & limitations
Status: closed research. Not deployed. Rounds 1 and 2 both failed, and nothing from them was carried forward into trading. Round 3 is registered. Its forward tracker started at T0 = 2026-09-06 22:52 UTC and last ran on 2026-09-08. The pre-registered evaluation date (T0 + 60 days, 2026-11-05) has not been reached, so no result is reported. The tracker and its data live outside this repo, and the data contains third-party trader identifiers.
Limitations and known discrepancies:
- The freeze evidence is self-attested. The SHA-256 files prove the published hypotheses are byte-identical to what the scripts checked. They do not prove when the documents were written. The ordering (hypothesis, then harvest, then discovery, then hold-out) rests on local file timestamps,
FROZEN-AT.txt (round 1 only) and the run logs. There was no version control or third-party timestamping at the time. Recorded UTC times:
- Round 1: frozen 2026-09-05 23:46, data harvested by 2026-09-06 00:19, discovery 02:28, hold-out 02:31.
- Round 2: hash written 2026-09-06 12:22, harvest 12:23–12:30, discovery 12:34, hold-out 12:37.
- The round 1 sample is short. It covers 796 discovery hours and 342 hold-out hours. The volume index includes wash-traded volume and only tokens that survived to the registry date. All of this was stated in advance (HYPOTHESIS.md §6). Both discovery survivors came from a secondary target, BTC. The primary target, SOL, produced none.
- The round 2 funding hypothesis was underpowered by construction. OKX serves only about 3 months of funding history, so the 25-episode minimum could not be met. The H-B discovery window used a separately fetched price file (
discovery-btc-1h-fundingwindow.json), and the code that fetched it is not part of harvest.py.
- Round 2 daily bars are built from consecutive 24-hour chunks of the hourly series, not UTC calendar days. The harvested daily candles are not used by the analysis.
strategy-study-2026-09/analyze_discovery.py was last modified about 80 seconds after its recorded output was written, before the hold-out run imported it. The re-run on 2026-09-30 confirms that the published version reproduces out-discovery.json exactly.
- Round 2’s
RESULT-*.md files were written by hand from the JSON outputs, and a few numbers were transcribed wrongly. In RESULT-holdout.md the “total net” column reads +9.8 / +10.3 / +19.5%, while out-holdout.json has 8.38 / 9.45 / 19.77%. The JSON files are authoritative. Episode counts, means, p-values and verdicts agree. Apart from the one path edit listed under “What was changed for publication”, the markdown is left as it was recorded.
- Some referenced documents are not included. The hypotheses cite section numbers (§2, §5.13, §9.3 and so on) from a private trading-rules document. The results mention internal planning documents and tooling. None of these are part of this repo, and the studies can be read without them.
- Measuring predictability is not the same as a tradeable edge. Round 1 models no costs, and neither study accounts for tax. Nothing here is investment advice.
What was changed for publication
- The three
HYPOTHESIS.md files are byte-identical to the frozen originals. Their hashes verify:
- round 1
4fcf0183…058f
- round 2
ef682608…a6cb
- round 3
1afa41bf…cfae
strategy-study-2026-09/RESULT-holdout.md has one edit: a local directory path for private tooling now reads “tooling exists privately”. This file is not hash-locked.
signal-study-2026-09/harvest.py has one edit: the token-registry path, which pointed at a private file, is now read from TOKEN_REGISTRY. The edit is marked in the code. The analysis scripts are unchanged.
- Excluded:
- round 1’s per-token API caches and pool map, which name individual tokens, plus the token registry and two redundant intermediates (
index.json, okx-*.json)
- round 2’s raw candle and funding files
- a separate protocol-frozen review of other people’s open-source trading bots, which mostly quotes third-party code and private configuration
- Added: this README,
LICENSE, .gitignore and strategy-study-2026-09/raw/ORIGINAL-SHA256SUMS.txt.
- The published data files are aggregates derived from the public GeckoTerminal and OKX APIs. They contain timestamps, a summed volume index and SOL/BTC/ETH closing prices only.
How this was built
Built by directing AI coding agents (Claude Code / Cursor). Wol wrote the specs, architecture decisions, gates and reviews. The agents drafted the documents and wrote the code, which is why the hypothesis files read “Author: claude-code. Operator: Wol.”
License
MIT. See LICENSE.
评论