Skip to main content
All manual pages

Backtest

Backtest runs four pre-built single-symbol strategies — RSI Crossover, MA Crossover, MACD Signal, Bollinger Breakout — against daily historical data with configurable parameters, returning total return, Sharpe, max drawdown, win rate, trade log, and an equity curve vs. buy-and-hold.

Backtest runs a single-symbol strategy against daily historical price data and reports the standard performance ledger — total return, max drawdown, Sharpe, win rate, trade log, and an equity curve compared against buy-and-hold over the same window. Four pre-built strategies cover the canonical signal families: oscillator reversion (RSI), trend (MA crossover), momentum-trend (MACD), and volatility breakout (Bollinger).

The backtester — strategy rules and parameters with the historical equity curve and stats
The backtester — strategy rules and parameters with the historical equity curve and stats

What it is

A server-side strategy backtester. You pick a symbol, a strategy, its parameters, a date range, and a starting balance; the backtest pulls daily historical closes for that symbol, walks bar-by-bar evaluating the strategy's signal at each close, and simulates an all-cash long-only book: on a buy, it deploys all available cash into shares at that day's close; on a sell, it liquidates the position at that day's close. Round-trip P&L is computed at the sell; equity is marked-to-close every day. The Sharpe ratio is annualized off daily returns with the standard √252 scaling.

This is long-only, single-symbol, daily-bar. No shorting, no portfolio of names, no intraday timing, no transaction costs, no commission/slippage modeling. Custom-strategy upload is not currently available — the four strategies in the dropdown are the full set. If you need shorts, multi-asset, intraday, or your own signal logic, those aren't supported today.

When to use it

To get a first-pass read on whether a textbook strategy has any edge on a name you trade — does RSI(14) with 30/70 thresholds beat buy-and-hold on TSLA over the last two years? To compare strategy families on the same name — same window, same capital, swap RSI → MACD → Bollinger and read the Sharpe deltas. To sweep parameters by hand — change the RSI period from 14 to 21 and see whether the win rate moves. To stress-test a strategy across a drawdown window — set the start/end to bracket a known bear cycle and see whether the strategy goes to cash or rides it down.

Do not use it to validate a real trading system. The lack of commission, slippage, intraday timing, and short capability means the absolute numbers are optimistic — read the delta between strategy and buy-and-hold, and the shape of the equity curve, not the headline return.

Open it

  • Path: /backtest
  • Shortcut: none — accessible from the §TOOLS group in the sidebar
  • Tier-gate: Pro and above — Free shows the upgrade gate. Access is enforced server-side as well as in the app, so the backtest can't be run from a Free account

How to use it

  1. Open /backtest. The form loads pre-filled with AAPL, RSI Crossover, the strategy's default parameters, 2024-01-01 to 2026-01-01, and $10,000 initial capital.
  2. Set the Symbol (uppercased on input).
  3. Pick a Strategy from the dropdown — RSI Crossover, MA Crossover, MACD Signal, Bollinger Breakout. Changing the strategy resets the parameter set to that strategy's defaults.
  4. Set Start Date and End Date. The window must contain at least 50 trading days of available history or the backtest returns an error.
  5. Set Initial Capital (must be > 0; the field allows any positive number).
  6. Tune the strategy parameters in the second row. Each strategy exposes its own set — RSI takes period / oversold / overbought; MA takes period / maType (0 = SMA, 1 = EMA); MACD takes fast / slow / signal periods; Bollinger takes period / stdDev.
  7. Hit [ RUN_BACKTEST ]. The button flips to [ RUNNING... ] while the data is pulled and the engine runs — typically two to ten seconds.
  8. Read the eight summary cards: Total Return, Buy & Hold, Max Drawdown, Sharpe Ratio, Win Rate, Total Trades, Final Equity, vs Buy & Hold. Green/red coloring matches the sign of the metric.
  9. Read the equity curve — strategy line (solid) plotted against buy-and-hold (dashed). The shape matters more than the endpoint: a strategy that goes to cash before a 30% drawdown is doing its job even if it lags B&H by the close.
  10. Scroll the trade log for the bar-by-bar entry/exit table — every buy and sell with date, price, share count, dollar P&L, and percent P&L. Useful for spotting whipsaw runs and individual blow-up trades.

Fields

StrategySignal logic
rsi_crossoverBuy when RSI(period) crosses below oversold; sell when RSI crosses above overbought. Defaults: 14 / 30 / 70
ma_crossoverBuy when close crosses above the moving average; sell when close crosses below. maType=0 SMA, maType=1 EMA. Default period 20
macd_signalBuy on bullish MACD cross (MACD line crosses above signal line); sell on bearish cross. Defaults: 12 / 26 / 9
bollinger_breakoutBuy when price breaks below the lower band; sell when price breaks above the upper band (mean-reversion, not breakout-direction). Defaults: 20 / 2.0
Result metricDefinition
Total Return(finalEquity − initialCapital) / initialCapital × 100
Buy & HoldSame window, all cash deployed at the first close, marked at the last close
Max DrawdownPeak-to-trough decline of the equity curve, dollar and percent
Win RateWinning round-trips ÷ total round-trips. A "round-trip" is one buy paired with the next sell
Sharpe RatioDaily-return mean ÷ daily-return std-dev, annualized by √252. Excess-return assumes zero risk-free rate
Total TradesCount of completed round-trips (sells with non-null P&L)
Final EquityCash + (open-position shares × last close)
vs Buy & HoldtotalReturnPercent − buyAndHoldReturnPercent — the strategy's alpha over passive
Trade log columnWhat it is
TypeBUY (green) or SELL (red)
DateTrading day of the fill
PriceThat day's close (the fill price assumed by the engine)
SharesWhole-share quantity (cash ÷ price, floored)
P&LDollar P&L on the round-trip — null on buys, populated on sells
P&L %Percent P&L vs. entry price — null on buys, populated on sells

Limits

  • Long-only. No short side, no inverse strategies. A sell signal with no open position is ignored
  • Single symbol. No basket backtests, no portfolio simulation, no cross-asset rotation
  • Daily bars only. No intraday timing — every signal fires at the close
  • No transaction costs. No commission, no slippage, no spread, no borrow cost. Real-world results will be worse
  • All-in sizing. Every buy deploys all available cash. No position sizing, no Kelly, no risk-per-trade — this is a fixed engine constraint
  • Custom strategies not supported. The four pre-built strategies are the full set — there's no way to add your own
  • Minimum window: 50 trading days of available history. Shorter windows return an error
  • Strategy logic uses cross detection (the prior bar was on one side of the threshold, the current bar is on the other) — single-touch signals are intentionally excluded, which means very rapid intraday reversals can be missed at the daily resolution
  • Equity curve is sampled every 5th bar to keep the chart light — it's smoothed accordingly, but the underlying P&L and metrics are computed on every bar
  • Sharpe uses zero risk-free rate. The number is comparable across runs but is not the strict CFA-formula Sharpe
  • The Bollinger Breakout strategy is mean-reversion (buy the lower-band break, sell the upper-band break), not trend-following — this is how the engine computes the signal, not the colloquial use of "breakout"
  • Historical data covers US equities and major ETFs reliably. Foreign listings, OTC, recent IPOs, and obscure tickers may return insufficient data

Troubleshooting

No historical data found for <SYMBOL> in the given date range. There's no data for the requested window on that ticker — common on OTC, recent IPOs, foreign symbols, and delisted names. Try a more liquid US-listed proxy, or widen the date window to find what's available.

Not enough historical data for backtesting. Need at least 50 trading days. The window contains fewer than 50 closes. Widen the date range — two months of calendar dates plus weekends rarely hits 50 trading days.

Strategy underperforms buy-and-hold by 30% over a bull run. Expected for mean-reversion strategies in trending markets — RSI sells the early breakout and Bollinger sells the upper-band rip. The vs Buy & Hold card is the honest read. The strategy might still earn its keep in chop or in a bear regime — backtest the same parameters against a 2022 window and compare.

Win rate is high but total return is low. Lots of small wins eaten by a few large losses, or the strategy spends most of the window in cash missing the trend. Read the trade log and the equity curve together — flat green segments between trades are cash periods.

Sharpe is 0.00. Either zero trades (the strategy never triggered in the window — loosen the thresholds) or daily-return standard deviation is zero across the window (effectively impossible for real data; usually means the equity was unchanged because no signals fired).

Backtest returns instantly but the result is empty. Data was fetched fine but no signals fired across the entire window. Tighten the parameters — RSI 14/40/60 fires more often than 14/30/70; MA(50) fires less than MA(20). Or pick a more volatile name.

The Upgrade Gate appears even though I'm on Pro. Your subscription state may be temporarily out of sync. Refresh the page; if it persists, hard-reload and re-authenticate. Access is enforced server-side — if the page shows the gate, the request was rejected as a Free account.

[ RUNNING... ] never resolves. The backtest is fetching a long window or the data request timed out. Wait up to 30 seconds; if it still spins, narrow the window and retry. Very long windows (10+ years) can exceed the run-time budget.

The equity curve and trade log show different final equities. They shouldn't — both come from the same run. If you see a gap, refresh; it's a stale render of an earlier run.

  • Simulator — paper-trade the strategy you just backtested against live quotes
  • Charts — visualize the indicators the strategy uses
  • Scanner — find the symbols worth backtesting
  • Idea Tracker — log the backtest's best signal as a forward idea