How a Strategy Earns Capital: Pre-Registered Research Behind an AI-Built Trading Platform

Inside Termondt Tech

How a strategy earns capital: the research platform behind Argus

At 9:13 on the morning of Wednesday, September 30, 2026, I committed a document that said what six years of market data would be allowed to tell me, before I'd seen any of it. It fixed which days would be tested and which would stay sealed, what would count as success, and what each possible answer would and wouldn't let me do. No data was pulled until after that commit, because the plan said none could be.

At 1:13 that afternoon the sealed period was scored, once. The code that scored it checked the repository for the earlier commits before it would run, and it will refuse to run again. At 1:18 I committed the results note.

The next morning I pressed the kill switch on the strategy.

The question part one left open

Part one of this series told how I guided an AI to build Argus, a platform for fully automated trading strategies, under hard safety rails, and how its first strategy went live at minimum size and was shut down sixteen days later. It said the strategy lost. It didn't say how I knew, or how I knew I wasn't fooling myself.

That's a bigger question than it sounds. A strategy with a few dozen live sessions behind it can be argued either way. A losing week is noise, and so is a winning one. Six years of history will show a winning setting for almost any idea, by luck alone, if you're allowed to look first and decide afterward. The hard part of research isn't computing the answer. It's arranging things so you can't move the question once you've seen it.

The research platform does that arranging, and it got built the same way the trading platform did. The agent drafted the designs and plans, I reviewed and revised them and approved each one at a checkpoint, and code holds them in place rather than anyone's memory.

What the research platform is, and what it is not

It's a separate repository, split from Argus on October 5, 2026. It holds pre-registered studies, the engines that run them, and their results. By late October it had 99 commits, 68 of them carried over from Argus with their authors and dates unchanged, 34 tagged milestones, and 91 documents.

What it isn't: it doesn't trade. There's no broker credential in it, no order path, and no trading database is ever opened writable. Argus's own arithmetic, the strike selection, the implied delta and the end-of-day deferral, is installed as a pinned library rather than copied, so a replay computes exactly what the live system computed. The pin is the last commit the studies ran against. The vendor data lives outside the repository under a personal-use license and is never committed. Only aggregates are.

TOMIC, the screener and monitor I'd built for my own discretionary trading, got the same treatment. Its desk rules were backtested under their own pre-registration, with their own split of years and one look at a held-out period, and nothing was promoted.

Pre-registration as a sequence of commits

Here's how the history study worked. The mechanism is the point, so I'll take it in order.

The split. The vendor sells a minute-by-minute record of every same-day SPX option quote back to January 2020. Before I bought it, the plan divided it up:

PeriodSessions, aboutUse
January 2020 to September 20251,200The history set: every test, with the calendar year as the fold
October 2025 to July 2026200Held out: scored once, last
The 30 sessions Argus itself had recorded30Validation only, never a test, because every hypothesis came from them
September 28, 2026 onward Never pulled, because live forward tests were running on those days, and computing their statistics from a second source would be a look before the look

The gates. Before any test statistic could be computed, seven gates had to pass. Four were about the vendor: coverage of the expected dates, depth into the 2020 crash, quote completeness on five chosen stress days, and agreement with the quotes Argus had recorded live on the same minutes. If one of those failed, the instruction was to cancel the subscription. Three were about our own replay: that it picked the same strikes Argus picked on the live sessions, that its stop on a minute grid reproduced the live five-second stop, and that what a minute grid misses between marks was measured against the five-second record and corrected by a ratio fixed at the freeze. A failure there was a bug to fix, never a finding.

The costs. Every "after costs" figure applies a fill haircut measured from Argus's own live fills: the median share of the quoted half-spread those fills gave up, applied to the historical quotes. Nobody assumed a number. Fees were the real schedule, read first-hand.

The four commits. The plan called for four commits in a fixed order: the plan itself, before the subscription; the scorer freeze, after every gate passed and before any statistic; the history-set results; the held-out results, once. The scorer enforces that order itself rather than trusting anyone to remember it. Before it will score the history set it looks in the repository for the freeze. Before it will score the held-out period it looks for the committed history results, and it refuses outright if the held-out result file already exists. A defect found after the freeze gets fixed in a dated addendum that states the statistic before and after. Nobody edits a frozen file. We wrote six addenda that day, and the sixth was a set of nine predictions about what the held-out period would show, committed ten minutes before it was opened.

CommitTime, Central
The plan09:13
The scorer freeze12:29
The history-set results12:50
Nine predictions for the held-out period13:03
The held-out results13:13
Timeline of September 30, 2026: the plan committed at 09:13 before any data was bought; the scorer frozen at 12:29; the history set scored at 12:50; nine predictions committed at 13:03; the held-out period opened once at 13:13; the results note at 13:18.
September 30, Central time. The scorer checks the repository for each earlier commit before it will run the next step.

What came out. The strategy didn't make money on the history set and did worse on the held-out period, below zero after costs on both. All nine predictions held. By luck alone you'd get eight or more of nine about two percent of the time. The design choices had been right: the stop beat the alternatives and the end-of-day deferral beat always closing. The strategy still didn't pay, because one trade in five was stopped out and a stop cost about what four winners earned.

We scored forty-five variants of the strategy alongside it. The best of them on the held-out period made a few dollars a session there and had lost money on the history set. The results note says this about it: "A winner picked from many after the fact looks exactly like that. It is reported and allows nothing."

That sentence is what pre-registration buys you: not a better answer, but no way to talk yourself out of the one you got. The plan had also fixed, in advance, what no result could do. It couldn't change a line of code or config by itself, couldn't touch a live safeguard or a running test, and couldn't speak about execution, which stays measured on the live record. All a result could do was permit a decision record. The decision was to stop.

The search for something better

At 3:41 the same afternoon I committed Round 1 of a new program: a search for a trading idea with a real edge after costs that still works at many times the size, pre-registered before any data was read.

Checkpoint 0. The agent drafted the program's plan. I read it the way I used to read a design before signing off on it, and on September 30 answered "yes to all" to eight items: the development years and the sealed years, the success bar, the budgets, the finalist cap, and four readings the numbers depended on. The plan is binding from its commit, and says so in its first paragraph.

The sealed years. Development ran on 2020 through 2023, 781 sessions holding the 2020 crash and the 2022 bear market. The years from January 2024 to July 2026, 631 sessions holding August 2024 and April 2025, were sealed. They could be opened at most three times ever, once per finalist, and only after that finalist's own pre-registration was committed. The engine enforces the seal in code. Ask it for a sealed date and it refuses unless a committed document names the finalist being confirmed.

Two bars over the years 2020 to 2026: the history study's set of 1,171 sessions with 191 held out and scored once; the edge search's development years 2020 to 2023 with 2024 to mid-2026 sealed and opened at most three times; a cutoff at September 28, 2026 after which no data was ever pulled.
Two splits of the same six years. In both, the recent period is opened last and counted.

The bar. All six criteria, on the sealed years, after costs. The two that bite: the mean must be positive by a permutation test at a significance level divided by three, because three finalists were allowed, and the mean must be at least two percent of the strategy's structural worst case per session, which at the proposed size is about fifteen percent a year. The plan's plain-terms section says it in so many words: "nothing found" is an acceptable answer. A false positive costs real money.

The budgets. Forty dollars a month of data, fifty gigabytes, twenty ideas times five variants a round, three finalists. Every run goes in a ledger, one line per variant, whether it passed or failed. The ledgers hold a hundred lines.

The engine. Before the first screen, a known-answer gate: the new engine had to reproduce the frozen scorer's result on all 781 development sessions to within five thousandths of a cent, under 26 tests. It did.

Four rounds. Round 1, the same afternoon, mapped the same-day index premium by strike, time of day and structure, and found it priced about fairly everywhere: the best structure earned about half to two thirds of the bar. Twenty-seven ideas were inventoried, seven killed on evidence before testing, thirteen tested across 25 variants. One survived the statistical screens, and it trades twelve days a year, an eighth of the bar. Round 2, the next morning, closed longer-dated index premium on the exchange's own benchmark record, and closed a published single-stock strategy that lost at the midpoint price, before any cost, in every year. Round 3 reopened single stocks for one test, earnings straddles, on my approval and for that test only. It failed. Round 4, six days later, ran five structural tests. They came out of a deliberately divergent exercise: the agent was asked for twenty mechanisms by which a small automated account could be the one who gets paid, from first principles, with no data and no literature, ranked by how far each sat from anything we'd already tested. Four of the five failed. One passed on paper, and I closed it on a closer look. One variant from the round was reopened in a human-guided form as a forward test, and that's as far as this series describes it.

A survey we wrote after the rounds puts the lesson in one sentence: everything tested failed the same way. The premium, or the mispricing, was about the size of the bid-ask spread a retail order pays. In liquid listed options the money goes to whoever earns the spread or carries tail risk on a large balance sheet, and an order that crosses the spread is on the wrong side of both. About 136 named variants, closed.

Fail-closed data

The execution platform's rails have counterparts here, and one of them has the July incident from part one behind it.

The data root has no default. Every study reads its data from one directory named by an environment variable, and the code refuses unless the variable is set, the path is absolute, and the directory holds a marker file. The module's own docstring says why: "Argus once resolved its database against the working directory by default, and a bare run from the wrong directory reached the live database; the default was the mechanism." Here the failure would be quieter. With the network share unmounted, a search over a missing directory returns nothing, and a study would read zero sessions instead of failing. And the operating system can remount a share under a slightly different name, so a path that exists isn't proof it's the right one. The marker file is what proves it.

One vendor client per key, and the client is built in one place. A pull refuses to start while another is running. The vendor's library is pinned to one version, and it's always constructed through a single function, for a reason I'll get to in the next section.

The cutoff. No session on or after September 28, 2026 is ever requested, and the function that resolves a date raises an error if asked. Live forward tests were running on those days inside Argus, and reading them from a second source would have been a look before the look.

The license. The data is licensed for personal use. Raw and row-level data is written only to a directory the repository ignores, and a check refuses any path inside the repository that isn't ignored. Only aggregates get committed.

Provenance. When we split the research out of Argus, every carried-over commit got a new identifier, and the results notes cite the old ones. So a map file records every old identifier against its new one, the milestone commits are listed in both forms, and the provenance note says in plain words that the Argus repository must never be deleted, because the citations point into it.

Three moments the loop caught something

The vendor library that reached for the trading credentials. The vendor's client library calls a dotenv loader every time a client is constructed, even when the API key is passed in explicitly. With no path given, that loader starts at the library's own file and walks up the directory tree until it finds a file named .env. The research environment lived inside the Argus repository. The walk would have ended at Argus's .env, which holds the trading credentials, and loaded them into a research process that had no business holding them. We verified that on September 30, before the first pull, and the fix is one argument: the client is built through a single function that names an empty file as the dotenv path, which stops the search. The rule that the client is only ever built through that function exists so nobody builds one bare.

A missing quote that sorted above every number. The vendor reports a quote that doesn't exist yet as NaN, not-a-number. The dataframe library used for the replay orders NaN above every number. So a filter that asked for a positive ask price accepted quotes that weren't there, and a replay that trusted it would have priced trades against nothing. One function now defines what an offered quote is, with the finiteness test first, and its docstring says the test is load-bearing. The record doesn't say how this one was found.

The default that was never written. The data root is the one of the three where the rule came before the incident. It was designed in at the split, from the Argus lesson, with the remount twist written into the docstring. I include it because that's the lesson of both articles. A rule that depends on anyone remembering it, person or agent, gets broken on an ordinary day, and the agent's version of forgetting is a new session. This time the rule was written down before anyone paid for it.

The human in the loop

None of this was the agent deciding on its own. The places where I had to be the human are specific, so here they are.

Checkpoint 0 was mine: eight items, "yes to all," on September 30, before a quote was requested. The milestone commits, the freeze and each results file, were mine to make, so the record of what had been seen, and when, carries my name. Reopening single-stock options for one earnings test on October 1 was a decision only I could take, because the program's own rules had closed that direction and only its owner can approve an exception, with a dated plan written first.

The one I'd point to is from October 2. A plan's plain-terms section had opened with the forecast, what the test was expected to show. I had it rewritten so the goal came first: profit after costs, stated before any prediction. Two things of substance changed with it, both before any price was read. The questions now asked not only whether a rule's passing trades beat its failing ones, but whether they were profitable after costs at all. And no rule could be promoted on a flat book.

And the sentence about the best of 45 variants allowing nothing is one I had to be willing to publish. Pre-registration only works if the owner would rather have the true answer than the useful one.

What I would tell a quant team

If your team is about to put AI agents on the research that justifies a strategy, these are the rules I'd start with.

  1. Commit the questions before the data arrives, and let the code check the commit. A pre-registration that lives only in a document is a promise. Ours is checked: the scorer looks in the repository for the freeze before it will score anything, and refuses a second look at the held-out period.
  2. Seal the recent years and count the keys. We allowed three looks, ever, each named in a committed document first, and the engine refuses a sealed date without one.
  3. Decide what "nothing found" permits before you look, and make it an acceptable answer. Put it in the plan in plain words, with the reason. Ours says a false positive costs real money.
  4. Measure your costs from your own fills. We took the haircut from the fills Argus had already made live, not from an assumption about the midpoint, and the fees from the real schedule.
  5. Keep a ledger of every variant, including the failures. You can't correct for a search you didn't record, and without that correction a lone "yes" is worth nothing. Ours holds a hundred lines.
  6. Put the data root, the credentials and the license boundary under the same fail-closed discipline as production. A research process that can read the wrong directory, load the wrong secrets, or commit the wrong rows is a production incident wearing a lab coat.
  7. Have the agent draft the plan, and then review it as if you were going to sign it, because you are. Most of what I changed in those plans was the order of sentences. On October 2 that's what put profit after costs ahead of the forecast, and two things of substance in the test changed with it.

What is next

The platform now holds one forward test, pre-registered before its first scored day and scored by rules signed in advance, on the second strategy the execution platform runs in shadow. Whether it earns capital is a question the same machinery will answer, the same way. I won't know the answer before the rules say I can.

If your team runs strategies, or is about to put AI agents on the research that justifies them, the two-week Rails Review from part one covers this side too: the pre-registration locks, the data discipline and the ledger. A strategy that was never tested honestly is a rail failure waiting for capital. Use the contact form. Part one, on the execution platform and its safety rails, is where this series begins.

Nothing in this article is investment advice. The strategy it tested lost money and was shut down.


Glossary

TermMeaning
Pre-registrationCommitting the questions, the scoring and the stopping rule before the data is seen
Held-out periodData set aside, never used in development, and scored once at the end as the check
FreezeThe commit after which the scoring code may not change, enforced by the scorer checking the repository
FinalistAn idea allowed one look at the sealed years; three were permitted in total
Bid-ask spreadThe gap between the best price to buy and the best price to sell; a retail order usually pays part of it
Fill haircutThe share of that gap a real fill gave up, measured from live fills and applied to historical quotes
Known-answer gateA check that a new engine reproduces a frozen result before it is trusted with a new question
Permutation testA test of whether a result could have arisen by chance, by relabeling the data many times

Rich Termondt spent 25 years building trading infrastructure, including the order-entry and market-maker gateways at the New York Stock Exchange and the market-connectivity, FPGA and DevOps teams at Chicago Trading Company. At Termondt Tech he now guides AI agents to build fully automated systems that a human can monitor and stop; Argus was written by Claude Code under his direction and review, and its first strategy was shut down on his evidence.

Tags

Practical Tech Notes (No Noise)

Get occasional updates when we publish new guides, fixes, and product updates across IT support, web development, and AI—written for small businesses and builders who want clarity, not hype.

No spam. Unsubscribe anytime.

* indicates required

Intuit Mailchimp