Position Sizing in Algorithmic Trading: How to Protect Your Capital

Position sizing is deciding how much capital to put into each trade. In practice, you fix how much you are willing to lose if the stop-loss is hit, then work backwards to the number of units to buy or sell. Ask most traders what separates systematic strategies that last from those that blow up, and the answer is rarely about finding a better indicator. It is almost always about position sizing in algorithmic trading, and it is a discipline that automated systems handle far better than humans ever can. Getting it right is the difference between a strategy that survives long enough for its edge to compound, and one that wipes out on a single bad run.

Why Position Sizing in Algorithmic Trading Is the Foundation of Risk Management?

Consider two traders with identical entry and exit signals. Trader A risks 10% of their account on every trade. Trader B risks 1%. Given the same sequence of wins and losses, Trader A faces ruin long before their edge has a chance to play out. Trader B can absorb a long losing streak and remain solvent long enough to benefit from their strategy’s statistical advantage. This is the core principle of position sizing in algorithmic trading: it is not about maximising the size of winning trades, but about surviving losing streaks long enough for your edge to compound. In manual trading, this discipline is difficult to maintain under pressure. In an automated system, it is simply a parameter, set once and applied consistently to every trade.

The Fixed Fractional Method: Position Sizing in Algorithmic Trading Made Simple

The most widely used approach is fixed fractional position sizing, also known as the percentage risk model, covered in depth by Investopedia’s risk management guide. You risk a fixed percentage of your current account equity on every trade. The common starting point for retail traders is 1–2% risk per trade.

Position size = (Account equity × Risk %) ÷ (Entry price − Stop-loss price)

For example, with a $100,000 account, 1% risk ($1,000), an entry at $50 and a stop at $48, the per-unit risk is $2, so the position size is $1,000 ÷ $2 = 500 units.

The result is a position size that automatically adjusts as your account grows or shrinks, a self-correcting behaviour that is one of the key advantages of systematic position sizing.

Volatility-Adjusted Sizing: Letting the Market Set the Size

A more sophisticated approach ties position sizing in algorithmic trading directly to the current volatility of the asset. The most common tool is the Average True Range (ATR), which measures recent volatility by averaging the price range over (typically) 14 periods.

Position size = Risk amount ÷ (ATR × ATR multiple)

This prevents the common problem of getting stopped out repeatedly during volatile conditions simply because the stop was too tight relative to normal price movement. A worked ETH example follows below.

The Kelly Criterion: Maximum Growth, Maximum Risk

The Kelly Criterion, a formula with roots in information theory, was developed by physicist John L. Kelly Jr. in 1956 as a solution to long-run wealth maximisation under uncertainty. Applied to trading, it answers a specific question: given my strategy’s historical win rate and average win-to-loss ratio, what fraction of my capital should I risk on each trade to maximise long-term compounding?

The formula is:

Kelly % = W − [(1 − W) ÷ R]

Where W = win rate and R = average win divided by average loss.

A strategy with a 55% win rate and a 1.5:1 average win-to-loss ratio produces:

Kelly % = 0.55 − [(0.45) ÷ 1.5] = 0.55 − 0.30 = 25%

Risking 25% of your capital per trade would theoretically maximise long-run compounding, but in practice it is brutal. A four-trade losing streak (which occurs roughly 4% of the time at a 55% win rate) would reduce a £10,000 account to £3,164. The psychological and practical impact of this would cause most traders to abandon the strategy before its edge has time to manifest.

This is why practitioners almost always apply a fractional Kelly approach:

The practical guidance is straightforward: use Kelly to understand the theoretical upper bound of your risk sizing, then apply between one-quarter and one-half of that figure depending on your confidence in the underlying statistics. For a deeper treatment, see our guide to the Kelly Criterion for position sizing.

Fixed Ratio Position Sizing: Scaling Up at a Controlled Rate

Fixed ratio sizing, popularised by Ryan Jones, ties position size to accumulated profit rather than to a percentage of the account. You choose a delta: the profit each unit you trade must earn before you add another unit.

With a delta of $1,000:

Because each step up requires more profit than the last, size grows more slowly as the account grows, and it steps back down by the same thresholds during drawdowns. Fixed ratio is mostly used with whole contracts, such as futures. In crypto, where you can trade fractional units, fixed fractional sizing is usually simpler.

Portfolio-Level Position Sizing: The Overlooked Layer

When running multiple strategies simultaneously, position sizing in algorithmic trading needs to account for the portfolio level, not just individual trades. Effective portfolio-level risk management involves:

Practical Examples of Position Sizing in Algorithmic Trading

Understanding the theory of position sizing in algorithmic trading is straightforward. Seeing how it applies to real trading scenarios makes the difference between knowing the rule and internalising it.

Example 1: Fixed Fractional on a BTC/USD Strategy

Suppose you have a £10,000 account and your strategy risks 1% per trade. Your strategy identifies a long entry on BTC/USD at $70,000, with a stop-loss at $68,600: a distance of $1,400, or 2% of the entry price.

If the trade hits your stop-loss, you lose £100, 1% of your account (before fees and slippage). If it reaches a 2:1 profit target, you gain £200. The outcome is predictable, controlled, and independent of the emotional state of whoever is running the strategy. This is the fundamental promise of systematic position sizing in algorithmic trading.

Now imagine the same scenario with a 5% risk per trade. A single losing trade costs £500. Five consecutive losses, a perfectly normal run for any strategy with a 50% win rate, reduce your £10,000 account to £7,738. You now need a 29% gain just to return to break-even. At 1% risk, five losses bring you to £9,510: a 5% drawdown, easily recovered with a modest winning run.

Example 2: ATR-Adjusted Sizing During Volatile Conditions

In a calm market, ETH/USD has a 14-day ATR of $45. Your strategy places stops at 2× ATR, giving a stop distance of $90. At 1% risk on a $15,000 account ($150 risk), your position size is $150 ÷ $90 ≈ 1.67 ETH.

Following a macro shock, the 14-day ATR expands to $180. Your system automatically widens the stop to 2× ATR = $360, and recalculates the position size as $150 ÷ $360 ≈ 0.42 ETH. The risk in dollars remains identical. The position size has automatically shrunk by 75% in response to real market conditions, without any manual intervention.

This is the core advantage of volatility-adjusted position sizing in algorithmic trading: the system self-calibrates. You are not adjusting risk; you are letting volatility adjust position size for you.

Common Position Sizing Mistakes and How to Avoid Them

Implementing Position Sizing in Algorithmic Trading with Arrow Algo

Arrow Algo’s visual block builder includes dedicated risk management blocks that let you configure your position sizing model without writing any code:

What Are the Key Takeaways?


Disclaimer: The information provided in this article is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results. Always conduct your own research before making any trading decisions. Ready to build strategies with built-in risk management from the ground up? Start for free at Arrow Algo, no coding required.

Educational disclaimer: This content is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results.