Risk Management in Algo Trading: Techniques and Best Practices

Huzefa Kudrati Updated Oct 3, 2026 8 min read

Risk Management in Algo Trading: Techniques and Best Practices

Risk management in algo trading means deciding in advance how much you can lose (per trade, per day, per strategy and overall) and building those limits into the strategy so they are enforced automatically. It covers market risk, execution risk, flaws in the strategy's logic, technical failures and your own behaviour, and it matters more in automation because a mistake repeats on every trade.

Illustration of layered risk controls protecting a trader

Why risk management matters more in algo trading

A manual trader who makes a mistake makes it once. An algorithm with a mistake in it makes it on every signal, at full speed, until someone notices. The same is true of good rules: a stop loss written into a strategy is honoured every single time, which is something few manual traders manage.

The goal isn't to avoid losses; every strategy has them. It is to keep any single loss, day or drawdown small enough that you can keep trading and the strategy's edge has time to show.

The five kinds of risk in algo trading

Risk What it looks like Main controls
Market risk Prices move against your position; gaps overnight or on news Position size, stop losses, hedges, daily loss limit
Execution risk Slippage, partial fills, orders that don't fill in fast markets Liquid instruments, order pricing settings, smaller orders
Model risk The strategy's logic is wrong, overfitted, or stops working Honest backtests, held-back data, Live Offline testing, reviews
Technical and operational risk Broker session expired, connectivity issues, wrong settings, a fat-finger edit Pre-market checks, monitoring, sensible defaults, change control
Behavioural risk Overriding the strategy, over-sizing after a win, switching off in a drawdown Written plan, pre-committed review rules, journal

A layered risk framework

Good risk management works at several levels at once, so a failure at one level is caught by the next.

Layer 1: every trade

  • Position size by risk. Decide the rupee loss you accept if the stop hits (for example 1% of capital) and size the trade to match.
  • A stop on every position. Price-based, percentage-based, ATR-based or time-based, but always there.
  • A target or trailing stop where the strategy's logic calls for it.

Layer 2: every strategy

  • A maximum loss for the strategy that closes everything (a universal exit), such as a fixed rupee loss on the day.
  • Hedges for open-ended risk. A short straddle can lose without limit; adding wings caps it.
  • A trailing stop on total P&L to protect a good day's profit.

Payoff at expiry of a hypothetical NIFTY short straddle against an iron fly: the straddle's loss keeps growing beyond the breakevens while the iron fly's loss is capped at ₹5,200Hypothetical premiums. The hedge costs ₹5,200 of maximum profit and removes the open-ended loss

The hedge costs something: in this example, maximum profit falls from ₹19,500 to ₹14,300. In exchange, the worst case drops from "no limit" to ₹5,200. For most accounts that is a good trade. Read more in what hedging is and how to automate it.

Layer 3: every day

  • A daily loss limit across strategies: if the total day's loss reaches a set level, stop and review.
  • A cap on trades per day so a choppy market can't trigger twenty entries.
  • No new entries late in the day if the strategy can't manage them before the close.

Layer 4: the whole account

  • Diversify across styles that lose at different times (option selling with trend following, intraday with positional).
  • Limit total margin used, so a volatile day or a margin increase doesn't force exits.
  • A drawdown rule for each strategy: for example, pause and review if its drawdown passes 1.5 times the worst seen in testing.

Layer 5: the systems in between

  • Check your broker connection before the market opens; an expired session means no orders.
  • Know your execution settings, including how orders are priced and what happens if they don't fill.
  • Change strategies deliberately. Never edit a live strategy mid-session without testing the change.
  • Watch the logs. Check that trades happen when they should, and investigate any surprise.

Measuring risk: a few numbers worth knowing

Measure What it tells you Example (hypothetical)
Risk per trade Loss if one stop hits ₹5,000 = 1% of ₹5,00,000
Maximum drawdown Worst fall from a peak in testing 12% in the backtest; plan for worse
Daily value at risk (VaR) A loss level you'd expect to exceed only on a few days If daily P&L has a standard deviation of ₹4,000, a rough 95% one-day VaR is 1.65 × ₹4,000 ≈ ₹6,600
Margin used Share of capital tied up Keep a buffer for margin changes

Risk management mistakes to avoid

  1. Over-optimizing risk settings on past data until they look perfect.
  2. No stop because "the strategy recovers". Every strategy recovers until the day it doesn't.
  3. Sizing on the best month instead of the worst drawdown.
  4. Diversifying into the same bet: three NIFTY short-premium strategies are one position.
  5. Changing limits during a loss. Limits move only after calm review and testing.
  6. Skipping forward testing: going from backtest straight to full size.

Building it on Tradetron

Control How to set it up on Tradetron
Per-position stop loss An SL trigger on each position, such as LTP ≥ entry price × 1.3 for a sold option, with the entry price from the Traded Instrument keyword
Per-position target A Target trigger on the position
Strategy-wide loss limit A Universal Exit condition on the strategy's PNL (for example PNL ≤ −5,000), which closes all positions
Protecting profit A trailing stop loss in Advanced Settings, or the Universal Exit TSL keyword
Adjustments when a leg is threatened Repair conditions; see Repair Once and Repair Continuous
Execution risk Order pricing, revisions, timeouts and tranching in Advanced Settings
Model risk Backtest, then Live Offline before Live Auto
Size Lots per position, and the multiplier when you deploy

Go deeper with seven ways to reduce drawdown and the psychology of algorithmic trading.

Frequently asked questions

What is risk management in algorithmic trading?

It is the practice of setting limits on how much can be lost per trade, per strategy, per day and overall, and building those limits into the strategy so they are applied automatically. It also covers execution, technical and behavioural risks around the strategy.

Why is risk management important in algo trading?

Because automation repeats every rule, including flawed ones, at speed. Without built-in limits, a single bad day or a logic error can do serious damage before anyone notices. With them, losses stay within a range you planned for.

What are the main risk management techniques in algo trading?

Position sizing by risk, a stop loss on every position, a strategy-wide or daily loss limit, hedging positions with open-ended risk, diversifying across uncorrelated strategies, and testing honestly on history and in a test mode before going live.

How much should I risk per trade?

Many traders risk between 0.5% and 2% of capital per trade. The right number is the one that keeps a long losing streak survivable for you: at 1% per trade, ten losses in a row cost about 10% of the account.

How do I set a daily loss limit on Tradetron?

Add a Universal Exit condition based on the strategy's PNL, for example "PNL ≤ −5,000". When it is met, all open positions of the strategy are closed.

How often should I review my risk settings?

Check live results against the backtest every week, and review limits every month or quarter. Change them only after testing, never in the middle of a losing stretch.

Want to join Tradetron?

Thousands of traders have moved to algo trading. Leave your number and our team will help you get started.