Backtest — What Is Investment Strategy Backtesting?
What is backtesting? How to test investment strategies on historical data, what are the pitfalls, and when backtesting makes sense.
What is a backtest?
Backtest (backtesting) is testing an investment strategy on historical data. You check how your strategy would have performed in the past — what returns it would give, what losses, what drawdown.
Example: "If I bought S&P 500 every month since 2010, how much would I have today?"
How to conduct a backtest?
Step 1: Define strategy
Precise entry and exit rules:
- When do you buy? (e.g., 1st day of month)
- How much do you buy? (e.g., $1,000)
- When do you sell? (e.g., never / after reaching target)
Step 2: Choose historical data
- Period — longer is better. Minimum 10 years, ideally 20–30.
- Source — Yahoo Finance, Portfolio Visualizer (automatic backtest).
Step 3: Run simulation
Tools:
- Portfolio Visualizer (portfoliovisualizer.com) — free, intuitive.
- Backtest.curvo.eu — European ETFs, includes TER.
- Python + pandas — for advanced users, full control.
Step 4: Evaluate results
Key metrics:
- CAGR — compound annual growth rate
- Max drawdown — largest peak-to-trough decline
- Sharpe ratio — risk-adjusted return
- Win rate — % of profitable trades
Backtesting pitfalls
Overfitting (curve fitting)
Biggest sin: you optimize the strategy until it perfectly fits history. Won't work in the future because you "learned" noise, not signal.
Survivorship bias
Testing on companies that survived. Doesn't include bankruptcies — which inflates results.
Look-ahead bias
Using information not available at decision time (e.g., annual company results in January when report comes out in March).
Ignoring transaction costs
Backtest without commissions, spreads, and taxes gives unrealistic results.
When does backtest make sense?
- Comparing simple strategies — DCA vs lump sum, 60/40 vs 80/20.
- Checking drawdowns — could you withstand a 40% drop?
- Testing allocation — which asset mix gave best risk/reward?
When does backtest mislead?
- For strategies based on short-term signals (market timing).
- When optimizing dozens of parameters.
- When testing on too short period (<5 years).
How Freenance can help?
Freenance lets you track your portfolio's real history — it's your "live test." Compare your results with benchmarks and check if your strategy works in practice, not just on paper.
Want full control over your finances?
Try Freenance for free