Stock strategy backtester
“What if I bought every time the price dropped 5% and sold the next day?” Test it in seconds on real daily prices — against simply buying and holding. Free, no signup.
Start from a fully built setup
Each card is a whole setup, not just an indicator — entry and exit rules, trading fees on, and where the strategy calls for it, a stop, a target and risk-based sizing. Each card spells out what it loads. Each card opens that strategy’s own page, where it runs on arrival and the rules are spelled out — then change the ticker or any number and run it again.
What this tool does
Search for a company or ticker (stocks, ETFs, crypto), build a setup out of plain-English rules — “RSI(2) is under 10”, “price crosses above the 20-day EMA” — and the backtester replays the last five years of daily closing prices to show what those rules would have returned versus buy & hold: total return, CAGR, maximum drawdown, win rate, and every individual trade. As you edit, it tells you how many bars the setup actually fired on, so you know whether you have a strategy or a curiosity before you spend a run on it.
In a hurry, start from a classic. Every named strategy below has its own link — RSI-2 reversion, the Golden Cross, a Donchian breakout — and runs on the spot. 9 of them arrive as editable rules — nothing to click, the builder is already holding them — so a template is a starting point rather than a black box: you can see exactly what it does, change a number, and re-run.
The ten strategies
Dip buyer— buys at the close of any day that fell at least your chosen percentage, and sells a set number of trading days later. The classic “buy the dip” hypothesis, quantified.
SMA cross — stays invested while the fast simple moving average (say, 20 days) is above the slow one (say, 50 days) and steps aside when it crosses back under. The textbook trend-following rule.
RSI — mean reversion: buys when the Relative Strength Index falls into oversold territory and sells once it climbs back into overbought. The default 2-period / 10 / 70 settings are the classic RSI-2 setup.
MACD — momentum: goes long when the MACD line (the gap between a fast and a slow moving average) crosses above its signal line and steps aside when it crosses back below. The default 12 / 26 / 9 is the standard MACD.
Bollinger — mean reversion: buys when the close dips below the lower Bollinger band (a set number of standard deviations under its moving average) and sells when it reverts back up through the middle band. The default is the standard 20-day / 2σ band.
Breakout— trend-following: buys when the price breaks above its highest close of the last N days (a new high) and sells when it breaks below its lowest close of the last M days. The default 20 / 10 is the classic Donchian “Turtle” channel.
Pullback— trend-following the way discretionary swing traders do it: while the price is above its long trend line (a 200-day average by default), it buys the dip that reclaims the shorter moving average (the 20-day EMA) from below — a bounce off the average — and exits when the trend breaks. “Buy the dip in an uptrend,” mechanised.
Capitulation — the contrarian bottom-fish, and the one strategy that reads the full candlestick, not just the close. After a steep sell-off to a new multi-month low with Williams %R washed out on both a fast and a slow window, it waits for a one white soldier reversal — a bullish bar that gaps its open above the panic day’s close, makes a higher low, and closes above the panic day’s high — then buys, exiting when the bounce runs out. Long-only; pair it with a stop and a 2R target.
Impulse pullback — trades the first dip of a brand-newuptrend. A fast-over-slow EMA cross (6 over 18 by default) marks the new trend; then it waits for a one- or two-bar corrective pullback off a swing high and buys the bar that resumes — breaking back above the pullback’s high — exiting when the trend crosses back down. Long-only.
DCA / what-if — invests a fixed amount every month or week no matter what, and shows what that steady plan grew into versus investing everything on day one.
Add a stop-loss, take-profit, and risk sizing
Any of the trading strategies (everything except DCA) can carry a risk overlay — the trade-management layer real swing traders live by. It lives under Advanced, in the Exits and Risk & position sizing sections. Set a stop-loss (a fixed percentage, or a multiple of the stock’s ATR volatility), a take-profit (a multiple of the risk you took — 2R, 3R — or a flat percentage), a trailing stop that follows the trade up and never loosens, a limit that gives up on a trade after N days without a new high, and optionally move the stop to breakeven once a trade is a set number of R in profit. With a stop in place the tool sizes each position by risk — 1% of the account to the stop by default — and reports your expectancy in R, the average multiple of risk each trade returned. Every exit is checked at the daily close, so a level pierced and recovered the same day won’t trigger.
The swing-trading systems
A second family wires the classic discretionary playbook onto the engine: EMA bounce and Trend retracement (buy pullbacks to a rising average), Breakout + 2R (a managed Donchian breakout),Bollinger reversion + 2R, Capitulation (the candlestick bottom-fish), and Impulse pullback(the first dip of a new trend) — each pre-loaded with an ATR stop, a 2R target, breakeven management and 1% risk. They’re honest approximations: this engine sees one ticker in isolation, so it can’t check the market or sector trend or relative strength the full systems use. Treat a result as “how the rule alone behaved,” then apply the rest of your checklist by hand.
Finding candidates to test
Which names to run a system on? Skip the external scanners — the momentum screener surfaces the strongest large caps (the kind these trend systems want), and the tools page has the rest. Find a candidate there, then paste its ticker here and run the setup.
What it deliberately leaves out
Results use daily closing prices. Dividends are counted and treated as reinvested, because the prices are adjusted for them — which matters a lot for income stocks. Trading fees and slippage are off unless you set them in step 4, Test settings; taxes are never modelled. Only still-listed tickers can be tested, which flatters every strategy (survivorship bias). Past results predict nothing. This is an educational tool, not investment advice.
Just want to know what investing a fixed amount every month would have grown into? That’s the DCA calculator.
Want to run rules against your own actual portfolio, combine indicators, or test longer histories? That’s what Pulse is for.