Kieran Duff
Home Letters Handbook Order splitting Strategy funnel About Subscribe
Process · Note 029 · 7 Jul 2026

Automated Build Loop

Most of strategy research isn't the clever bit. It's sourcing, reading, scaffolding, reformatting, wiring in the same filters again and again. I spent a long time doing that on a strategy by strategy basis. Now a scheduled job does it while I get the kids ready for school, and I look at the output over a coffee.

TL;DR
Automated Build Loop cover image

Here's what actually runs, and where I still have to sit in the chair.

What does the automated pass do?

Every morning a scheduled task goes out and scrapes for highly-cited trading frameworks, then cross-references them against quant authors I actually respect, so I'm not building on someone's "blog-post hunch". It reads the full source, identifies the causal mechanism and the known failure modes, cross-checks the claim against arXiv and SSRN, then synthesises the viable candidates. It runs each one through my own code library to split every entry into a multi-position structure, hooks in my volatility filters, and drops the drafted strategy file into my strategy-funnel directory.

By the time I sit down, the overnight grind is done. The candidates are sourced, sanity-checked against real literature, and pre-shaped into the structure my testing pipeline expects. That's the boring 90%, and it's the part that used to eat so much mental capacity (i.e. what do I build, and how do I build it?).

What's the build stack underneath it?

It's leaner than people expect, and there's no third-party strategy generator in this. The whole loop runs on a scheduled Claude Cowork task and my own code library.

The Cowork task is the engine. In the morning it scans the sources, due-diligences each find against the actual literature, writes the hypothesis, and drafts the strategy straight into MQL5. It isn't spitting out vague pseudocode. It builds every candidate against my own scaffold: eighteen standard modules plus a position-ticket-capture pattern that every strategy I run inherits. That scaffold is where the guardrails live. Slippage and spread filters, volatility filters, drawdown breakers, consecutive-loss limits, hard max-loss and max-gain triggers, position count and time-of-day controls. I built that library once. Now every candidate is born with it wired in.

I built that library once. Now every candidate is born with it wired in.

Before anything reaches me, a post-flight validator greps every draft and rejects any file missing a module or breaking one of my audit rules. A half-built strategy never makes it into the review queue.

Then the loop backtests and optimises what is ready. My Python backtester produces the results, and the optimiser runs a grid search, a walk-forward, and an ML signal-filtering pass on top. By my morning coffee I have candidates that are sourced, drafted to my own spec, validated, and in a lot of cases already backtested.

Alongside the automated loop I keep Claude and Codex open as build partners. They're sharp at red-teaming logic and scaffolding one-off code, and I lean on that constantly. Ask either one to tear holes in a sizing rule and you get something sharper than a lot of manual review.

Where does the automation stop?

It stops at the two things the machines are weak at, and they're the two that decide whether you make money.

The first is portfolio construction. The loop will hand me a stack of candidate strategies by the time I sit down. It cannot tell me which five belong in the live book and which fifteen are the same trade correlated through one hidden factor. That judgement, which strategies actually diversify each other once real capital is behind them, is still mine.

The second is live-versus-backtest judgement: knowing when a clean backtest is describing a real edge, and when it's describing the sample it was fit to. The tools will happily generate a beautiful curve. Telling a real one from a fitted one is experience, and I haven't found a way to outsource it yet.

So the split is deliberate. Automate the sourcing, the scaffolding, the filter-wiring, the drafting. Keep a human on the two decisions that carry the risk. The machines gave me my time back. They didn't give me a book I can run without thinking, and I'd be suspicious of anyone telling you theirs did.

Personal commentary, not advice. Capital at risk.

Kieran Duff runs XAQP, a systematic strategy live since April 2025 with around $3.7M in capital through Darwinex as of June 2026. He writes about how a systematic book is actually managed.

Disclosure. Personal commentary, not financial advice. Capital at risk. I am an employee of Darwinex; content touching Darwinex products may represent a conflict of interest, disclosed per MAR Article 20.

XAQP figures are point-in-time as of June 2026 and will change.

The Letter

Get the next letter in your inbox.

Please consider subscribing to receive more episodes of The Letter.

Subscribe now