Strategy IR (Intermediate Representation)
A strategy IR, short for intermediate representation, is a trading strategy written as structured data. It lists triggers, conditions and actions. It contains no executable program. The same file can be read by a person, hashed, versioned, run by a backtester and run by a live engine, and the two engines treat it identically.
DeployQuant builds its strategies this way. The definition on this page says an IR is hashable and versioned, so every live order can cite the exact strategy version that placed it. It says an IR always terminates, and that it runs identically in a backtest and in production. Those four properties follow from keeping the strategy as data.
Each property has a practical meaning and a limit. The numbers used to show them come from DeployQuant's own backtests of 12 strategy templates on 59 ETFs, covering 2021-01-04 to 2026-10-02 with a $10,000 start. Headline runs apply zero fees and zero slippage, so every figure is hypothetical. The related entries on no-code trading and backtesting cover the building style and the testing method that sit around an IR.
What a strategy IR contains
Three kinds of element make up an IR. A trigger says when to look: the market opens, a bar closes, a scheduled time arrives. A condition says what has to be true: RSI(14) is below 30, price is above its 200-day average, the position is losing. An action says what to do: buy, sell half, rest a profit target, liquidate.
The block view shows the same shape in plain words. The product reference gives WHEN the market opens, IF RSI(14) < 30, THEN buy and sell half at +5% as its example. Each capital word maps to one element. The plain-English builder produces the same structure from a sentence. Its plain-English example describes buying TQQQ at the week's first open, selling at +7%, and leaving on Thursday at 2pm if the trade is down. Written as an IR, that sentence becomes a weekly trigger, a time-of-day trigger on Thursday, a profit condition, and a short list of actions.
The weekly 7% target template follows that pattern: buy at the first open of each week, rest a +7% profit target, and exit Thursday afternoon if the trade is losing. Its median across the 59 funds was 106 round trips, a CAGR of 6.61% and a maximum drawdown of 26.26%. The rule has three moving parts, and a reader can check each one against the trade list on any of its pages.
A different template has a different set of elements and the same structure. The golden cross stays long while the faster 50-day average sits over the 200-day and goes to cash on the cross back under. That is one condition and two actions. The dip buyer needs a 10% drop from the 20-day high before it buys, and it then rests a +8% exit. That is one condition, one entry and one standing exit. In both cases the list is short enough to read in a minute.
Why data rather than code
A program can do anything its language allows. It can loop without end, depend on the order in which things happen to run, or behave differently when moved from a test setup to a live system. Review is hard because the reviewer has to understand the whole program to be sure what it does.
A structured rule list limits what can be expressed. The no-code trading entry makes a related point: constrained rule languages remove entire bug classes that hand-written code invites. An IR sits at the constrained end. There is nothing in it to hang, nothing hidden in a helper function, and nothing that reads a clock or a file in a way the engine did not provide.
The limit also helps with reading. Blocks that read as sentences allow someone who did not write the strategy to audit it. The 200-day regime filter is a single statement: be invested while price closes over its 200-day average and sit in cash while it closes under. Its median across the 59 funds was 18 round trips, a CAGR of 1.84% and a drawdown of 22.16%, and it beat buy-and-hold on 26 of the 59 funds. All of that can be traced back to one condition and two actions.
The trade-off is expressiveness. Logic that the blocks cannot say has to go somewhere else. DeployQuant handles this in two ways. A block strategy can contain a Python step for logic the blocks do not cover. Every strategy also has a Code view, written in the industry-standard algorithm format, and Python written by hand or pasted in runs on the same engine as block strategies. The properties described on this page apply to the structured part. A Python step is code, and the definition says nothing about it.
Hashing and versioning
An IR is hashable because it is data with a fixed form. Two copies that say the same thing produce the same hash, and any change to a trigger, a threshold or an action produces a different one. The definition adds that an IR is versioned, so a strategy that changes over time leaves a trail of numbered versions.
The practical use is stated in the definition: every live order can cite the exact strategy version that placed it. When a position looks odd, the question of which rules were running when the order went out has a precise answer. Nobody has to reconstruct it from memory or from an edit history.
This fits with the rest of the order path. Each order carries a tag naming its strategy, and each fill goes back to the originating sleeve. The decision log keeps the prices and indicator values in view at each decision. Put the version on the order, the tag on the sleeve and the readings in the log, and a single trade can be explained end to end: which version, which inputs, which rule fired.
The code view also keeps history. Every AI change to code is checkpointed, so undoing takes one click, and the history lists each backtest run with its return. The Python side therefore has a version trail of its own, matching the idea behind the IR hash on the block side.
Termination
The definition says an IR always terminates. For a trading engine that matters more than it sounds. A live engine evaluates strategies on every bar, with other strategies waiting on the same system. A rule that never finishes would hold up everything behind it, and in a live account that means orders not sent at the moment they were due.
A structure of triggers, conditions and actions has a natural end. Each trigger fires, each condition is checked once, each action is taken, and the evaluation stops. There is no construct that can start another pass without the engine's say-so. For the daily-decision rules in these tests, the engine looks at the data, applies the rules and moves on.
Termination also keeps backtests fast. On DeployQuant a minute-bar backtest over several years completes in seconds. The quick-start example in the product reference ran 1,364 sessions in 1.90s, and that run is a single-symbol weekly strategy. A strategy that could stall would make such timings meaningless.
The same run in a backtest and live
The most useful property for a trader is the last one in the definition: an IR runs identically in a backtester and in a live engine. The aim is that a strategy tested on history and a strategy placing orders today are one and the same set of rules, evaluated by one engine.
The product reference supports this at the engine level. DQengine is the engine DeployQuant runs on, and its source is published. The hosted platform runs that same code, and no reduced edition exists. Backtests read minute-resolution consolidated US equity data, and paper and live runs take the real-time consolidated feed. A strategy can run in paper mode with no broker, which shows its decisions on live data before any account is connected.
The quick-start run shows the output of that engine on a weekly TQQQ strategy from 2021-01-04 to 2026-06-09. From $1,000 it ended at $13,603.38, with a CAGR of 61.78% and a maximum drawdown of 37.90%. It made 520 fills from 597 orders. That is a hypothetical, fee-free backtest on one fund, and the number to take from it is the structure: the engine reports fills and orders separately, and the same fill records are what a live account would be compared against.
Conversion between views uses the same check. The AI converts blocks to Python and Python to blocks. Each conversion is followed by a backtest of both versions and a fill-by-fill comparison, which catches any conversion that alters the trades before it is saved. Identical fills are the working definition of identical behavior, and the IR makes that comparison possible because both sides start from one description.
Live accounting follows the same principle. Positions and cash are taken from the broker's own fill reports, so the books show what the broker actually filled. A live account is therefore a record of real fills, set beside the rules that produced the orders.
The 12 templates as rule lists
Each of the 12 templates on this site is a short rule list, and the numbers show how much behavior a short list can produce. Taking the median fund, round trips ran from 2 for the dip buyer up to 166 for the RSI(2) snapback. The snapback buys extreme 2-day RSI washouts under 10 and exits as soon as RSI(2) recovers above 70. Two thresholds and two actions gave it the highest trade count and the shallowest median drawdown, 17.47%, alongside a median CAGR of 4.74%. It beat buy-and-hold on 34 funds.
RSI mean reversion reads the 14-day RSI against 30 and 70. Its median was 15 round trips, a CAGR of 2.98% and a drawdown of 24.63%, and it beat holding on 25 funds. Moving from a 2-day to a 14-day indicator changed one parameter in the rule list and changed the behavior a great deal.
Trend rules sit in the middle. The SMA 10/50 trend logged 17 round trips, 2.12% and 23.02%, while the EMA 12/26 trend logged 22, 2.76% and 22.87%. The golden cross had 3 round trips, 2.05% and 21.84%. Those three differ only in which two averages are compared, and the IR for each is the same shape with different parameters.
Rules with exits attached look different again. The trend plus trailing stop rule buys above the 200-day average and leaves only through a 15% trailing stop. It had a median of 4 round trips, a CAGR of 2.61% and the second deepest median drawdown, 31.15%. The momentum breakout enters after a four-week gain of 10% and exits on a 10% trailing stop. Its median CAGR was 0% with 6 round trips. The 3-month momentum rule stays long while the trailing 3-month return is positive and also had a median CAGR of 0%, with 12 round trips and a drawdown of 26.23%.
The monthly cycle holds from the first session of a month to the last. It made 69 round trips with a median CAGR of 5.46%, and its median drawdown, 36.63%, was the deepest of the 12. It beat holding on 14 funds, the fewest of any template.
Across the 12, the count of funds that beat buy-and-hold ranged from 14 to 34 of 59. A rule can be written down in a few lines and still fail to beat holding on a majority of funds. Compact rules are not better or worse for it. They are easier to inspect, and the results above come from inspecting them.
One rule list, different funds
An IR does not say what it will earn. It says what it will do when it sees certain data, and the data belongs to the fund. The same 200-day condition meets very different histories in the market examples.
Over the window SPY closed above its 200-day average on 77.99% of sessions and crossed the line 30 times. TLT closed above on 35.18% of sessions and crossed 95 times. A rule that holds while price is above the 200-day average would be invested most of the time on SPY and flip often on TLT. The IR is identical in both cases. The SPY page and TLT page show the fund behavior behind those counts.
Buy-and-hold results for the same window frame the comparison. SPY compounded at 15.2% with a worst drawdown of 24.51%, peak on 2022-01-03 and trough on 2022-10-12. QQQ returned 17.39% with a drawdown of 35%. IWM returned 8.03% with 31.92%. TLT returned negative 8.64% a year, and its 44.06% drawdown was still unrecovered when the data ended. TQQQ returned 26.86% with annualized volatility of 67.11% and a drawdown of 81.68%. UVXY returned negative 72.83% with volatility of 103.95%.
Oversold counts differ as well. The count of sessions with RSI(14) under 30 was 18 for SPY, 15 for QQQ, 33 for IWM, 61 for TLT and 116 for UVXY. A rule that triggers on that condition has little to do on SPY and a great deal on UVXY, and the indicator reading means something different on a fund that falls most days. See the UVXY page and TQQQ page for how far those two funds sit from the broad index.
The point for IR design is separation. The strategy description stays fixed, and the fund, the window and the cost assumptions are inputs. That separation allows one strategy to run across 59 funds and compared, as the strategy index does.
What an IR leaves open
Identical behavior in test and production does not make a strategy profitable. If a rule loses money in a backtest, it runs the same way live and loses the same way. The IR removes a class of differences between the test and the real run. It does not remove the market.
The backtests here are one window of 5.74 years that includes the 2022 bear market. Fills are modelled on minute bars and no margin is used. Headline runs carry no fees or slippage, and cost runs add 5 and 10 basis points. Trade-list prices are adjusted for splits and dividends, which puts them below quotes printed at the time. Real fills would differ in timing and price.
A Python step inside a block strategy sits outside the structured properties. Some behavior also sits outside the IR altogether, such as broker-side rejections, partial fills and connection problems. Those are handled by the order path and the caps and price bands in front of it, and they show up in the broker's fill reports.
None of this is investment advice. The IR is a way of writing a strategy down so that it can be tested, read and run without translation, and the questions on AI strategy building and on no-code versus coding describe how people produce one.
Frequently asked questions
What does IR mean in a trading strategy?
IR stands for intermediate representation. It is a strategy written as structured data, a list of triggers, conditions and actions, instead of executable code. DeployQuant's definition adds that it can be hashed, versioned and run identically by a backtester and a live engine.
Is a strategy IR the same as code?
No. Code can contain loops, helper functions and hidden state. An IR is a constrained list of rules that the engine reads. DeployQuant also supports Python strategies and a Python step inside a block strategy, and those parts are code, outside the IR guarantees.
Why does it matter that an IR is hashable and versioned?
Each live order can cite the exact strategy version that placed it. If a position needs explaining, the version, the logged prices and indicator values, and the strategy tag on the order show which rules were running and what they saw.
How does an IR keep backtests and live trading consistent?
Both run the same rules on the same engine, and backtests, paper trading and live trading use the same consolidated US market data. When the AI converts blocks to Python or back, it backtests both versions and compares the fills before saving.
Can I read a strategy IR without coding?
Yes, in the block view. Blocks read as sentences, such as WHEN the market opens, IF RSI(14) < 30, THEN buy. The [no-code trading entry](/learn/glossary/no-code-trading/) explains that this form is identical in logic to a programmed version.
Does using an IR make a strategy more profitable?
No. It makes the strategy readable and repeatable. In the 12 templates tested on 59 funds, the count of funds beating buy-and-hold ranged from 14 to 34, so the rules decide the result.
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.
Related terms
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.