Trading Risk Management: Complete Guide

Position sizing, stop losses, and risk limits. Learn how professional traders protect capital.

Intermediate 35 min read

🎯 What You'll Learn

  • Understand trading risk management principles
  • Learn position sizing methods
  • Know how to set stop losses
  • Calculate and monitor risk metrics
  • Implement risk controls in systems

📚 Prerequisites

Before this lesson, you should understand:

The First Rule: Don’t Lose Money

Markets will eventually move against you. The question is: when that happens, how much do you lose?

Risk management is what keeps you in the game long enough for your edge to play out.


Core Concepts

TermDefinition
RiskProbability × Impact of loss
Position sizeAmount invested in a trade
Stop lossPrice level to exit losing trade
DrawdownPeak-to-trough decline
VaRValue at Risk-max expected loss

Position Sizing

How much capital to risk on each trade?

Fixed Fractional

Risk a fixed percentage of capital:

Capital: $100,000
Risk per trade: 1%
Risk amount: $1,000

Stock at $50, stop loss at $45
Risk per share: $5
Position size: $1,000 / $5 = 200 shares

Kelly Criterion

Mathematically optimal (but aggressive):

Kelly % = (Win probability × Average win / Average loss - Lose probability) / (Average win / Average loss)

Example:
Win rate: 55%
Average win: $1,000
Average loss: $800

Kelly = (0.55 × 1.25 - 0.45) / 1.25 = 19%

Use half-Kelly (9.5%) in practice-full Kelly is too aggressive

Stop Losses

Automatic exit when trade goes wrong.

Types

TypeTrigger
FixedPrice reaches specific level
TrailingFollows price up, exits on reversal
VolatilityBased on ATR (Average True Range)
Time-basedExit after X time regardless

Setting Stop Levels

Based on volatility (ATR):
ATR = 2% daily
Stop = 2 × ATR = 4%

Based on support:
Entry at $100
Support at $95
Stop at $94 (below support)

Risk Limits

Per-Trade Limits

  • Max position size: Never more than X% of capital
  • Max loss per trade: 1-2% of capital

Daily Limits

Daily loss limit: 5% of capital
Once hit → Stop trading for the day

Why: Prevents emotional revenge trading

Portfolio Limits

  • Max correlation exposure: Don’t have all positions in same sector
  • Max total risk: Total VaR under threshold
  • Leverage limit: Max 2-5x depending on strategy

Risk Metrics

Drawdown

Peak: $1,000,000
Current: $850,000
Drawdown: ($1,000,000 - $850,000) / $1,000,000 = 15%

Max drawdown is the largest historical peak-to-trough.

Sharpe Ratio

Sharpe = (Return - Risk-free rate) / Standard deviation

Example:
Annual return: 20%
Risk-free rate: 5%
Volatility: 15%

Sharpe = (20% - 5%) / 15% = 1.0
SharpeInterpretation
< 1.0Suboptimal
1.0-2.0Good
> 2.0Excellent
> 3.0Exceptional (suspicious)

Value at Risk (VaR)

95% VaR: Max loss in 95% of days

If 95% VaR = $10,000
→ On 95% of days, you won't lose more than $10,000
→ On 5% of days (1 in 20), you might lose more

Implementing Risk Controls

Pre-Trade Checks

def can_trade(order, portfolio):
    # Check position limit
    if order.value > portfolio.max_position:
        return False, "Exceeds position limit"
    
    # Check daily loss
    if portfolio.daily_pnl < -portfolio.daily_limit:
        return False, "Daily loss limit reached"
    
    # Check concentration
    if portfolio.exposure(order.sector) > portfolio.sector_limit:
        return False, "Sector concentration limit"
    
    return True, "OK"

Real-Time Monitoring

def monitor_risk(portfolio):
    metrics = {
        'pnl': portfolio.pnl(),
        'drawdown': portfolio.drawdown(),
        'var': portfolio.var_95(),
        'exposure': portfolio.gross_exposure()
    }
    
    for name, value in metrics.items():
        if value > limits[name]:
            alert(f"{name} breach: {value}")

Practice Exercises

Exercise 1: Position Sizing (Beginner)

Capital: 50,000Maxriskpertrade:2Entry:50,000 Max risk per trade: 2% Entry: 100 Stop loss: $95

Calculate position size.

Answer

Risk amount: 50,000×250,000 × 2% = 1,000 Risk per share: 100100 - 95 = 5Positionsize:5 Position size: 1,000 / $5 = 200 shares

Exercise 2: Risk Metrics (Intermediate)

A portfolio had these monthly returns: +5%, +3%, -2%, +4%, -5%, +2%

Calculate:

  1. Total return
  2. Max drawdown (within months)
Answer
  1. Total: 1.05 × 1.03 × 0.98 × 1.04 × 0.95 × 1.02 = 1.0694 = 6.94%
  2. Max drawdown: In month 5 (−5%), from previous peak = 5%

Exercise 3: Design (Advanced)

Design a risk management system for an automated trading strategy with:

  • Position limits
  • Daily loss limits
  • Correlation checks
  • Automatic shutdown

Knowledge Check

  1. Why is position sizing important?

  2. What is the Kelly Criterion?

  3. Why use daily loss limits?

  4. What does Sharpe ratio measure?

  5. What is Value at Risk (VaR)?

Answers
  1. Determines how much you lose when wrong. Too large = one bad trade wipes you out.

  2. Formula for optimal bet size based on win rate and win/loss ratio. Often halved due to uncertainty.

  3. Prevents revenge trading. After losses, judgment impaired. Limits force a break.

  4. Risk-adjusted returns. Return per unit of volatility. Higher = better risk/reward.

  5. Maximum expected loss at confidence level. 95% VaR of 10K=wontlosemorethan10K = won't lose more than 10K on 95% of days.


Summary

ControlPurpose
Position sizingLimit loss per trade
Stop lossesAutomatic exit
Daily limitsPrevent tilt
Portfolio limitsDiversification
MonitoringReal-time alerting

What’s Next?

🎯 Continue learning:


You now understand how professionals protect their capital. 💼

Questions about this lesson? Working on related infrastructure?

Let's discuss