Before You Trade That Strategy, Backtest It
Every trader eventually develops a theory. Buy when the 50-day moving average crosses above the 200-day. Sell when RSI gets too hot. Add to winners, cut losers fast. These ideas feel compelling, especially after you watch them work a few times in real market conditions and the confirmation bias kicks in.
The problem is that human memory is selectively terrible. You remember the times the strategy worked. You forget, or quietly rationalize, the times it did not. Before you put real money behind any systematic idea, you want to see what actually would have happened if you ran it through years of historical data. That is what backtesting is for.
The FatNarwhal Backtester runs your strategy against real historical price data and shows you the results in full, including returns, drawdowns, win rate, and how you did versus simply holding the asset the entire time. No coding required; you pick the stock, the strategy, the parameters, and hit run.
How to Use It
Go to fatnarwhal.com/backtest and set up your test.
Pick a ticker, say SPY. Set your strategy to an SMA crossover; the simple moving average crossover is the most common entry-level systematic strategy and a great baseline. Set the fast window to 50 days and the slow window to 200 days. The rule is straightforward; when the 50-day SMA crosses above the 200-day, you buy. When it crosses below, you sell and sit in cash.
Pick a date range, five or ten years is a reasonable test window, then run it.
The results page shows your total return over that period, the number of trades, your win rate on individual trades, your maximum drawdown (how far the strategy fell from its peak before recovering), and most importantly how all of that compares to just holding SPY the entire time and doing nothing. That buy-and-hold benchmark is the bar your strategy needs to clear to be worth the effort of running it.
Try different parameter combinations. Swap to a 20-day and 100-day crossover and see what changes. Longer windows tend to generate fewer trades with bigger per-trade returns but slower entries; shorter windows trade more frequently and react faster but generate more false signals and transaction costs.
The Math Behind It
The SMA crossover strategy is built on two averages:
When the fast SMA rises above the slow SMA, momentum is considered bullish and the strategy enters long. When the fast drops below the slow, the strategy exits. The backtester applies this rule consistently across the entire historical window, counts every trade, and aggregates the results.
The performance metrics worth paying closest attention to are the Sharpe ratio (return per unit of volatility, where higher is better), max drawdown (the worst peak-to-trough loss you would have sat through), and the comparison to buy-and-hold. A strategy that returns 8% annually but with a 40% max drawdown is a worse trade for most people than simply holding the index for 10% with a 20% drawdown.
When to Use It and When Not To
Use it any time you have a systematic idea you want to pressure-test before trading it live. It is particularly valuable when a strategy sounds compelling but you have only seen it work for a few months; a backtest forces you to see what happened in 2008, 2020, 2022, and every other period where markets behaved badly.
Be careful with a few well-documented backtesting traps. Overfitting is the biggest one; if you tune your parameters against historical data long enough you can make any strategy look good in the past, but the performance will not hold out of sample. Look-ahead bias is another; make sure the strategy only uses information that would have been available at the time of each trade. And survivorship bias matters if you are testing on hand-picked stocks; you tend to naturally pick stocks that did well, which inflates results.
The backtester is an honest starting point, not a guarantee. Good historical performance is a necessary but not sufficient condition for a strategy that works going forward.
Try It
Head to fatnarwhal.com/backtest and run a 50/200 SMA crossover on SPY over the last ten years. Compare it to buy-and-hold. The result might make you more confident in your strategy, or it might save you from a lot of pain.
Either outcome is a good one.