Products

Published work

Learn and help

Account

Tools that keep finance honest.

Tools that keep finance honest.

  1. Entry 0000prev 000000000000sha256 3741a5468cbc

    We build tools that check trading research: the code behind a backtest, and the timing of a published stock call.

    Backtests can mislead in a few well-known ways: they peek at tomorrow, forget the companies that failed, and pick the best of many tries.

    How a leak gets flagged

    Backtest Auditor reads the code without running it and flags lines that use information the strategy couldn't have had.

    strategy.py, line 5

    removed: df["signal"] = df["close"].shift(-1) > df["close"]

    LA01 · high Negative shift (future data) in a feature or signal

    check_code, first run 1 high, 0 medium and 0 possible issue(s) found.

    added: df["signal"] = df["close"].shift(1) > df["close"]  # fix applied by you or your agent

    check_code, after the fix No known lookahead or bias patterns found.

    No flags means none of our listed patterns matched, not that the backtest is free of leaks: static checks miss many leaks.

    Full file and what the finding means
    import pandas as pd df = pd.read_csv("prices.csv", index_col="date")df["ret"] = df["close"].pct_change()df["signal"] = df["close"].shift(-1) > df["close"]df["pnl"] = df["signal"].shift(1) * df["ret"]df["pnl"] -= df["signal"].diff().abs() * 0.001  # costs

    shift(-1) moves tomorrow's close onto today's row, so the signal knows the answer before the trade. The backtest can then show results no one could have traded.

    The rule ID, severity, line, rule title and both results are the checker's real output on this example snippet. The plain-English explanation was written for this page, and the fix was made by hand.

  2. Entry 0001prev 3741a5468cbc (matches the previous entry's sha256)sha256 479bb6201d60

    How well it works: our sealed test results, published

    In short. The Auditor's static checks catch some common look-ahead leaks and miss many. In our latest full-size sealed test (2026-10-18), they flagged 34 of 60 planted leaks. They can also flag correct code: in that test, 1 of 105 plain correct files and 4 of 55 correct files written to look like leaks (5 of 160 overall). On leaks that open-source developers had found and fixed in their own code, they flagged 2 of 28 in a first trial, then 5 of 22 and 0 of 10 in two small pilots, which may repeat examples from the first trial (in the first pilot, possibly most of them); with so few examples these counts are very uncertain. The full-size test and both pilots did not meet our pass rule. Treat a clean result as weak evidence, never as proof that a backtest is free of leaks.

    Our latest sealed test, v13, a small pilot. Sealed test v13 (2026-11-19), a pilot that did not meet our pass rule: this time the test files were leaks that open-source developers had found and fixed in their own code, each with its repaired version, collected from code that no rule writer or prompt author had seen beforehand. The test needed at least 20 usable leak-and-fix pairs and we found 10, so it counts as a small pilot, it reports counts only, and neither version could pass. The lint rules alone (a newer, unreleased version, v0.10) flagged 0 of 10 leaky versions (95% interval 0% to 28%), raised a false red flag on 0 of 10 repaired files (0% to 28%) and flagged 0 of 1 documented non-leak; the released Auditor 0.7 gave the same counts. The lint plus an optional AI review step (review_backtest, designed to run in the user's own AI assistant, tested here with Sonnet 5.5, one run) flagged 5 of 10 leaky versions (95% interval 24% to 76%), raised a false red flag on 0 of 10 repaired files (0% to 28%) and flagged 0 of 1 non-leak. With so few examples these counts are very uncertain. Two more limits: 3 of the 5 caught leaks were fixed before the AI model's training cutoff, so it may have seen those fixes, and 4 of the 5 catches came from a rerun of one batch, decided before any results were read, after a fault in our audit tool rejected the first attempt. An independent red-team reproduction matched every number; two examples were moved between our two repository groups, which changes no total. Nothing ships on this result: the package stays at 0.7.0, and the AI review step is not released and is still being tested. No full-size test of this kind (at least 20 usable pairs) has been completed yet.

    Our previous sealed test, v12, also a small pilot. Sealed test v12 (2026-11-15), a pilot that did not meet our pass rule: this time the test files were leaks that open-source developers had found and fixed in their own code, each with its repaired version. The test needed at least 20 repaired files that were clean where the fix was made, and we found 1, so it counts as a small pilot and no version could pass. Across all 24 examples, the released Auditor 0.7 and two newer unreleased versions gave the same results: they flagged 5 of 22 leaky versions, so they missed 17, and they raised a false red flag on 1 of 21 repaired versions, at the repaired lines. Of the 24 examples, 20 came from small, recent repositories, which our rules report separately; on the 4 that the pass rule counts, no version flagged either of the 2 leaky versions, so they also failed our minimum-catch rule. With so few examples these counts are very uncertain. Only the repaired lines were checked, so this is a narrower test of false alarms than the plain and look-alike files above. A list of fixes used in an earlier trial (real-code trial 1, below) was lost, so an unknown number of these examples, possibly most of them, may repeat that trial's examples. No new version is released on this result, and the free web check stays off.

    Our first real-code trial, a small test with no pass rule. Real-code trial 1 (2026-10-19), our first test on public code with documented leak fixes. It had no pass rule. Two independent AI agents labelled the files from the fixes alone; the 52 they agreed on were 28 leaky and 24 fixed or correct. The released Auditor 0.7 flagged 2 of 28 leaky files (95% interval 2% to 23%): 0 of 25 Python files and 2 of 3 notebooks. A newer unreleased version gave the same counts. It raised a high or medium red flag on 4 of 24 fixed or correct files; 1 of them is a confirmed false alarm, and the other 3 are fixed files with findings away from the fixed lines. With so few examples these counts are very uncertain. An independent red-team reproduction matched every number, but the labels were later lost, so this result can't be fully re-checked. Some of its examples may reappear in the v12 pilot.

    Our latest full-size sealed test.

    It flagged 34 of 60 planted leaks: most easy ones (12 of 15), most medium ones (14 of 25) and about one in three hard ones (8 of 20). It misses about one in two planted leaks (26 of 60). It wrongly flagged 5 of 160 correct files: 1 of 105 plain ones and 4 of 55 written to look like leaks.†

    Our own Backtest Auditor (lint v0.7) on a sealed test set: one square per file, grouped by result.

    Files with a planted leak

    34 flagged†

    26 missed‡

    Plain correct files

    1 flagged in error†

    104 not flagged‡

    Correct files written to look like leaks

    4 flagged in error†

    51 not flagged‡

    In our own held-out test (one test set, written for us and sealed before scoring, 2026-10-18), lint v0.7 raised a high or medium red flag on 1 of 105 plain correct files and on 4 of 55 correct files written to look like leaks (5 of 160 correct files overall). It flagged 34 of 60 deliberately leaky files (57%), so it misses many issues. Flags can be wrong, and a report with no red flags is weak evidence. We changed this test's pass rule after two earlier runs; all results, including the earlier ones, are in the table below.

    This result did not meet our pass rule, which allows no high or medium red flag on any plain correct file. Lint v0.7, the version on PyPI, flagged 1 of 105, and lint v0.8, a newer version tested on the same set, flagged 1 of 105, so we won't release v0.8. Until a version meets the rule on a later sealed test set, the free web check on this site is off. The Backtest Auditor package is still available, free on PyPI, and runs on your own machine.

    We changed this test's pass rule after two earlier runs. The old rule (no false alarms on any correct file) was not met: 3 of 80 correct files were flagged in one run and 4 of 90 in the next, all but one of them look-alike files. The new rule was fixed before the next test set was written.

  3. Entry 0002prev 479bb6201d60 (matches the previous entry's sha256)sha256 7c661f1c49c2

    How we test our own tool

    The test files are written blind, the answer key is sealed before the run, the tool is scored once, and a separate AI reviewer re-runs it.

    Procedure, hashes and every sealed run
    1. The test set is written blind.

      A separate AI agent, which never read our code or any earlier test set, wrote 220 short Python backtests: 60 with a planted leak, 105 plain correct files and 55 correct files written to look like leaks.

      set
      heldout_v11†
    2. The answer key is fingerprinted, then put away.

      The answer key and the scoring script were hashed, and the hashes recorded, before the run. The folder the files were generated from was deleted, and nobody opened the test files before scoring.

      answer key (manifest.json), sha256
      472c4037387e7d155e5f4a045a7c9dfcccc307e472d501cb2983b87b9041a720†
      scoring script (score.py), sha256
      6e18ece5dc15b7ab568abe18d54d9a28d050b32780a1d3f8ce0416e6b37e659e†
    3. The tool gets one scored run.

      The code under test was pinned to one commit and recorded first. Then the scorer ran once.

      commit under test
      879c6b4be3a1d672793792d12f81fc7161053962†
      scorer output, sha256 (first 16)
      94c026590bb414da†
    4. A separate AI reviewer runs it again.

      Our red-team reviewer, another AI agent, re-ran the scorer on a clean checkout of the same commit without opening the test files. Its output was byte-identical.

      our run
      94c026590bb414da
      reviewer's run
      94c026590bb414da
      =
      byte-identical†
    5. The misses are published with the hits.

      The table below is the whole result, and every sealed run so far is listed after it.

    Result, lint v0.7 on sealed set heldout_v11
    ItemFiles
    Files with a planted leak
    Flagged (high or medium finding at the leak)34 of 60†
    Missed26 of 60‡
    Correct files
    Plain correct files flagged1 of 105†
    Look-alike correct files flagged4 of 55†
    Correct files flagged in error (false alarms)5 of 160‡

    Three of the 34 leaks flagged by lint v0.7 count only because a finding on another line was repeated at the leak ("same issue as line N"). Without them, 31 of 60.

    Every sealed run so far
    SetLintLeaky flaggedPlain correct flaggedLook-alike flaggedAll correct flagged
    heldout_v6v0.322/601/502/303/80
    heldout_v7v0.3 (baseline)16/600/555/355/90
    heldout_v7v0.417/600/554/354/90
    heldout_v8v0.4 (baseline)19/601/1053/554/160
    heldout_v8v0.519/601/1053/554/160
    heldout_v9v0.5 (baseline)24/600/1054/554/160
    heldout_v9v0.630/600/1054/554/160
    heldout_v10v0.6 (baseline)40/600/1053/553/160
    heldout_v10v0.746/600/1053/553/160
    heldout_v11v0.7 (baseline)34/601/1054/555/160
    heldout_v11v0.8 (not released)35/601/1054/555/160

    Sealed set heldout_v11 was the first written by a different AI model from the one that wrote heldout_v10 and the sets before it. The same lint v0.7 code flagged 46 of 60 leaky files on heldout_v10 and 34 of 60 on heldout_v11, so part of its earlier results reflected the earlier writer's style. Compare versions on the same set: on heldout_v11, lint v0.8 flagged 35 and lint v0.7 flagged 34, with the same false alarms.

    On heldout_v8, v0.5 and v0.4 produced byte-identical output, so their rows match. v0.5's changes didn't affect any file in this set.

    The files are written by an AI agent to resemble backtest code. We have no evidence about how the tool behaves on code people actually submit.

  4. Entry 0003prev 7c661f1c49c2 (matches the previous entry's sha256)sha256 6468a1fb3ce6

    How a call becomes tamper-evident

    Each call is hashed when it's logged, chained to the record before it, and covered by that day's published fingerprint.

    Tamper-evident: once a day's fingerprint is published, any change to a sealed call would no longer match it.

    Illustrative: a fictional writer and tickers, no real prices. Real hashes from our ledger code, in a throwaway ledger, not the public one. Two calls say nothing about skill.

    Full record: calls and fingerprints
    1. seq 4: EXMPL up, 20 trading days

      @writer.example, posted 2026-09-14 12:40:00 UTC; recorded 2026-09-14 12:52:30 UTC

      Day 2026-09-14 sealed: fingerprint no. 4, 5 records so far

      prev
      60b00c76cd10f8b0f36aad4939034106412249c2710ed7121e91ff50c70b6863
      hash
      82a9fee071ce0fd8a7a111fa67f60812fe5da041e7082c9c69eeb1ed9cb3cd72
      previous fingerprint
      1874b9ebde3de4add9c65f591849e9835cada0257e4d58b6f3dcdb3f385150a9
      fingerprint for 2026-09-14
      d3d3fc17c3a5214582745af1c670ecea850928501053de5e02ac45648861166f
    2. seq 5: SAMPL down, 20 trading days

      @writer.example, posted 2026-09-15 12:05:00 UTC; recorded 2026-09-15 12:20:40 UTC

      Day 2026-09-15 sealed: fingerprint no. 5, 6 records so far

      prev
      82a9fee071ce0fd8a7a111fa67f60812fe5da041e7082c9c69eeb1ed9cb3cd72
      hash
      4568bd36e91cfa37dce76e15841941748b4934d4511cf199f8b5312110cb58b1
      previous fingerprint
      d3d3fc17c3a5214582745af1c670ecea850928501053de5e02ac45648861166f
      fingerprint for 2026-09-15
      ec11da78265a156646e02ffa8a2882a55d926025679c56a26a09b3e25ba7c9f3
    3. 20 trading days later
    4. Hit

      EXMPL resolved 2026-10-12 20:00:00 UTC, by the rule fixed when the call was logged

      hash
      71926f5e3b0f18ffcb10333f6925bfb70540d62a9433dc3f7e7758c22c0bdc53
    5. Miss

      SAMPL resolved 2026-10-13 20:00:00 UTC, by the rule fixed when the call was logged

      hash
      1e817cace93e7ee7e8040257953210bf685f2585f343e61fbcc28dba155d3c4a
    6. Outcome records sealed in the fingerprint for 2026-10-13

      sha256
      d645f2a4566ad973647a3440c30b51f62c92fed65853c7ea8004f9a0e892a4b4
  5. Entry 0004prev 6468a1fb3ce6 (matches the previous entry's sha256)sha256 ea30c3220d7d

    Products

    Backtest Auditor

    Available: a free package you run locally.

    Looks for common look-ahead, overfitting and survivorship mistakes in a Python backtest's code. About Backtest Auditor

    Proof of Call

    Accounts open, free.

    A tamper-evident track record of published stock calls, misses included. Late calls are labeled backfilled. About Proof of Call

    Backtest hazard report

    Preview: three example reports.

    Shows how a list of tickers can mislead a backtest: companies a list built today leaves out, reused tickers, delistings and splits. Each example event links to a public source. See the examples

  6. Entry 0005prev ea30c3220d7d (matches the previous entry's sha256)sha256 f93916fa1e39

    Notes

    Tickmarks: † agreed to the test's pre-registration and run record; ‡ recomputed from the figures shown; § read from the public ledger-heads repository; real tool or ledger output on an illustrative example.

    The test-set writer and the reviewer are AI agents, not people, each run separately from the agent that built the tool. A fingerprint's publication time is GitHub's commit time; we don't use an outside timestamping service yet.

    Disclaimer

    1. Nothing But Alpha publishes general information and builds software tools for educational purposes. Nothing on this site is investment advice, a recommendation, or an offer or solicitation to buy or sell any security. We are not a registered investment adviser or broker-dealer.
    2. Our content and tools are the same for everyone and are not tailored to any reader's finances, goals or risk tolerance. The products described here are in development, and features marked planned may change or not ship. Backtest results are hypothetical, and a report with no red flags doesn't mean a strategy works. Past results, live or backtested, do not guarantee future results. Scores and audit reports are produced by software and can contain errors. Investing involves risk, including the loss of principal. Do your own research, and consider talking to a licensed financial professional before making investment decisions.
    3. Nothing But Alpha is an AI-first company: AI agents build and run much of it under human oversight.