Strategy Backtester

Historical Analysis

Test long- and medium-term trading strategies on real historical price data. Compare Buy & Hold, Dollar-Cost Averaging, RSI signals, and the Golden/Death Cross moving-average crossover — side by side on any stock or ETF.

Backtest Configuration

Ticker Symbol

Any US stock or ETF — up to 20 years of data loaded automatically

$

Lump sum invested on the first day of the period.

$

Added every contribution period (monthly) to all strategies except DCA lump-sum-only Buy & Hold.

How often the contribution amount is added and strategy signals are re-checked.

Ready to backtest
Enter any US ticker symbol above and click "Run Backtest" to load historical data and compare strategies.

Strategies Compared

DCA Monthly
Invest a fixed amount every month, regardless of price. Mirrors 401(k) contributions. Reduces timing risk by averaging your entry price. The baseline all other strategies are measured against.
RSI Strategy
Same monthly contributions as DCA, but only buys when RSI(14) < 30 (oversold). Sells when RSI > 70. Cash accumulates between signals and deploys all at once when the next buy fires.
MA Crossover
Same monthly contributions as DCA, but only buys on a Golden Cross (50-day MA > 200-day MA). Sells on Death Cross. Cash accumulates while out of market, deploys on next entry signal.
Value Averaging
Each month, buy enough to hit a target growth path (default 1%/mo). If the portfolio ran ahead, sell the excess. Automatically buys more after dips and less after rallies — contrarian by design.
Dip Buyer
Near all-time highs, still invest 90% monthly and skim just 10% into a reserve. When price drops 10%+ from ATH, deploy everything at once. Stays mostly invested through rallies while keeping dry powder for real dips.
Momentum (12-1m)
Each month, check the 12-month return excluding the last month. If positive: stay/go invested. If negative: exit to cash. One of the most replicated anomalies in academic finance — trend persistence at the monthly scale.
VIX Fear Buying
When VIX is calm, still invest 85% of the monthly contribution and save just 15%. Elevated VIX = invest normally. Panic-level VIX = deploy all saved cash at once. A small calm-zone skim keeps cash drag low during rallies.
Vol-Scaled DCA
Same contrarian idea as VIX buying, but compares the stock's own realized volatility to its own trailing average. Below-normal vol for this stock: invest 90%, save 10%. Above-normal: invest more, up to all-in during a vol spike. Self-calibrating, so it works on any ticker regardless of its typical volatility level.

Frequently Asked Questions

What is strategy backtesting?
Backtesting applies a trading strategy to historical price data to see how it would have performed. It helps investors understand a strategy's risk/reward profile, max drawdown, and return before risking real money. Past performance does not guarantee future results.
Does Dollar-Cost Averaging beat Buy & Hold?
Research shows Buy & Hold outperforms DCA about 2/3 of the time in rising markets, because DCA leaves cash uninvested while waiting for future purchase dates. However, DCA invests additional monthly contributions, so the final portfolio value with DCA is often higher due to more total capital deployed.
Does the RSI strategy work for long-term investing?
RSI-based strategies can reduce drawdowns in volatile markets by selling during overbought conditions. However, in strong bull markets they may sit in cash for long periods, missing gains. The RSI strategy tends to shine during choppy, range-bound markets and underperform simple buy & hold in long bull runs.
What is the Golden Cross strategy?
The Golden Cross is when the 50-day moving average crosses above the 200-day moving average — a bullish signal to buy. The Death Cross (50-day crossing below 200-day) is a sell signal. This moving average crossover strategy captures long-term trends but lags at turning points, leading to late entries and exits.
What are the limitations of backtesting a trading strategy?
Backtests are run on a single historical price path, so a strategy that looked great over one period can perform very differently in the future. They also can't fully capture real-world frictions like slippage, taxes, and the emotional difficulty of sticking with a strategy through a losing streak. Backtests are a useful research tool, not a guarantee.
Does past performance predict future returns?
No. A strategy's historical results reflect what happened to have worked in that specific market and time period, and market conditions, volatility regimes, and correlations change over time. Backtests are best used to understand a strategy's general behavior and risk characteristics, not as a promise of future performance.
Related Articles
→ Understanding MACD Signals: A Complete Guide to Trading Momentum→ Stock Market Seasonality: Monthly Returns & 'Sell in May' Patterns→ Portfolio Analysis Guide: How to Analyze Your Stock Portfolio Performance
Related Tools
CAGR CalculatorDCA CalculatorCompound InterestDividend & DRIP