How does an AI trading strategy builder work?
An AI strategy builder takes a sentence and returns a strategy you can run. On DeployQuant the typed description can be as loose as a weekly TQQQ trade that sells at a 7% gain and is cut on Thursday afternoon when it is down. The builder hands back a finished strategy, drawn as blocks or written as Python, ready to inspect, edit, backtest and deploy. The model does the translation. The engine handles every step after it, and it treats an AI-built strategy the same way it treats one you assembled yourself.
The output is a set of rules. Each rule has a trigger (WHEN the market opens), a condition (IF RSI(14) is below 30) and an action (THEN buy). This structured form is what the Strategy IR glossary entry describes: a strategy held as data instead of as free-form code. That is the part that makes the builder usable for people who do not write code, which is the subject of the related question on automating trading without coding. A no-code strategy reads as sentences, so you can check each clause against what you meant.
Pricing is per success. One token pays for one finished build, and a rejected or failed attempt leaves your balance alone. Signup brings 5 tokens, the Pro plan adds 20 each month, and extra tokens come in packs: 5 for $5, 20 for $16, 100 for $60. Backtests are unlimited on every plan, so a token pays for the translation and for nothing else.
One request travels from sentence to backtest to broker, and measured results from the library show what a plain-English idea becomes once it meets data. Every figure comes from a single window, 2021-01-04 to 2026-10-02, about 5.7 years, starting from $10,000 with no fees in the headline run.
The steps between a sentence and a backtest
The flow has five steps. You describe the strategy, the AI drafts it, you read what it drafted, you backtest it, and you change whatever the backtest shows you did not intend.
The draft is the step people ask about most. The model reads the description and fills in a structured strategy: which symbols, which schedule, which entry conditions, which exits, how much of the account each trade uses. Anything you left out has to be decided by something, so the draft contains choices you never typed. A description that says "buy the dip" has no threshold in it. The draft will contain one, and the number it picked is visible in the block, where you can change it.
Reading the draft is the control. Every block states its condition in a sentence, for example WHEN the market opens, IF RSI(14) < 30, THEN buy, sell half at +5%. You compare that sentence to your idea. If the AI read "Thursday afternoon" as a specific clock time, the time is on the canvas. If it chose a profit target of 7% where you meant 8%, the field shows 7.
The backtest comes next, and it runs on minute-resolution consolidated US market data. A multi-year minute backtest finishes in seconds, so the loop of describe, read, test, adjust is short. Each decision in the run is logged with the prices and indicator values the strategy had in front of it, so the reason for a trade can be read directly and does not have to be guessed from the equity curve.
Two limits apply to the test. Results in the library come from daily-decision rules, with fills on minute bars and no margin. Friction is left out of the headline run and added back in two separate runs at 5 and 10 basis points, which show how much of a result survives it.
Blocks, Python, and the check between them
A strategy is stored once and shown two ways, as Blocks or as Code. Either view can be edited, and switching between them is allowed at any point. The AI converts in both directions. Once it has converted, it backtests the old and the new version and lines up their fills, so a conversion that alters the trades is stopped before the result is saved.
This matters for an AI builder because a translation step is where errors enter. A model can write a plausible strategy that differs from the description in one clause. The fill comparison does not judge whether the strategy is a good idea. It checks that two representations of the same strategy trade identically, which is a narrower and more checkable claim.
Hand-written or pasted Python shares the engine with block strategies, both in backtests and live. Logic the blocks cannot express can sit inside a block strategy as a Python step. The code view also takes plain-English edits, for example a request to add a 15% trailing stop or to explain an early exit. Each edit is checkpointed and can be undone in one click, and the run history shows every backtest with its return.
The engine underneath is DQengine, published as source on GitHub and installable with pip. The hosted platform runs that same code. Release 0.1.0 backtests at second, minute or daily resolution, and the sample backtest in the product reference covers 2021-01-04 to 2026-06-09, 1364 sessions and 520 fills, finishing in 1.90s.
Why the output is structured data
The glossary entry on Strategy IR lists the properties that follow from holding a strategy as data. It can be hashed and versioned, so every live order can cite the exact strategy version that placed it. It always terminates, which a free-form script cannot promise. A backtester and a live engine can run it identically, so one strategy definition behaves the same in test and in production.
Constrained rule languages also remove classes of bugs that hand-written code invites. An infinite loop, a variable that is read before it is set and a misspelled symbol in a rarely used branch are all ways a script can misbehave without anyone seeing it. In a block strategy there is a fixed vocabulary of triggers, conditions and actions, and each one is a visible element.
For a model that writes strategies, a fixed vocabulary is also easier to validate. The builder can reject a draft that does not form a valid, backtestable strategy before you see it, and that rejection is why failed builds cost nothing. The token is spent when the result is usable, which is the point at which you have something to read.
What twelve plain-English ideas measured on 59 funds
Twelve strategy templates in the library stand in for the kind of idea a builder is asked to write. Each was backtested on 59 ETFs, and their one-line rules read like prompts. The medians quoted here are across those 59 funds.
The widest gap is between the active, short-holding rules and the slow trend rules. The weekly 7% target has the highest median CAGR of the twelve at 6.61%, with 106 median round trips and a median drawdown of 26.26%. It beat buy-and-hold on 34 of 59 funds. The RSI(2) snapback also beat buy-and-hold on 34 funds. Its median CAGR was 4.74%, and its median drawdown of 17.47% was the shallowest in the set. It also traded most often, at a median of 166 round trips.
The monthly cycle sits between them on return, with a median CAGR of 5.46%. Its median drawdown, 36.63%, was the deepest of the twelve, and only 14 funds finished ahead of buy-and-hold.
The trend rules cluster at the low end. Median CAGRs were 2.05% for the golden cross, 2.12% for the SMA 10/50 trend, 2.76% for the EMA 12/26 trend, 1.84% for the 200-day regime filter and 2.61% for the trend plus trailing stop. The golden cross made 3 round trips in the median, the EMA rule made 22. The trailing-stop version carried a 31.15% median drawdown.
At the bottom, the momentum breakout and the 3-month momentum rules had median CAGRs of 0%. The dip buyer managed 1.33% with 2 median round trips, because a 10% fall from the 20-day high happens rarely. RSI mean reversion came in at 2.98%.
Every one of these is easy to state in a sentence and every one backtests cleanly, and medians span 0% to 6.61%. A rule that is simple to describe can still have no edge on the fund you chose. The builder shortens the time to find that out, and the result of the test is a separate fact that the builder cannot change.
The same sentence on different funds
A described strategy is tied to a symbol, and the symbol decides much of the outcome. The library profiles six well-known funds, and the same oversold idea reads very differently across them.
Start with RSI(14) below 30, the trigger in a prompt like "buy when it gets oversold". SPY spent 18 sessions under that line. The median return over the next 5 sessions was 3.74%, while a typical 5-session window had a median of 0.42%. QQQ had 15 such sessions, with 3.69% afterwards against 0.56%. TQQQ had 18, with 10.3% against 1.24%.
TLT produced 61 sessions under 30, and the 5-day median afterwards was 0.02% against a baseline of -0.14%. The fund was falling through most of the window: it returned -40.49% in total, drew down 44.06%, and closed above its 200-day average on 35.18% of sessions. UVXY showed 116 sessions under 30 with a 5-day median of -1.79%, where the baseline was -3.53%. It finished the window down 99.94%.
Using the faster RSI(2) below 10 gives 146 sessions on SPY (0.89% median over 5 days), 144 on QQQ (0.8%) and 152 on TQQQ (1.73%). IWM had 165 sessions with a median of 0.55% against its own baseline of 0.18%.
Read together, one sentence compiles into six different strategies. A builder that transcribes the sentence faithfully has done its part. The backtest then says which fund the rule fits. The SPY, QQQ, TLT, TQQQ, IWM and UVXY pages each rank all twelve templates on that single fund.
What a description leaves out
Descriptions usually say when to buy and when to sell. They seldom say how large a loss is tolerable, and the funds differ widely on that.
Over the window, SPY compounded at 15.2% a year with a deepest drawdown of 24.51%. QQQ compounded at 17.39% with a 35% drawdown. TQQQ compounded at 26.86%, with annualized volatility of 67.11% and a deepest drawdown of 81.68%, running from a peak on 2021-11-19 to a trough on 2022-12-28 and recovering on 2024-12-04. It spent 762 sessions underwater at the longest. TQQQ lost 79.07% in 2022 and gained 198.32% in 2023.
IWM compounded at 8.03% with a 31.92% drawdown. TLT lost 8.64% a year and had not recovered when the window ended. UVXY ran at 103.95% volatility and fell 99.95% from peak to trough.
A prompt can name a stop, a position size or a cap on exposure, and the draft will carry each as a block. A prompt that leaves them out produces a strategy without them, and the backtest then reports the cost as a drawdown figure. The decision log and the drawdown table show where the losses came from, and that is the moment to edit the draft, either in a block or by asking the AI for a change in the code view.
Costs are a second gap. The headline run charges nothing, so a strategy making 166 round trips has far more exposure to friction than one making 3. For a high-turnover prompt, the cost runs at 5 and 10 basis points are the better guide.
From backtest to a live account
A backtest that looks acceptable moves to paper trading, which runs on the live feed and needs no broker. The step after that is connecting a brokerage account. Three are supported: Webull, Charles Schwab and Alpaca. Only Alpaca offers a paper account of its own, because Webull and Schwab are live-money only. Paper trading for those two goes through DeployQuant's paper mode.
A live deployment asks you to type a confirmation before any real money moves. Safety checks then sit on the order path. Limit orders priced too far from the market are refused by price bands. Dollar caps apply per order and per position, with a further cap on orders per sync, and none of them blocks an order that reduces exposure. A dry-run mode exercises the full order flow and sends nothing to the broker, and a pause switch exists for one strategy and for a whole broker connection.
Connections carry trade and read permissions and nothing that can move money out. Holdings stay in your brokerage account under your name. A deployed strategy gets a sleeve of its own, with separate cash, positions and P&L, and orders carry the tag of the strategy behind them. An AI-built strategy gets the same treatment as any other.
Order types and time-in-force options differ by broker, and each guide lists its own: Alpaca, Webull and Schwab. Plan limits apply to live strategies. The free plan runs 1, and Pro at $10 a month runs up to 20 side by side.
What the builder does and does not decide
The builder translates. It does not know whether your idea works, and it does not size your risk for you. A strategy it writes can be exactly what you asked for and still lose money, because the description was the weak point.
Several limits apply to every figure quoted here. The backtests are hypothetical and cover one window of 5.7 years that holds the 2022 drawdown and several strong years, so another window would give other numbers. Decisions are made daily and orders fill on minute data. Headline runs carry no fees or slippage. Trade-list prices are adjusted for splits and dividends, which puts them below the quotes printed at the time.
The sample sizes behind some of the fund statistics are small. SPY and TQQQ each had 18 sessions with RSI(14) below 30, so the forward-return medians for that condition come from 18 observations. Treat those as descriptions of what happened in this window, and not as a measured edge.
If a strategy comes out of the builder and survives the backtest, the sensible next test is a different fund, a different year range and the cost runs. The strategy pages in the library show those variations for the twelve templates, and the same steps apply to anything you describe yourself.
Frequently asked questions
How does an AI trading strategy builder work?
You describe a strategy in plain English and the AI returns a structured strategy of triggers, conditions and actions, as blocks or as Python. You can read it on a canvas, edit any block, and backtest it straight away. The backtest engine and the live engine run it the same way they run a strategy built by hand.
Does the AI write code I have to trust?
The result is a list of readable rules, so each clause can be set beside your description. Moving between the Blocks and Code views triggers a backtest of both versions and a fill comparison, which stops a conversion that would change the trades.
How much does an AI strategy build cost on DeployQuant?
One token per successful build, and a build that fails or is rejected costs nothing. New accounts get 5 tokens free, Pro includes 20 a month at $10 a month, and token packs are 5 for $5, 20 for $16 and 100 for $60. Backtests are unlimited on every plan.
Can I edit a strategy the AI built?
Yes. In the Blocks view you change any block directly. In the Code view you can edit the Python or describe a change, such as adding a 15% trailing stop, and the AI edits the code. Every change is checkpointed, so undoing is one click.
Will the AI strategy make money?
The builder only translates your description into rules, so it makes no claim about results. The library's twelve templates show how wide the range is: median CAGR across 59 funds ran from 0% to 6.61%, and the same rule behaved differently on SPY, TLT and UVXY. Backtests are hypothetical and cover 2021-01-04 to 2026-10-02.
Do I need a broker to try the AI builder?
No. You can build, backtest and paper trade on live market data without a brokerage account. To run with real money you connect Webull, Charles Schwab or Alpaca and type an explicit confirmation on the live deployment.
What happens to my strategy after the AI builds it?
It is saved as one set of rules with a Blocks view and a Code view. You can backtest it, read the decision log for each trade, paper trade it, and then deploy it in its own sleeve in your brokerage account.
Build it from blocks (or type it in English), backtest it on 5.7 years of minute data in seconds, tweak any parameter, then paper trade it on live data. No card, no broker needed to start.
Terms used here
Related questions
Backtests are hypothetical, computed by DeployQuant's engine on minute-resolution consolidated US market data (2021-01-04 to 2026-10-02, $10,000 starting capital, no margin, no fees or slippage in the headline run; buy-and-hold puts 98% of the account in at the first open, as the templates do) and do not guarantee future results. Nothing on this page is investment advice. Live trading involves risk of loss.