Optimizing Your Strategies

The Optimization Process

After your first backtest, you'll likely want to improve your strategy. Here's a systematic approach.

Step 1: Analyze Current Results

Look at your backtest results and identify:

  • Are most losses from false entries? → Improve entry conditions

  • Are you exiting too early? → Widen take profit or remove premature exits

  • Are drawdowns too deep? → Tighten stop loss

  • Too few trades? → Loosen entry conditions

  • Too many trades with small losses? → Add confirmation indicators

Step 2: Adjust One Variable at a Time

Never change multiple parameters simultaneously. You won't know which change improved/worsened results.

Common Adjustments

What to Change
Effect

RSI period (14 → 21)

Smoother signal, fewer false triggers

RSI threshold (30 → 25)

Fewer but higher-conviction entries

SMA period (200 → 100)

More responsive trend filter

Stop loss (2% → 3%)

Fewer stops hit, but larger losses when hit

Take profit (5% → 3%)

More frequent wins, but smaller each time

Step 3: Compare Backtests

Run a new backtest after each change and compare:

Version
Return
Sharpe
Drawdown
Win Rate
Trades

v1 (original)

+15%

1.2

-12%

55%

42

v2 (RSI 21)

+18%

1.5

-10%

58%

35

v3 (SL 3%)

+20%

1.3

-15%

52%

42

In this example, v2 improved across the board with fewer, higher-quality trades.

Step 4: Validate with Different Periods

After finding good parameters, validate across multiple time periods:

Period
Return
Sharpe
Drawdown

Jan-Mar 2025

+12%

1.4

-8%

Apr-Jun 2025

+8%

1.1

-11%

Jul-Sep 2025

+15%

1.7

-7%

Oct-Dec 2025

+5%

0.9

-13%

If the strategy works across all periods, it's likely robust. If it only works in one period, it may be overfitted.

Optimization Tips

Do

  • Change one parameter at a time

  • Test across multiple time periods

  • Prefer consistency over maximum returns

  • Keep strategies simple (2-4 conditions)

  • Look at Sharpe ratio, not just total return

Don't

  • Don't optimize to get 90%+ win rate (likely overfitting)

  • Don't use extremely narrow parameter ranges

  • Don't ignore drawdown in pursuit of returns

  • Don't over-complicate your strategy with 10+ conditions

  • Don't curve-fit to one specific market event (like a crash)

When to Stop Optimizing

Stop when:

  1. Sharpe ratio is consistently above 1.0 across periods

  2. Max drawdown is within your risk tolerance

  3. The strategy is simple enough to understand intuitively

  4. Additional changes produce diminishing improvements

  5. You're confident enough to activate with real money (on testnet first)

Last updated