Learn › Q&A › Can I edit a strategy the AI built for me?

Can I edit a strategy the AI built for me?

On a well-designed platform, always — that's the point of generating blocks rather than code. The AI's draft appears on the same canvas as a hand-built strategy: every trigger, condition, and action is a visible block you can modify, remove, or extend. Change the RSI threshold from 30 to 25, add a stop-loss, swap the ticker, then re-backtest in seconds. Treat the AI as a fast first draft, not an oracle: read what it wrote (it reads as plain sentences), check the backtest's trade list to confirm it behaves as you intended, and tune from there. If a tool won't show you the rules the AI created, you can't audit what your money will do — walk away.

Yes. A strategy the AI builder produces is an ordinary strategy on DeployQuant. It opens in the same editor as one you assembled yourself, and every rule in it can be changed, removed or extended. The builder takes a plain-English description and returns a complete strategy, as blocks or as Python, that can be inspected, edited, backtested and deployed.

The reason this works is that the output is a set of readable rules and not a sealed result. Blocks read as sentences: WHEN the market opens, IF RSI(14) < 30, THEN buy. If the draft says 30 and you want 25, you change the 30. If it has no exit and you want a 15% trailing stop, you add one. Every edit can be backtested straight away on the same minute data the AI draft was tested on, so you see what the change did before any money is involved.

Every strategy is one set of rules with two views, Blocks and Code. You can edit either one and switch at any time. The AI strategy builder page explains how the draft is produced. What follows is the editing side: what you can change, how to check that a change did what you meant, and what the backtest can and cannot tell you about it.

The measured examples below come from the 12 strategy templates and 59 ETFs in the DeployQuant library, tested from 2021-01-04 to 2026-10-02 with $10,000 starting capital, no margin, and no fees or slippage in the headline run. They are hypothetical results. They show how sensitive a rule is to the kind of edit people make most often, which is a threshold, a ticker or an exit.

What you can change in the blocks view

A block strategy has three kinds of parts: triggers, conditions and actions. A trigger says when the strategy looks at the market, such as the open or a time of day. A condition is an IF clause, such as an indicator crossing a level. An action is what happens, such as buy, sell half, or take profit at a percentage. The AI draft is made of exactly these parts, so each of them is available to edit.

The common edits fall into four groups.

None of these needs code. A block strategy can also contain a Python step for logic the blocks do not cover, so an edit that goes beyond the block vocabulary does not force you to rebuild the whole strategy in another form.

The edit that changes results most is usually the symbol. The library shows this directly. RSI mean reversion buys when the 14-day RSI drops below 30 and sells when it recovers above 70. Across the 59 funds its median CAGR is 2.98% and its median maximum drawdown is 24.63%, and it beat buy-and-hold on 25 of the 59. The same rule on a different fund is a different strategy in practice, because funds spend very different amounts of time below 30.

Editing in the code view

The code view shows the same strategy as Python in the industry-standard algorithm format: a class with initialize and on_data, scheduled events, indicators, set_holdings and liquidate. Edits made here run on the same engine as block strategies, in backtests and live.

The code view has AI editing. You describe a change in words, such as adding a 15% trailing stop, or ask a question, such as why the strategy exits early, and the AI edits the code. Each change is checkpointed, so undoing it is one click, and the history lists every backtest run with its return. That history is useful for editing in a disciplined way: you can see which change moved the result and go back to the one before it.

When you switch between views, the AI converts blocks to Python or Python to blocks. After each conversion it backtests both versions and compares the fills. A conversion that changes the trades is caught before it is saved. The practical meaning for editing is that you can start in blocks, open the code to make an adjustment the blocks cannot express, and return to blocks without the two versions drifting apart unnoticed.

Python you write by hand or paste in runs on the same engine as the AI draft. A strategy you wrote yourself and a strategy the AI wrote therefore get the same data, the same order fills and the same decision log.

Checking an edit against the trade list

An edit is only useful if the strategy now does what you intended, and the backtest has a place to look. Every decision is logged with the prices and indicator values the strategy saw at that moment. This is the decision journal: for each action or inaction, it records which rule was evaluated and what the operands were.

A short routine works for any edit.

The trade count is the quickest sanity check. A rule you meant to loosen should trade more often, and a rule you meant to tighten should trade less. The library templates show how wide the range is. RSI(2) snapback has a median of 166 round trips across the 59 funds. Weekly 7% target has a median of 106. Trend + trailing stop has a median of 4. If an edit to a rule of the third kind suddenly produces more than a hundred round trips, the edit did something other than what you described.

Reading entries against the decision log also catches the quiet mistakes: a threshold typed into the wrong block, a ticker that was changed in the entry but not in the exit, or a condition that is always true. These do not raise an error. They only show up as trades that happen on the wrong days.

Example: lowering an RSI threshold

The usual first edit to an RSI strategy is the entry level. The draft says buy below 30. Changing it to 25 makes the rule stricter, so it should trade less often. How much less depends on the fund, and the facts show why.

Over the test window, SPY had 18 sessions with RSI(14) below 30. Over 5.74 years that is rare, so a stricter level would leave very few trades on SPY. After those 18 sessions, the median forward 5-day return was 3.74%, against a baseline median of 0.42% for all sessions. The median forward 20-day return was 2.86% against a baseline of 1.73%. The sample is 18, so these are descriptions of this window and no more.

TLT looks different. It had 61 sessions below 30, and the median forward 5-day return after them was 0.02%. The fund fell 40.49% in total over the window, with a maximum drawdown of 44.06% that had not recovered by the end. An oversold reading on a fund in a long decline kept being followed by more decline, so a lower threshold changes little there. It only waits longer inside the same slide.

TQQQ had 18 sessions below 30 and a median forward 5-day return of 10.3%. UVXY had 116 sessions below 30 and a median forward 5-day return of -1.79%. IWM had 33 sessions and 1.78%. The same edit applied to these four symbols would have produced four unrelated results, and the edit itself would look identical on the canvas.

The point for editing is that a parameter is not a standalone setting. Its effect depends on how the fund behaves. When you change a level, change one thing and backtest it on the fund you intend to trade, because a result on SPY says little about the same edit on TLT.

Example: adding or changing an exit

Exits are the second most common edit. The trend + trailing stop template enters when price is above the 200-day average and exits only when a 15% trailing stop is hit. Across the 59 funds it has a median CAGR of 2.61% and the deepest median maximum drawdown of the three templates discussed here, at 31.15%. It beat buy-and-hold on 20 of the 59.

That template shows what an exit controls. A wide stop keeps you in long trends and gives back a large part of the gain before it fires, so the drawdown stays deep and the trade count stays small. Narrowing the stop would cut the drawdown per trade and increase the number of exits, including exits followed by a recovery. Whether the net effect helps is something only the backtest on your chosen fund can say.

The 200-day regime filter uses the opposite design: it holds cash whenever price closes below its 200-day average. Its median CAGR is 1.84%, its median maximum drawdown is 22.16%, and its median round trips are 18. It beat buy-and-hold on 26 of the 59. Adding a stop to a strategy that already has a regime exit creates two competing exit rules, and the trade list will show which one fired each time.

The weekly 7% target is the plainest example of an AI-style description turned into rules: buy at the first open of each week, rest a profit target at +7%, and exit Thursday afternoon if the trade is losing. Its median CAGR is 6.61%, its median maximum drawdown is 26.26%, and it beat buy-and-hold on 34 of the 59. Changing the 7% to another number, or Thursday to another day, are the same kind of edit as the RSI level. Each one is a number on a block.

Treat these medians as a reference for how the unedited templates behave. They are not a forecast for an edited version.

How many edits are too many

Editing gives you a way to tune a strategy until its backtest looks good, and that is a risk of its own. Each change you test on the same window uses up some of the evidence. After enough tries, the best-looking version partly reflects the window and not a durable rule.

The library gives a reference point. The templates are tested on one window, 2021-01-04 to 2026-10-02, which is 5.74 years and contains one large bear market: SPY fell 24.51% from 2022-01-03 to 2022-10-12 and QQQ fell 35% from 2021-11-19 to 2022-11-03. A threshold tuned on that window has seen one bear market and one recovery. A change that improves the result in 2022 and nowhere else deserves suspicion.

Some habits keep the edit count honest.

Each platform page for a template also shows parameter variants, so you can see how much a result moves when a number moves. The strategy library has all 12 templates, and the pages for individual funds list those variants.

What editing costs

Editing by hand costs nothing. Free accounts have unlimited strategies and backtests. The build token is spent only when the AI builder produces a new strategy, and it is spent only on success: a build that fails or is rejected costs nothing. New accounts get 5 tokens at signup, Pro includes 20 a month, and packs are 5 for $5, 20 for $16 and 100 for $60.

That means the sequence of generating a draft with the AI and then adjusting it yourself uses one token for the draft and none for the adjustments. Asking the AI to edit the code in the code view is a separate AI action from building a new strategy, and the product reference describes it only as AI editing with checkpoints and an undo.

Pro is $10 a month for up to 20 live strategies at a time, side by side. The free plan allows 1 live strategy. Editing a strategy that is already live follows the same rules as any other edit, so the next section matters.

Editing a strategy that is already running

A deployed strategy runs in its own sleeve, with its own cash, positions and profit and loss. Every order is tagged with the strategy that placed it, and each order is checked against that sleeve's cash before it is sent. A strategy that sells everything only sells its own positions. Other sleeves in the same account are unchanged, and so are positions you trade by hand.

For editing, this isolation has a plain consequence: working on one strategy does not touch the others. You can pause, resume or stop one strategy without affecting the rest, and you can add cash to one sleeve without moving money from another.

Real money only moves after you type an explicit confirmation on a live deployment. Price bands refuse limit orders priced too far from the market, and there are per-order and per-position dollar caps. Dry-run mode runs the whole order flow without sending any order to the broker. Paper trading on live data needs no broker at all, which makes paper trading a reasonable place to see an edited strategy behave before a connected account is involved.

Alpaca supports live and paper accounts. Webull and Charles Schwab are live only. The broker pages cover each one: Alpaca, Webull and Charles Schwab.

Why the rules need to be visible

The short answer on this page says that a tool which hides the rules the AI created leaves you unable to audit what your money will do. The product's design follows that idea in several places. The draft is rules and not a result. Each trade has a logged reason. A conversion between blocks and Python is backtested on both sides, and the fills are compared.

The no-code trading glossary entry describes the logic of a block strategy as identical to a programmed version, with triggers, conditions and actions expressed in a form anyone can read. A constrained rule language also removes classes of bugs that hand-written code can contain.

A visible rule is also a rule you can disagree with. If the AI read your description differently than you meant it, for instance by choosing a different RSI period or by trading a different symbol, you can see that in the blocks and fix it. The check is cheap: read the draft top to bottom as sentences, compare each clause with what you asked for, and only then run the backtest.

This is the main protection against a misreading. A backtest can show that a strategy made or lost money. It cannot show that the strategy is the one you intended, and the rule text and the trade list are what show that.

What the backtest does and does not confirm

The numbers on this page come from daily-decision rules evaluated by DeployQuant's engine on minute-resolution consolidated US market data. Orders fill on minute bars. The headline run has no fees or slippage, and the library's cost runs add 5 and 10 basis points. There is one window, 5.74 years, and it starts in January 2021.

After an edit, the backtest confirms that the new rules would have produced the logged trades on this data. It does not show how the rules behave in a different market, and it does not show what a live order would fill at.

A 520-fill example gives a sense of how closely the engine reproduces a reference run. The engine's own quick-start strategy, a weekly TQQQ rule, backtests to $13,603.38 from $1,000 with 520 fills and a maximum drawdown of 37.90%, and the run takes 1.90 seconds. A run that fast means you can test many variants in a session, which is also the reason the count of edits is worth watching.

These results are hypothetical and are not investment advice. Live trading can lose money.

Frequently asked questions

Can I edit a strategy the AI built for me?

Yes. The AI draft opens on the same canvas as a hand-built strategy, and every trigger, condition and action is a visible block you can change, remove or extend. In the code view you can edit the Python directly or describe a change and let the AI make it. Every change is checkpointed, so you can undo it in one click.

Do I need to know how to code to change an AI-built strategy?

No. Blocks read as sentences, such as WHEN the market opens, IF RSI(14) < 30, THEN buy, and you edit the numbers, symbols and clauses directly. Python is available for people who want it, and a block strategy can include a Python step for logic the blocks do not cover.

Does editing cost AI tokens?

Editing by hand costs nothing, and free accounts have unlimited strategies and backtests. A build token is spent only when the AI builder produces a valid, backtestable strategy, and a failed build costs nothing. New accounts get 5 tokens, Pro includes 20 a month, and packs start at $5.

How do I check that my edit did what I intended?

Backtest before and after, and compare the return, the drawdown and the trade count. Then open the trade list and the decision log, which records the prices and indicator values the strategy saw for each decision. Confirm that each entry and exit happened on a day when the rule you wrote was true.

Is it safe to keep tuning a strategy until the backtest looks good?

Each test on the same window uses up some of the evidence, so a heavily tuned result partly reflects the window. The library tests one window of 5.74 years that contains one large bear market, 2022. Changing one thing at a time, writing down why, and checking neighbouring values and a second fund all limit the problem.

Can I edit the strategy after it is deployed with real money?

Each deployed strategy runs in its own sleeve with its own cash and positions, so working on one does not touch the others. Real money only moves after a typed confirmation, and price bands and dollar caps apply to orders. Paper trading on live data needs no broker and gives you a way to watch an edited strategy first.

Run your first strategy yourself, free →

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

No-Code TradingdefinitionDecision Journaldefinition

Related questions

How does an AI trading strategy builder work?answered

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.