Market-Specific14 min read

Forex Backtesting Guide

Master currency pair backtesting with proper spread modeling, leverage handling, and session timing analysis for profitable forex strategies.

Forex Trading Basics

What Makes Forex Different?

  • 24/5 Market - Trades Sunday 5pm EST to Friday 5pm EST continuously
  • High Leverage - 1:50 to 1:500 (vs 1:2 for stocks)
  • Tight Spreads - 0.5-2 pips for major pairs
  • Pairs Trading - Always trading one currency against another
  • No Exchange - Decentralized over-the-counter (OTC) market

Pip Values & Lot Sizes

Lot SizeUnitsPip Value (EUR/USD)1% Move
Standard100,000$10/pip$1,000
Mini10,000$1/pip$100
Micro1,000$0.10/pip$10
Nano100$0.01/pip$1

Most retail traders use mini or micro lots. Standard lots require significant capital due to leverage requirements.

Choosing Currency Pairs

Major Pairs

  • • EUR/USD (Euro Dollar)
  • • GBP/USD (Cable)
  • • USD/JPY (Dollar Yen)
  • • USD/CHF (Swissy)

✅ Tight spreads (0.5-2 pips), high liquidity, best for beginners

Minor Pairs

  • • EUR/GBP (Euro Pound)
  • • AUD/NZD (Aussie Kiwi)
  • • EUR/AUD
  • • GBP/JPY

⚠️ Wider spreads (2-5 pips), good liquidity

Exotic Pairs

  • • USD/TRY (Turkish Lira)
  • • EUR/ZAR (South African Rand)
  • • USD/MXN (Mexican Peso)
  • • GBP/TRY

❌ Very wide spreads (10-50 pips), low liquidity

Pair Selection for Backtesting

Start with major pairs (EUR/USD, GBP/USD) for most reliable data and tightest spreads. If your strategy works on majors, test on minors. Only consider exotics if you have specific regional knowledge and can handle high spreads and volatility.

Spread Modeling

Critical: Include Realistic Spreads

Many backtests fail in live trading because they ignore spreads. In forex, you always buy at ASK and sell at BID. The spread is your cost per trade.

Example:

EUR/USD BID: 1.1000, ASK: 1.1002 (2 pip spread)
Buy at 1.1002 → Immediately down 2 pips
Need price to reach 1.1004 just to break even

Pair TypeTypical SpreadConservative BacktestImpact on 100 Trades
EUR/USD1 pip1.3 pips-130 pips ($130 per lot)
GBP/USD1.5 pips2 pips-200 pips ($200 per lot)
USD/JPY1.2 pips1.5 pips-150 pips ($150 per lot)
EUR/GBP3 pips4 pips-400 pips ($400 per lot)
USD/TRY30 pips40 pips-4000 pips ($4000 per lot)

Key Insight

High-frequency strategies (many trades per day) are killed by spreads. A scalping system with 200 trades/month on EUR/USD pays -260 pips ($260/lot) in spreads alone. Your strategy must overcome this cost.

Leverage & Margin

Understanding Forex Leverage

Leverage allows you to control large positions with small capital. 1:100 leverage means $1,000 controls $100,000 position.

LeverageMargin RequiredPosition Size ($10K Account)Risk Level
1:1010%$100,000 (1 lot)Low
1:502%$500,000 (5 lots)Moderate
1:1001%$1,000,000 (10 lots)High
1:5000.2%$5,000,000 (50 lots)Extreme

Margin Call Example

$10,000 account, 1:100 leverage, 1 standard lot EUR/USD (100K units):

  • • Margin required: $1,000 (1% of position)
  • • Free margin: $9,000
  • • Each pip = $10 gain or loss
  • • 100 pip adverse move = -$1,000 (down to $9K account)
  • • 500 pip adverse move = -$5,000 (down to $5K, margin call territory)
  • • 1000 pip adverse move = Account blown

Trading Sessions

24-Hour Forex Sessions

SessionTime (EST)Active PairsCharacteristics
Tokyo7pm - 4amUSD/JPY, AUD/USD, NZD/USDLower volatility, range-bound
London3am - 12pmEUR/USD, GBP/USD, EUR/GBPHighest volume, strong trends
New York8am - 5pmAll USD pairsHigh volatility, news-driven
London/NY Overlap8am - 12pmEUR/USD, GBP/USD🔥 Peak liquidity & volatility

Most profitable trading occurs during London/NY overlap. Tokyo session is quieter, good for range-bound strategies.

Backtesting by Session

Filter your backtest results by session. A strategy might be profitable during London hours but lose money during Tokyo. Session-specific strategies can dramatically improve results.

Currency Correlations

Pair 1Pair 2CorrelationMeaning
EUR/USDGBP/USD+0.85Move together (both vs USD)
EUR/USDUSD/CHF-0.90Move opposite (inverse USD pairs)
AUD/USDNZD/USD+0.92Near-identical (commodity currencies)
EUR/USDUSD/JPY-0.60Moderate negative correlation

Avoid Over-Leverage Through Correlation

Trading EUR/USD and GBP/USD long simultaneously is essentially doubling your USD short exposure. If USD strengthens, both positions lose. Same with AUD/USD and NZD/USD. Account for correlation in your position sizing.

Frequently Asked Questions

How do I backtest forex strategies?

To backtest forex: 1) Choose currency pairs (EUR/USD, GBP/USD etc), 2) Include realistic spreads (1-3 pips for majors), 3) Account for leverage and margin, 4) Test across different sessions (London, NY, Tokyo), 5) Use at least 5 years of data covering multiple market conditions. Forex operates 24/5, so consider session-specific behavior.

What spread should I use for backtesting?

Use realistic spreads based on your broker and pair: Major pairs (EUR/USD, GBP/USD): 0.5-2 pips, Minor pairs (EUR/GBP, AUD/NZD): 2-5 pips, Exotic pairs (USD/TRY, EUR/ZAR): 10-50 pips. Add 20-30% buffer for slippage. If your broker quotes 1 pip spread, backtest with 1.3 pips to be conservative.

Should I backtest with leverage?

Backtest with your intended live leverage but focus on % returns, not absolute dollar amounts. Leverage amplifies both gains and losses. Test with 1:50 or 1:100 leverage typical for retail forex. Always include margin call scenarios in your risk analysis. High leverage means small adverse moves can wipe out your account.

Related Guides

Backtest Forex Strategies Now

Test EUR/USD, GBP/USD, and 50+ currency pairs with realistic spreads, leverage modeling, and session-specific analysis. No coding required.