Backtest a stock strategy over up to 20 years vs the S&P 500
Stress-test a simple rule on up to 20 years of US large-cap price history — CAGR, Sharpe, drawdown and win rate, benchmarked against SPY, with signals that never peek at the future.
US coverage included in your free 14-day trial · no credit card required
StoqPulse's backtester runs a walk-forward simulation over a selectable window of up to 20 years on US large caps: pick a preset rule, set a rebalance schedule, and see how an equal-weight model portfolio would have tracked against the S&P 500. Every price signal uses only data available on each rebalance date, so you measure a rule's edge instead of hindsight. US coverage anchors your free 14-day trial across StoqPulse; the backtester itself is a Pro feature — we say so plainly below.
Four preset strategies, one click
Choose from four ready rules: Quality + Momentum (strong 6-month trend with price above the 200-day average), Deep Value (biggest drawdowns from the 52-week high — contrarian, higher volatility), Low Volatility (the calmest names, often a better Sharpe), and F-Score ≥ 7 (high-quality balance sheets, then ranked by momentum). The simulation ranks your chosen universe — 25 US large caps by default, or your watchlist or your holdings — at each rebalance and holds the top names, eight and equal-weight by default. No formula-building required to start: pick a preset, pick a cadence, and run — and a custom rule builder is there when you want it.
Walk-forward over up to 20 years, no lookahead
The engine pulls the daily price history for your chosen window — 5, 10, 15, or 20 years — for 25 large caps plus SPY, uses the first year (252 trading days) as a warm-up for indicators, then walks forward bar by bar. At each rebalance date, holdings are scored using only prices up to that day — momentum, 200-day trend and volatility are all computed in-sample, never with future data. That discipline is the whole point: it tells you whether a rule would have worked in real time, not whether it fits the past in hindsight.
CAGR, Sharpe, drawdown and win rate vs SPY
Each run reports four headline metrics: CAGR (smoothed annual return), Sharpe (return per unit of volatility, annualised), max drawdown (worst peak-to-trough drop), and win rate (share of rebalance periods that ended positive). Alongside, you get alpha in CAGR terms versus the S&P 500, total return for both strategy and SPY, and the exact test window. The benchmark is buy-and-hold SPY, so you always see the rule against the obvious passive alternative.
Equity curve, drawdown and monthly returns
Results render as an indexed equity curve — strategy versus SPY, both starting at 100 — plus a peak-to-trough drawdown chart and a last-12-months returns grid. A final table shows the model portfolio at the last rebalance, with names and weights. Rebalancing carries a friction charge on turnover — 10bps by default, and adjustable — to stay honest about real-world costs. Everything is hypothetical and historical, labelled as such, and meant to stress-test rules — not forecast the future.
Weekly, monthly or quarterly rebalancing
Rebalance cadence changes a strategy's behaviour, so you can flip between weekly, monthly and quarterly and re-run instantly. Faster rebalancing reacts quicker but trades more (and pays more friction); slower cadence is calmer and cheaper. Comparing the same rule across cadences is one of the quickest ways to see whether an edge is real or just an artefact of turnover. A cold run pulls daily price history in about 15 to 30 seconds; histories are cached for 12 hours, so re-running the same window with a different cadence is near-instant.
An honest limitation we won't hide
The F-Score ≥ 7 preset filters on today's Piotroski F-Score, not the score as it stood on each historical rebalance date — true point-in-time fundamentals would require a data warehouse we don't yet run. So that one strategy carries mild lookahead on the quality filter (its price signals are still walk-forward). The other three presets use only price data and have no such caveat. We flag this in the product itself, because a backtest you can't trust is worse than none.
A Pro feature — and what your free trial gives you
Backtesting is gated to Pro and above via the accessBacktest entitlement; the free 14-day trial sees an upgrade wall rather than a run button. That said, StoqPulse's free US trial still gives you the building blocks behind these strategies — the composite multi-factor score, Piotroski F-Score and screener that define the same rules you'd backtest. Check live pricing for current Pro terms; we never quote our own prices here because they're configured dynamically, not baked into this page.
Frequently asked questions
By default it runs an equal-weight model portfolio of the top eight US large caps that fit your chosen rule, rebalanced weekly, monthly or quarterly over a window you choose (5, 10, 15, or 20 years) of daily price history, and compares it to buy-and-hold SPY with a 10bps friction per rebalance. Portfolio size (5, 8, 10, 15 or 20), weighting (equal, score-weighted or inverse-vol), benchmark and universe are all configurable. Results are hypothetical and historical, meant to stress-test rules rather than predict returns.
For price signals, yes. At each rebalance the engine scores stocks using only data up to that bar — momentum, the 200-day trend and volatility are all computed in-sample. The one exception is the F-Score ≥ 7 preset, whose quality filter uses today's F-Score rather than point-in-time fundamentals. We flag that limitation directly in the product.
Every run shows CAGR, Sharpe ratio, max drawdown and win rate, plus total return and alpha in CAGR terms. The default benchmark is buy-and-hold S&P 500 via SPY; you can also pick QQQ, IWM, DIA or a sector ETF. Both curves are indexed to 100 at the start so you can read them side by side. You also get a drawdown chart, a 12-month returns grid and the final model-portfolio holdings.
Backtesting is a Pro-and-above feature, gated by the accessBacktest entitlement; free-trial users see an upgrade prompt instead of running simulations. The underlying rules — composite score, Piotroski F-Score and the screener — are available during StoqPulse's free 14-day US trial, so you can build and inspect strategies before upgrading. See live pricing for current Pro terms.
Yes. Pick the universe source: the default 25 US large caps, your watchlist, your holdings, or a set handed off from the screener (up to 30 tickers). You also choose portfolio size (5, 8, 10, 15 or 20), weighting (equal, score-weighted or inverse-vol) and benchmark (SPY, QQQ, IWM, DIA or a sector ETF). A screen-sourced universe carries an extra survivorship caveat, because the names were picked on today's fundamentals.
Usually 15 to 30 seconds on a cold run (a little longer for a 20-year window), and near-instant afterwards. A cold run fetches the daily prices for your chosen window (5, 10, 15, or 20 years) across your universe plus the benchmark, then simulates the walk-forward rebalances and computes metrics. Price histories are cached for 12 hours, so changing strategy, cadence or parameters recomputes without re-fetching. The F-Score quality caveat noted above still applies.
Explore more StoqPulse tools
Start free for 14 days — US coverage included
Build the discipline into your process. No credit card required.