I built a 20,000-line AI trading system. It made less than 1%.

In twelve days this spring I built what I believed was a small hedge fund in a box: five orthogonal trading engines, a two-layer market regime detector, Kelly-criterion position sizing, and — the part I was proudest of — an adversarial AI pipeline where one language model argued for every trade, another argued against it, and a third judged the debate. Twenty thousand lines of Python. Ninety-eight tests. A live dashboard. It ran autonomously on a free-tier cloud server, screening every candidate for Sharia compliance before any other gate.

It returned less than one percent. Then the server died, and I didn't notice for four months.

This is the autopsy. I'm publishing it because I looked for a post like this before I started and couldn't find one — the graveyard of retail trading bots is enormous but silent. And because the one component that survived the autopsy became the company I'm building now.

What I built

The architecture was genuinely nice, which is part of the problem. Every trade candidate passed through four sequential gates: a Sharia compliance screen, a composite fundamentals score, the LLM debate, and a risk engine. Each gate could veto a trade or shrink its position size. Signals came from five engines designed to be uncorrelated — mean reversion, momentum breakouts, volatility squeezes, cross-asset trend following, and news events.

If you have engineering taste, you may already see the corpse in the room.

Why it made nothing

1. Multiplicative gates compound to zero

Four sequential gates, each multiplying position size by 0.3–0.7, compound to almost nothing: 0.5 × 0.5 × 0.5 × 0.5 ≈ 0.06. My system wasn't cautious — it was structurally incapable of taking a meaningful position. The few trades that survived were sized like rounding errors. This wasn't a tuning problem; it was arithmetic I had built into the architecture and never simulated end-to-end.

2. I never backtested the system I actually deployed

I backtested the signals — in isolation, without transaction costs, on a handful of symbols. I never once simulated the full gate pipeline as deployed. The system that traded real money had never existed in a simulation. Under 5% of my engineering hours went to validation; the Discord bot alone got four times the code of the backtester.

3. LLM judges don't know the future

The bull/bear/judge debate felt rigorous. It produced beautiful, articulate reasoning — and there is no evidence, in my data or anyone else's, that it added alpha. In the one major live experiment where frontier models traded real money autonomously, most of them lost double-digit percentages in weeks. Language models are extraordinary at explaining and terrible at predicting prices. I had hired a debating society as a portfolio manager.

4. The ops failure was the honest verdict

The cloud project's billing lapsed in April. The server was reclaimed, the system went dark, and every alert died with it — because all my alerting ran on the server being monitored. I found out in August. A trading system that can die silently for a third of a year has told you something more important than any backtest: nothing depended on it. No customers, no revenue, no stakes. It was a hobby wearing a business costume.

The arithmetic nobody wants to do

Even if everything had worked — even at a genuinely elite 20% annual return — 20% of a $50,000 account is $10,000 a year. The world's best quant funds deliver their numbers through massive leverage, six-figure trade counts per day, or billions in flow. A solo trader's edge, if it exists at all, pays hobby wages. The people who actually built wealth in this space — every single one I studied — built the platform, the fund, or the product around trading. Not the P&L of a small account.

What survived the autopsy

One module kept earning its place: the Sharia compliance screener. While the trading engines were hallucinating edge, the screener was doing something real — pulling audited financials from SEC filings, computing debt and interest ratios against four scholarly methodologies, calculating purification amounts. It had no opinion about the future. It only made claims it could cite.

And it turns out the market for that is real and underserved. Two billion Muslims; a handful of screening apps that disagree with each other and show no receipts; institutional screening data locked behind $30,000-a-year contracts; and a regulator that just fined the biggest halal robo-advisor for weak compliance process. The thing my trading system treated as plumbing was the product.

Daleel — Arabic for "evidence" — is that screener, rebuilt as a public product: every verdict cites the filing behind it, every methodology is checked side by side, and missing data is never quietly treated as compliant.

What I'd tell you if you're building a trading bot

I chose the product. You can watch it happen here — receipts included, as always.


Daleel screens US-listed equities against AAOIFI, DJIM, MSCI and S&P methodologies using SEC EDGAR filings. Try the live demo or join the API waitlist. Verdicts are methodology calculations, not religious rulings; nothing here is investment advice.