The backtest uses sourced daily closing prices only. It does not use the retired company fundamental/exposure scores or reconstructed v1 history.
The original backend version is price-ma5-ma10-retrospective-v1, with a fixed ten-session horizon across the supported 20-symbol universe. The static full snapshot supplies public retrospective coverage; the Pages UI does not need a running API or Supabase. V1 remains available alongside the separate v2 simulation described below.
For each ticker, sort positive closes by distinct trading date and require an HTTPS provider dataset URL. The test uses only rows from the most recent provider dataset, avoiding an unexplained mix of vendors. At each close after ten observations, calculate MA5 and MA10 using only prices available through that date. A bullish signal occurs when MA5 crosses from at or below MA10 to above it; a bearish signal occurs on the reverse crossing. Entry uses the next observed session close. Exit uses the close ten observed sessions after entry. Outcomes without both closes stay pending and do not enter performance statistics.
Directional return is (exit / entry - 1) for bullish signals and its negative for bearish signals. Hit rate is the share of completed signals with positive directional return. Average directional return is the arithmetic mean over completed signals. Each row shows its signal averages, entry and exit dates/prices, and source dataset URL. The reported sample size is the number of completed signals.
This is a retrospective calculation over later-retrieved historical prices. It is not a recorded live strategy. Closes are not executable entry quotes; trading costs, slippage, dividends, corporate actions, revised data, and overlapping outcomes are not modeled. Descriptive hit rate and average return do not establish predictive skill or suitability for an investor.
The separate daily-close-long-only-v2.0 engine accepts MA5/MA10 or momentum breakout/continuation, a holding period from 1 to 60 observed sessions, transaction cost and slippage each from 0 to 100 basis points per side, and SPY or QQQ as benchmark. Defaults are 10 sessions, 10 bp cost and 5 bp slippage per side. The UI offers a subset of these settings. MA entry signals are upward crossings only; breakout entries follow a newly observed breakout or reconfirmation. An observed signal schedules entry at the next observed close and the position exits at the close after the selected holding period. There is at most one active position, with no overlapping entries. The v1 bearish directional statistic is not a short trade.
Each run begins with one unit of cash. All available capital is invested on entry; idle cash earns zero. With fee f and slippage s expressed as fractions, shares bought are cash / (close × (1+s) × (1+f)). Exit cash is shares × close × (1-s) × (1-f). Daily equity is cash plus shares marked at that day's close; compounded portfolio return is final equity divided by starting equity minus one, and drawdown compares each daily equity with the preceding peak. An open position is marked at the last available close without assumed exit costs and is reported as pending; a signal with no following close is pending entry. Completed-trade win rate, average net return and average holding period exclude pending trades. All daily-close fills are simplified research assumptions, not executable quotes.
Benchmark price return requires matching start and end dates and the same identified provider. It is unavailable when those conditions are not met. The 70%/30% chronological reports run the fixed rules separately, resetting each period to cash and using prior history for indicator warmup. A position is not carried across the split; an open trade in a segment remains pending. Cost sensitivity repeats the same rules with zero, selected and twice-selected transaction costs (capped at 100 bp), with slippage unchanged. No parameter fitting occurs, so walk-forward refitting is not applicable.
The result records methodology version, assumptions, source coverage and observation IDs. Compact snapshots have at most 120 closes per ticker, so sample sizes may be small. Missing sessions, survivorship and later provider revisions limit historical inference; an archival point-in-time dataset is not available. Splits and dividends are not consistently verified, so returns and benchmark comparisons are price-only rather than total returns. These results do not establish predictive skill or suitability.
The lab explicitly labels insufficient history, no completed trades, and completed samples below 20 trades, both for the full run and each chronological segment. Twenty is a display caution threshold, not a statistical adequacy or predictive-performance claim. A segment needs at least two observed dates and enough preceding prices for the selected method before return/drawdown is shown; unsupported equity curves and single-date benchmark returns are withheld. Missing exchange dates are not filled: holding periods count observed intervals, which can span more exchange sessions.
The optional API accepts POST /api/backtest with version: "v2", a tracked ticker, and the v2 settings method, holdingSessions, transactionCostBps, slippageBps, and benchmark. An optional asOf cutoff supports reproducibility; the API defaults it to the request time, and the static UI uses the snapshot's generation time. Observations dated after the cutoff and records known to have been retrieved after it are excluded before selecting revisions. Records with missing or invalid retrieval dates can still be used; their availability by the cutoff cannot be established, and the selected ticker's unknown retrieval-date count is reported. This does not reconstruct the version of a historical price that was available on its original date. The run is persisted with its settings and methodology version. Existing v1 requests remain supported.