AI builder

How Quant-AI turns plain English into a StrategySpec, how to prompt it well, and how to diagnose and fix dead clauses.

Last updated · 2026-05-13

Quant-AI is a chat surface that translates English descriptions into a valid StrategySpec. Under the hood it is a frontier language model running under a strict JSON-schema constraint, so the only thing it can emit is a spec the backtester accepts.

How it works

  • You describe the strategy in plain English in the chat panel.
  • Quant-AI parses your intent, picks indicators, drafts a clause tree, and emits a candidate spec.
  • The candidate is validated against the schema. Invalid specs are rejected internally and the model is re-prompted up to three times before you see anything.
  • The spec lands in the editor on the right. You can edit JSON directly, or keep iterating in chat.
  • Every change is versioned. You can roll back to any previous draft.

How to prompt well

The single biggest factor in output quality is specificity. The same five attributes appear in every good prompt:

  • Symbol. "EURUSD", "XAUUSD", "NAS100" — never "forex" or "the market".
  • Entry timeframe. "5-minute", "1-hour". The model will pick one if you do not, and you will probably disagree with the pick.
  • Risk budget. "0.5 percent per trade, 3 percent daily drawdown cap" beats "low risk" every time.
  • HTF filter. Mention whether higher-timeframe trend should gate entries — for example, "only long when 1-hour price is above the 200 EMA".
  • News filter. If you want to avoid high-impact macro events, say so explicitly.

A good prompt

Build me a 5-minute mean reversion strategy on EURUSD.
Go long when RSI(14) drops below 28 and price is above the lower Bollinger band (20, 2 stddev) on the 1-minute chart.
Only trade between 07:00 and 16:00 London time.
Block entries 15 minutes around high-impact news.
Risk 0.4 percent per trade, daily drawdown cap 3 percent.
Stop at 1.5 ATR, target at 2.5 ATR, move stop to breakeven at 1.0 ATR profit.

A weak prompt

Make me a profitable EURUSD scalper.

The weak prompt produces a spec, but the indicators, timeframe, and risk numbers are all guesses. The good prompt produces one that already reflects your assumptions.

Iterating in chat

Treat the conversation as a refinement loop. Common follow-ups:

  • "Tighten the stop to 1.0 ATR and trail it after 1.5 ATR of profit."
  • "Add a higher-timeframe filter — only short when 1-hour price is below the 200 EMA."
  • "Move sessions from London to New York."
  • "Drop the news filter entirely; I want to trade through events."

Each message produces a new candidate spec. The diff against the previous version is highlighted in the editor so you can see exactly what changed.

Dead clauses

A dead clause is an entry condition that fires fewer than one percent of the time over the chosen backtest window. Common causes: a threshold set too aggressively (RSI under 10 on a major pair), an indicator timeframe mismatch (a 1-minute condition gating a daily strategy), or a logical conflict (long when RSI < 30 and RSI > 70).

When you run a backtest, the engine returns a deadClauses diagnostic listing any clause that did not contribute a meaningful number of evaluations to the firing rate. Quant-AI reads that list and proposes fixes. You can also paste it into chat and ask:

The backtest flagged these dead clauses:
- entryLong.all[1] (rsi14 < 5) fired 0.02% of bars

Loosen this without breaking the mean-reversion thesis.
Tip
A dead clause is not always a bug. If the clause is meant to be a rare quality filter and the rest of the system makes sense, the right move is to lengthen the backtest window, not loosen the clause. Quant-AI will not force a change you reject.

What Quant-AI will not do

  • It will not give you a target return. It is a code generator, not a forecaster, and any numeric promise it makes is hallucination — ignore it.
  • It will not connect to your broker on its own. Account binding always happens explicitly in Broker setup.
  • It will not deploy a strategy without your final confirmation in the Droplet page.
Validate, do not trust
Treat every AI-generated spec the same way you would treat code written by an unknown contractor: read it, backtest it, and only ship it after you can defend each clause.