The sentence sounds precise until it reaches an order ticket
Nearly every setup of this kind starts with a short rule: buy when the signal crosses a threshold, then sell when it reverses or a stop is hit. It sounds like a strategy. It is a description of intent, not an executable policy.
"Buy when the signal crosses" leaves out whether the crossing is evaluated on a trade, quote, candle close or delayed bar. It does not say whether the order is sent immediately or after confirmation, whether it is a market or limit order, or what happens if the quote moves before the order reaches the venue. Each choice changes fills, costs and sometimes the signal itself.
For a person watching a screen, those gaps are often filled with judgement. An unattended agent has no such discretion. If the software cannot identify which price, timestamp and account state govern a decision, it will still make one, usually by applying a default buried in a library or service.
A useful trading strategy description therefore needs two versions. One explains the idea in plain language.
The other defines observable inputs, decision timing, order instructions and recovery behaviour. The cost of the first version is that it hides the assumptions the second must make explicit.
Translate the rule into testable decisions
Start by defining the signal's time basis. A five-minute close is not interchangeable with the last trade received before the clock reaches the five-minute boundary. Specify the market-data event, timezone, session calendar, handling of late or corrected data, and whether a decision may use a bar that is not yet final.
Then make the order policy as concrete as the signal. "Enter at the next price" could mean a market order, a marketable limit with a maximum price, or a passive limit that may never fill. State the time in force, price collar, quantity rounding, maximum participation rate and cancellation rule. For an order split across several fills, define whether the target position is based on requested quantity or filled quantity.
A practical specification should answer questions such as:
- Which exact event triggers evaluation, and how old may its data be?
- Does the agent submit once per signal transition, or repeatedly while the condition remains true?
- What is the maximum permitted price movement between decision and submission?
- How long may an unfilled order rest before cancellation or repricing?
- What position and open-order state must be read back before another order is sent?
- Which conditions stop trading, and how does the agent resume after a stop?
These are not documentation niceties. They determine duplicate-order risk, exposure during a network outage and the probability of missing the intended entry.
If the strategy is expressed as "hold a fixed risk amount", define whether risk uses a stop distance, expected volatility, available margin or another measure. Those interpretations produce different quantities.
Turn each sentence into a field or test. For example, "exit at the stop" can become a stop trigger source, trigger price, order type after activation and policy for a gap through the stop. A backtest that assumes a fill at the stop price is not modelling a stop-market order through a fast gap.
Price the assumptions, not just the commission
Trading cost is more than the broker's stated commission. A useful first model separates spread, explicit fees, slippage, market impact and opportunity cost. It should also distinguish a cost paid on every fill from a cost that appears only when an order is rejected, repriced or left unfilled.
The table gives typical market ranges for liquid instruments under ordinary conditions. They are broad working ranges, not audited results for a venue or a guarantee for a particular order. Volatility, order size, time of day, routing and account fee schedule can move the actual cost well outside them.
| Cost component | Typical range | Measurement basis | What changes it |
|---|---|---|---|
| Quoted spread | 0.5-3 basis points for liquid large-cap shares; 0.1-1 pip for major FX pairs | At the decision time, before fees | Instrument, session, volatility and quote size |
| Commission and venue fees | About 0.2-2 basis points of notional for many liquid share or FX workflows; futures are often charged per contract | Use the account's actual schedule and contract multiplier | Broker plan, venue, rebates, minimum charges and monthly volume |
| Slippage from decision price | About 0.5-5 basis points per side for modest orders in liquid markets | Fill price versus a timestamped decision benchmark | Latency, order type, volatility and queue position |
| Market impact | Often below 1 basis point for very small orders; several basis points or more as participation rises | Compare fills with a suitable pre-trade benchmark | Order size relative to market volume and urgency |
| Missed-fill opportunity cost | Can range from near zero to more than 10 basis points on a fast move | Compare the unfilled quantity with a defined later benchmark | Passive pricing, cancellation rules and price movement |
Build a per-order estimate from the strategy's actual turnover. Suppose an illustrative system sends a $25,000 entry and later exits the same notional.
If the combined spread, fees and realised slippage total 4-12 basis points round trip, the estimated cost is $10-$30 per completed round trip. At 100 round trips in a month, that is $1,000-$3,000 before financing, borrow, market impact or missed fills. This arithmetic is an example, not a market-wide forecast.
Do not add every cost estimate blindly. Spread and slippage can overlap if slippage is already measured against the midpoint and includes crossing the spread.
Define one benchmark for each component. A common approach is to measure arrival-price implementation shortfall, then separately report commissions and other explicit charges.
For a practical exercise in order-state handling, agentic paper trading is available from $9.99 a month. Paper results can expose logic errors, but they do not establish live queue position, market impact or the fees that will apply to a funded account.
Execution details create costs the prose conceals
Every order has a path through states: created, submitted, acknowledged, partially filled, filled, cancelled, rejected or expired. The strategy description normally names none of them. Yet the transitions determine whether the agent knows its real exposure, whether it can safely retry, and whether an old order remains live after the signal changes.
Suppose a limit order for 100 shares receives a 40-share partial fill. The remaining 60 shares may still be resting while the signal reverses. Cancelling the remainder does not undo the fill.
The agent must reconcile its position, decide what to do with the 40 shares, and verify that cancellation has taken effect before placing a replacement. A timeout on the cancel request is not confirmation of cancellation.
Retries need similar care. A network timeout after submission gives the agent an unknown outcome, not proof that the broker failed to receive the order.
Retrying with a fresh order identifier can double exposure. Persist a client order identifier, query the broker for that order and reconcile open orders and positions before resubmission. Define what the agent does if the broker's state cannot be retrieved.
Execution policy also creates a trade-off between price and fill probability. A passive limit order may reduce spread paid when it fills, but it can select against the strategy by filling just before prices move further against it. A marketable limit can cap the worst acceptable price, but may leave quantity unfilled.
A market order prioritises execution, not price. None is universally cheaper; compare them against the same signal and market conditions.
Track costs by order, not just by day. Store decision timestamp, reference price, submitted price, order type, acknowledgement time, each fill and fee, cancel or reject reason, and final position. Record venue and instrument identifiers consistently. Without these fields, an apparent strategy loss cannot be separated from a bad signal, poor routing or a state-reconciliation bug.
Benchmark the live policy before trusting its backtest
Use a benchmark that matches the decision being tested. Midpoint at decision time can measure implementation shortfall for aggressive orders.
Arrival price can suit an order released over time. For passive orders, report fill rate and the price movement after the fill, not only the price improvement on filled quantity. Include unfilled quantity, since ignoring it rewards a policy that avoids costly trades by not trading.
Slice results by instrument, session, volatility, order size and order type. A monthly average can hide that costs double during the first minutes after the open or that a small number of large orders account for most impact.
Report median and upper percentiles, such as the 90th percentile, alongside the mean. A risk limit should use a tail estimate appropriate to the strategy's exposure, not only its average fill.
Before allowing unattended orders, compare three versions of the same policy: a backtest with explicit cost assumptions, a paper or simulated run, and a small live run with strict quantity and loss caps. Reconcile every submitted order against broker acknowledgements, fills, open orders and positions.
The paper stage tests state logic and monitoring. The live stage measures venue-specific costs that a simulator cannot prove.
Set thresholds before the test. For example, stop and investigate if live implementation shortfall exceeds the model by a chosen amount for a defined sample, if an order remains in an unknown state beyond a timeout, or if position reconciliation differs from the broker. Thresholds should reflect the instrument and strategy; a universal basis-point limit would be misleading.
The mistake most readers will still make is treating the plain-language rule as the strategy, then blaming execution costs for assumptions the rule never specified.
Frequently Asked Questions
What should a trading strategy description include for an automated agent?
Specify the data event and timestamp used for each decision, the order type and price limits, sizing rules, and handling of partial fills, rejections and timeouts. Also define position reconciliation, stop conditions and how the agent resumes.
How do I estimate trading strategy execution costs?
Measure spread, explicit fees, slippage, market impact and unfilled-order opportunity cost separately, using a consistent benchmark for each. Break results down by instrument, session, order size and order type rather than relying on one average.
Can paper trading show the live cost of an order?
Paper trading can test decision logic, order states and recovery behaviour, but it cannot prove live queue position or market impact. Compare paper results with a tightly capped live sample before relying on the cost model.