Risk Management: The Most Critical Lesson
Learn position sizing, stop-losses, and risk/reward ratios. A profitable strategy with bad risk management will blow up your account.
Risk Management: More Important Than Returns
A 50% loss requires a 100% gain to break even. A 90% loss requires a 900% gain. Risk management ensures small losses accumulate into steady compounding, not catastrophic ruin.
The 1-2% Rule: Fixed Fractional Position Sizing
Risk 1-2% of your portfolio on each trade. This ensures you can survive 50 consecutive losses while still having capital left.
How many shares to buy given your stop
def calculate_position_size(account_size, risk_percent, entry_price, stop_loss):
risk_amount = account_size * (risk_percent / 100)
price_difference = entry_price - stop_loss
position_size = risk_amount / price_difference
return int(position_size)
# Example
account = 100000 # $100k account
risk = 1.5 # Risk 1.5%
entry = 150
stop = 145
qty = calculate_position_size(account, risk, entry, stop)
print(f"Buy {qty} shares") # Output: Buy 300 shares
# Risk: $100k × 1.5% = $1,500
# Difference: $150 - $145 = $5
# Shares: $1,500 / $5 = 300
Stop-Loss Strategies
| Type | Method | Example | Pros | Cons |
|---|---|---|---|---|
| Fixed % | Stop at -2% | Buy $100, stop at $98 | Simple, consistent | Ignores volatility |
| ATR-based | Stop at 1.5×ATR below entry | ATR=2, stop=$3 below | Adapts to volatility | More complex to code |
| Support/Resistance | Stop below key level | Stop below 200-day SMA | Uses technical levels | Subjective |
| Time-based | Exit if not working after N days | Exit if still red after 5 days | Limits holding period | Might exit winners |
Risk/Reward Ratio: The Core of Profitability
Before entering ANY trade, calculate: how much can I win vs. how much can I lose?
Example: Risking $100 to make $200 = 1:2 ratio
Aim for at least 1:2 (risk $1 to make $2). Better yet, 1:3. If you can achieve 1:2 with 50% win rate, you'll profit (50% × $2) - (50% × $1) = +$0.50 per trade.
- Win Rate × Avg Win - Loss Rate × Avg Loss > 0 for profitability
- Example: 45% × $2 - 55% × $1 = $0.90 - $0.55 = +$0.35 profit per dollar risked
- This is how you win at trading: small edge × high consistency = profit
Position Size = Your Insurance Policy
If 20 consecutive trades lose the maximum risked amount, your account size matters. With 1% risk per trade, you still have 80% of capital left. Risking 5% means you'd be down 50% and facing massive recovery pressure.
The Math of Recovery
| Loss % | Gain % Needed | Why This Matters |
|---|---|---|
| 10% | 11.1% | Small losses = easy recovery |
| 25% | 33.3% | Getting harder |
| 50% | 100% | Need to double your money! |
| 75% | 300% | Practically impossible |
| 90% | 900% | Career over |
The Goal of Risk Management
Living to trade another day. Protecting capital is more important than maximizing returns. A 15% annual return that compounds forever beats a 50% return that gets wiped out.
- Never risk more than 1-2% of your portfolio on a single trade
- Position size should be calculated by your maximum acceptable loss, not a fixed dollar amount
- Every trade needs a stop-loss rule defined before entry
- Better to be right slowly than to be wrong explosively