Backtesting & results

Risk policy

Optional rails on the account — exposure caps, drawdown stops, a daily loss limit, a cash reserve, margin-ratio limits, and compounding. What each one does, and how to read what it did to your backtest.

Updated 2026-09-28·Rev. 2026.09

A risk policy is a set of rails you put on the account: how much exposure it may carry, how far it may fall before it slows down or stops, and how much it may lose in a day. Your strategy decides when to trade. The policy decides how much of that the account allows.

Set it in Backtest settings → Risk policy. Rails are off by default. Liquidation and funding aren't rails: they always apply, with or without a policy (see margin, liquidation, and funding).

Presets

Pick a preset: Off, Careful (Conservative), Balanced or Bold (Aggressive). Under the presets, the editor says what the rails mean in money against your starting balance, such as where the account halts. Customize lists every rail with a switch: turn one on to set its numbers, or off to drop it. Once you edit a rail the policy is Custom, and a button takes you back to the preset you started from.

To reuse your own rails, choose Save beside Custom and give them a name. They're kept on your account, and Saved lists them wherever rails are set: a strategy's backtest settings, a bot you're deploying, and a portfolio. Picking one applies its rails and leaves compounding as you set it. Hover a saved set to see every rail it holds. After you change a saved set's rails, you can update the saved copy or save them under a new name. You can keep up to 20. Renaming or deleting one doesn't change the rails already applied to a strategy, portfolio, or bot.

ConservativeBalancedAggressive
Max gross leverage2×3×5×
Max per symbol100%150%300%
Soft drawdown (entries × 0.5)10%15%25%
Recover within3%5%8%
Hard drawdown20%30%45%
Daily loss3%5%10%
Cash reserve20%10%5%
Margin ratio: warn at / exits only at40% / 60%50% / 70%60% / 80%

Off has no rails. Compounding is a separate switch, and choosing a preset never changes it.

What each rail does

Drawdown is measured from the peak: the highest equity the account has reached so far. Equity is your cash plus the unrealized profit or loss of open positions.

Exposure

Caps on what a new entry may add. An entry that would go past a cap is downsized to fit. If even the exchange's minimum order won't fit, it's refused.

RailMeasures
Max gross leverageTotal position size ÷ equity.
Net exposure band(Long − short) ÷ equity, between a minimum and a maximum. Longs are capped by the maximum, shorts by the minimum.
Max per symbolOne symbol's total position size ÷ equity. This matters most in a portfolio, where several legs can trade the same symbol.

Drawdown from peak

RailEffect
Soft drawdownOnce equity falls this far below the peak, Then either Size down (every new entry × the Entry size × value, so 0.5 halves it) or Exits only (new entries refused). It releases once equity is back within Recover within of the peak.
Hard drawdownCloses every position at the next bar's open and stops trading for the rest of the run.

Daily loss, cash reserve, margin ratio

RailEffect
Daily loss: Loss % of the day's opening equity, or a Loss amount in the account currencyOnce either limit is hit, the account is exits-only for the rest of the UTC day.
Cash reserve: Keep freeA share of the margin balance that no entry may use.
Margin ratio: Warn atMaintenance margin ÷ margin balance. Crossing it logs a warning and trading continues. 100% is liquidation.
Margin ratio: Exits only atWhile the ratio is at or above this level, new entries are refused.

In every exits-only state, your exits, stops, take-profits, and liquidation keep working. Only new entries stop.

The four states

The account is always in one state. When more than one rail is engaged, the strictest one wins.

StateMeaningEntered whenLeaves when
ActiveTrading normallyDefault—
ReducedEntries sized downSoft drawdown with Size downEquity is back within Recover within of the peak
Reduce-onlyExits onlySoft drawdown with Exits only, the daily loss limit, or the margin ratio at Exits only atThe trigger clears (for daily loss, the next UTC day)
HaltedFlattened, no more tradingHard drawdownNever, within a backtest

Timing

Every rail is decided at a candle close and acts from the strategy's next decision. It's the same rule in quick runs, deep runs, and paper bots, so each one reaches the same decisions from the same closes.

A hard drawdown closes every position at the next bar's open. The trade log shows those exits as Risk halt. Nothing trades after that. The rest of the equity curve is flat by design, not because the market went quiet.

Compounding

Turn on Compounding to grow and shrink fixed-size entries with the account. It scales Fixed qty and Cash/trade sizing by settled cash ÷ starting capital:

  • Re-read: how often the scale is updated: Bar, Daily, Weekly or Monthly.
  • Min scale (0–1): the floor after losses. Max scale (1–100): the ceiling after gains.

% equity sizing already follows the account, so compounding never applies to it twice.

When several things shape an entry, they apply in this order. First the strategy's size is multiplied by the compounding scale and the soft-drawdown scale. Then the exposure caps and the cash reserve trim it, and the tightest cap names the reason.

Reading what the rails did

  • The Risk policy metric. A run with a policy shows a Risk policy cell in More metrics (and the deep-run metrics grid). It gives the state the account ended in, then a line such as "DD 12.4% · 3 downsized · 2 refused": the deepest fall from the peak, and how many entries the rails downsized or refused. A halted run reads red.
  • A halt notice. A halted run raises "Hard drawdown halted this run on …; nothing traded after" on the Backtest panel header.
  • Refused entries. A quick run's notice counts entries refused by the risk policy separately from orders the exchange rejected. Each row names its rail, for example "Risk policy · Daily loss: Today's loss limit was reached; entries resume the next UTC day".
  • Portfolios get a full Risk panel: time spent in each state, gross leverage and net exposure, the peak margin ratio, downsized and refused entries by reason, every state change with its value against the threshold, and each leg's outcome. See portfolios.

Backtest with the rails you'll trade with

A deployed bot enforces its policy exactly as the backtest did. A backtest run without the policy isn't the run your bot will make.

In paper trading

When you deploy, the bot takes the same policy and enforces it at each candle close, the same way the backtest did. The one difference is the halt. A backtest stays halted, while a halted bot is flattened and stopped, and you can start it again to resume. See deploy a bot.

Next: the Edge Report.

Related