Risk management in algorithmic trading: why stability survives, not maximum profit
4/17/2026 Β· Rustam Atai
Algorithmic trading has an unpleasant pattern: strategies with the most impressive expected return tend to die earlier than modest but resilient ones. Not because they were poorly designed, but because there is simply not enough of them left by the time the expectation actually materializes. The market has time to deliver a couple of long drawdowns, capital melts, parameters get re-fitted on the fly, and the strategy disappears before its "average" gets a chance to play out.
That is why a conversation about risk management is not a conversation about "constraints for the cautious". It is a conversation about the conditions under which a strategy lives long enough to reach its own math. Over a long horizon, the winner is not the most profitable system, but the most stable one β the system that does not get killed by a drawdown, a volatility spike, a correlation shock, or a short losing streak.
Risk per trade and position sizing: how much capital we put on a single trade
The first practical question of any strategy is not "what is the signal" but "what is the position size". The answer to that question almost entirely determines how the system will die in bad regimes.
A convenient framework is a fixed percentage of capital per trade, usually somewhere between fractions of a percent and a few percent. The point is not the exact number, but the fact that the loss of a single trade is computed before entry and is normalized as a share of capital, not as an absolute amount. This automatically scales the position down through a drawdown and back up through recovery, without heroic "I'll win it back with a bigger lot".
The theoretical ceiling for this discipline is the Kelly criterion: it gives the fraction of capital that maximizes the expected logarithm of growth given known probabilities and payoffs. 1 In practice, traders almost never run "full Kelly": real-world estimates of probability and edge are noisy, and Kelly with mis-specified parameters produces a sharp jump in the risk of ruin. So the usual approach is to run a fraction of Kelly β a quarter, a half β not to maximize growth, but for the sake of robustness against estimation error.
The key idea here is not the formula but the order of operations: first the risk budget per trade, then the position size, then the signal. Not the other way around.
Stop loss as part of the model, not a post-hoc safety net
Stop loss is often discussed as a "protective mechanism", as if it were a separate function bolted on top of the strategy. In algorithmic terms, that view is wrong: a stop is a pre-loaded expectation of loss, without which neither risk per trade nor the strategy's expected value can be computed correctly.
If a strategy relies on "a wide stop that almost never triggers", one of two things is true: either the loss distribution is long and heavy-tailed, in which case those rare hits eat the entire accumulated return at once; or the stop simply is not part of the model, in which case position sizing is computed off an incorrect quantity. In both cases, real behavior on a difficult market will diverge from the backtest.
The working approach is to define stops based on market structure and volatility regime, not on desired return. The position size is then sized so that hitting the stop costs a pre-chosen share of capital. A "bad day" then stays a bad day, instead of becoming the event that puts the strategy into survival mode.
Volatility as a unit of measurement, not as the enemy
In casual conversation, volatility tends to sound like a problem: "the market is jumpy". In risk management it plays a different role β that of a unit of measurement. The percentage daily move of one instrument and another are not directly comparable: one asset moves quietly inside a narrow range, while another can post several multi-percent moves in the same week.
A practical technique, then, is to normalize risk by volatility. Loosely speaking, instead of "I hold the same number of contracts", the system holds the same risk contribution from each position to the total portfolio risk. This is done through historical volatility, ATR, or similar estimates, with the goal that no single instrument accidentally drives portfolio behavior just because its amplitude happens to be high today.
A second useful technique is vol-targeting: the portfolio is steered to a pre-chosen level of total volatility, and exposure is automatically scaled down when volatility spikes. It does not make a strategy profitable, but it evens out its behavior across regimes and protects against the "the strategy looked great as long as the market was calm" effect.
Max drawdown and risk of ruin: survival metrics, not vanity metrics
Among strategy quality metrics, two stand out for talking about survival rather than return.
Max drawdown is the largest decline of capital from a historical peak to the next trough. It is not "a bad month in the past" but the answer to the question: how much emotional and financial pain does the system and its operator have to absorb for the strategy to keep running? CFA Institute materials on portfolio performance evaluation explicitly list max drawdown as an appraisal metric alongside the Sortino ratio and upside/downside capture. 2
Risk of ruin is the probability that capital falls below the threshold past which the strategy stops making sense (it goes to zero, gets shut down by a margin call, or is stopped manually). It cannot be "felt", it has to be calculated. Given a fixed risk per trade and known win/loss probabilities, the risk-of-ruin formula shows how quickly a losing streak can knock the strategy out, even with a positive expected value.
The practical takeaway is simple. A strategy with a 40% expected annual return and a 60% max drawdown, and a strategy with a 15% expected annual return and a 10% max drawdown, are not "just two different risk profiles". They are usually two very different probabilities of even reaching their averages. The second one survives long stretches of the kind that would already have shut down or rewritten the first.
Diversification and correlation: why "many strategies" is not the same as "low risk"
Textbooks describe diversification as "do not put everything in one basket", which is true β but only if the baskets are actually independent. Modern portfolio theory is built on exactly this point: portfolio risk is determined not by the sum of individual risks, but by their covariance. 3 CFA Institute materials on portfolio risk and return specifically emphasize that the diversification effect comes from imperfect correlation between assets. 4
In algorithmic trading, this idea becomes non-obvious. "Ten strategies on one market" often turn out to be the same strategy written ten different ways: their entries are correlated, their drawdowns are synchronous, and their expected values rest on the same market anomaly. When the anomaly disappears or the regime shifts, the entire "diversified" portfolio enters drawdown at once.
A second complication is that correlations are unstable. In quiet periods, assets and strategies can look almost independent, but in a crisis correlations converge to one: almost everything falls except a narrow set of safe-haven instruments. So an honest view of diversification is not "I have many positions" but "how many genuinely independent sources of return I have in the portfolio, and how they behave in a stress scenario".
Sharpe and Sortino: how to compare strategies by quality of return
Two strategies with the same annual return can behave in fundamentally different ways. Risk-adjusted metrics are how that difference is made visible.
The Sharpe ratio is the ratio of a strategy's excess return to its volatility. In its canonical formulation, the author describes it as a measure of "reward per unit of risk", grounded in a mean-variance approach where mean and standard deviation are treated as sufficient statistics of the distribution. 5 Sharpe works well when the return distribution is close to symmetric, and it honestly punishes a strategy for chaotic swings around the mean.
The Sortino ratio is the same idea with one important difference: the denominator is not the total standard deviation but the downside deviation, that is, the volatility of negative deviations from a target return. This is closer to a trader's intuition: "a sharp move up" and "a sharp move down" should not be punished equally in a quality metric. Sortino is useful for strategies with asymmetric distributions β for example, systems with a capped loss and a long right tail. CFA Institute materials on performance evaluation treat the Sortino ratio as one of the appraisal metrics alongside max drawdown. 2
Neither metric is a verdict. They share the same weak spot: they are computed on a specific history, and their values are sensitive to the choice of window, data frequency, and distributional assumptions. So in algorithmic trading they are usually read together with drawdown characteristics and the strategy's behavior across regimes, rather than as the single criterion of "this one is better than that one".
What this means for an algorithmic trader
Putting it all together produces a pretty boring but workable skeleton.
- First the risk budget is fixed: how much capital the system is willing to lose per trade and per period.
- The risk budget then drives position sizing, normalized by volatility.
- The stop loss is set from market structure rather than from desired return, and it is the stop that defines the size of risk per trade.
- Diversification is judged by the number of genuinely independent sources of return, not by the number of positions.
- Strategy quality is compared via Sharpe/Sortino and drawdown metrics, not via absolute return.
- Risk of ruin and max drawdown are used as hard constraints: breaching them is a signal to stop or rewrite the strategy, not to "sit it out".
This is exactly the kind of discipline worth building into algorithmic trading tools, including ai-trader: not as a set of cosmetic settings, but as a mandatory layer without which signals and backtests mean very little. For exchanges and investment firms, regulators have long formalized similar logic: ESMA's guidelines on automated trading explicitly require effective systems and controls, pre-trade and post-trade limits, infrastructure resilience, and procedures for failure scenarios. 6
In conclusion
Profit is a function of survival. A strategy that theoretically earns more but periodically wipes out half of the capital loses not on the math, but on time: it rarely gets held long enough for its "average" to occur.
A stable strategy works differently. It accepts a lower ceiling so that a losing streak, an inconvenient volatility regime, or a correlation shock does not become its end. And it is precisely this trade-off β controlled risk per trade, an honest stop, volatility-normalized sizing, deliberate diversification, and metrics that measure drawdown rather than return alone β that distinguishes algorithmic trading as an engineering practice from an attempt to guess the market.
In trading, the strategy that survives is not the most profitable one, but the most stable. Position sizing, an honest stop, volatility normalization, deliberate diversification, and risk-adjusted metrics are the very tools used to build that stability in practice.