● rule backtest — trades, equity curve & drawdown, no look-ahead

Backtest a rule — see exactly how it would have traded.

We replay a trading rule bar-by-bar over the price path and show the full record: every trade, the equity curve, your win rate, average R, profit factor and max drawdown — plus notes on what each number means. The demo rule is a 20-day moving-average crossover (long when price closes above its 20-day average, exit when it closes below, with an 8% stop). Fills happen at the bar close, so there is no look-ahead, replayed on real multi-year daily history (1256 bars).

NVDA20-day moving-average crossover, long-only, 8% stopreal price history (1256 bars)
65
trades
+30.8%
win rate
4.83R
avg R (win/loss)
2.15
profit factor
-63.92%
max drawdown
+272.77%
total return

Equity curve — the rule's running NAV

03146289411255break-even (1.00×)
strategy NAV (starts 1.00×)x = bar index · 1256 bars · exposure +58%
Sharpe0.87Sortino1.27
Calmar0.47Annualized+30.24%
Avg win+17.33%Avg loss-3.59%

Fills execute at the bar CLOSE on the signal bar — no look-ahead. Profit factor = gross gains ÷ gross losses; avg R = average win ÷ average loss; max drawdown = the deepest peak-to-trough fall in this curve.

The rule under test

sidelong · size 1 · +8% stop
enter whenclose > sma20
exit whenclose < sma20
promotion verdictOBSERVEcleared 4/6 gates · +0.00% under 2x downside

Trade ledger — every fill the rule made

#Entry barExit barHeldReturnWhy exit
121 @ 199.5022 @ 194.581 bars-2.47%rule
224 @ 197.9844 @ 219.0020 bars+10.62%rule
348 @ 224.8249 @ 220.811 bars-1.78%rule
463 @ 217.4698 @ 306.9335 bars+41.14%rule
5100 @ 324.27102 @ 304.902 bars-5.97%rule
6113 @ 309.45116 @ 295.863 bars-4.39%rule
7118 @ 301.21119 @ 292.901 bars-2.76%rule
8143 @ 251.08146 @ 239.493 bars-4.62%rule
9147 @ 242.67151 @ 236.424 bars-2.58%rule
10168 @ 244.96183 @ 244.0715 bars-0.36%rule
11218 @ 178.51228 @ 169.7410 bars-4.91%rule
12251 @ 157.62268 @ 170.8617 bars+8.40%rule
13269 @ 180.97276 @ 178.497 bars-1.37%rule
14307 @ 131.67310 @ 121.143 bars-8.00%stop
15320 @ 124.66359 @ 165.7139 bars+32.93%rule
16374 @ 159.09402 @ 206.5528 bars+29.83%rule
17404 @ 236.64437 @ 264.9533 bars+11.96%rule
18440 @ 270.02443 @ 271.043 bars+0.38%rule
19448 @ 272.26491 @ 408.2243 bars+49.94%rule
20492 @ 423.02514 @ 442.6922 bars+4.65%rule
21527 @ 469.67540 @ 455.7213 bars-2.97%rule
22556 @ 447.82557 @ 435.171 bars-2.82%rule
23558 @ 440.41567 @ 439.389 bars-0.23%rule
24579 @ 435.06598 @ 467.7019 bars+7.50%rule
25607 @ 480.88620 @ 475.6913 bars-1.08%rule
26622 @ 490.97653 @ 674.7231 bars+37.43%rule
27654 @ 785.38681 @ 894.5227 bars+13.90%rule
28688 @ 906.16689 @ 881.861 bars-2.68%rule
29699 @ 877.35702 @ 830.413 bars-5.35%rule
30703 @ 858.17729 @ 789.5226 bars-8.00%stop
31748 @ 131.38750 @ 127.402 bars-3.03%rule
32751 @ 129.24753 @ 126.362 bars-2.23%rule
33773 @ 116.14787 @ 108.0014 bars-7.01%rule
34794 @ 119.14796 @ 116.782 bars-1.98%rule
35799 @ 117.87800 @ 116.001 bars-1.59%rule
36801 @ 116.26829 @ 132.7628 bars+14.19%rule
37832 @ 139.91840 @ 141.988 bars+1.48%rule
38842 @ 147.01845 @ 141.953 bars-3.44%rule
39852 @ 145.14854 @ 142.442 bars-1.86%rule
40865 @ 139.67868 @ 137.013 bars-1.90%rule
41869 @ 137.49870 @ 134.291 bars-2.33%rule
42871 @ 138.31876 @ 135.915 bars-1.74%rule
43881 @ 137.71886 @ 126.695 bars-8.00%stop
44896 @ 133.57906 @ 126.6310 bars-5.20%rule
45907 @ 131.28908 @ 120.781 bars-8.00%stop
46925 @ 121.41927 @ 113.762 bars-6.30%rule
47937 @ 114.33938 @ 105.181 bars-8.00%stop
48939 @ 110.93942 @ 102.063 bars-8.00%stop
49947 @ 106.431027 @ 175.6480 bars+65.03%rule
501031 @ 179.811035 @ 174.184 bars-3.13%rule
511042 @ 177.331046 @ 174.884 bars-1.38%rule
521048 @ 176.241066 @ 180.0318 bars+2.15%rule
531074 @ 186.261083 @ 188.089 bars+0.98%rule
541085 @ 199.051088 @ 186.863 bars-6.12%rule
551104 @ 185.551107 @ 180.933 bars-2.49%rule
561113 @ 180.991129 @ 183.1416 bars+1.19%rule
571130 @ 187.051132 @ 178.072 bars-4.80%rule
581135 @ 187.671141 @ 185.616 bars-1.10%rule
591145 @ 185.411150 @ 182.815 bars-1.40%rule
601152 @ 187.981158 @ 184.896 bars-1.64%rule
611167 @ 186.031168 @ 183.141 bars-1.55%rule
621184 @ 177.641205 @ 196.5021 bars+10.62%rule
631206 @ 207.831220 @ 212.6014 bars+2.30%rule
641223 @ 224.361225 @ 214.752 bars-4.28%rule
651248 @ 204.121255 @ 202.817 bars-0.64%eod

Exit reasons: rule = the exit predicate fired; stop = the protective stop was hit; target = the take-profit was hit; eod = closed at the last bar. Bar index = position in the price path, not a calendar date.

This rule on NVDA returned +272.77% with a +63.92% worst drawdown and Sharpe 0.87; under a 2x downside shock it returns +0%. Verdict: observe.
Below, the agent explains each metric — what it measures, why it matters, and what your number suggests — so you can judge a strategy yourself before risking real money. This runs on synthetic/illustrative prices — your decisions, your risk.
What a backtest actually proves (and does not)
We replayed your rule bar-by-bar over NVDA and it made a total return of +272.77% across 65 trade(s).
A backtest replays your exact entry/exit rules over historical bars to see how they WOULD have done. It is a sanity check, not a promise: the future is not the past, and a rule that fits old data can fail live. That is why we also stress it and slice it by market regime before trusting it.
→ It was profitable in this sample — keep validating.
Risk-adjusted return — Sharpe, Sortino, Calmar
Sharpe 0.87, Sortino 1.27, Calmar 0.47.
Return alone is misleading — a strategy that doubles then halves is not "good." Sharpe divides return by total volatility (reward per unit of wiggle). Sortino is the same but only penalises DOWNSIDE wiggle (you do not mind upside surprises). Calmar divides annual return by the worst peak-to-trough drop. Higher is better; Sharpe ≥ 1 is the usual "worth a look" line.
→ Risk-adjusted return is below the usual bar — returns came with a lot of volatility.
The worst it got — max drawdown
The deepest peak-to-trough fall was +63.92%.
Max drawdown is the largest drop from a high-water mark to a later low. It is the question "how much pain would I have had to sit through?" — the number that actually makes people abandon a strategy at the worst moment. A high Sharpe with a 60% drawdown is usually un-tradeable in real life.
→ Drawdown was deep — could be hard to hold through.
Edge quality — hit-rate & profit factor
Hit-rate +30.77%, profit factor 2.15 (avg win +17.33% vs avg loss -3.59%).
Hit-rate is the share of trades that won. But winning often is not the same as making money — profit factor (gross profit ÷ gross loss) tells you whether your winners outweigh your losers. A 40% hit-rate with big wins and small losses beats a 70% hit-rate that gives it all back. Profit factor > 1 means the edge is net positive.
→ Winners comfortably outweigh losers.
Stress test — what 2x downside does
Under a 2x downside shock the same rule returns +0% (vs +272.77% unshocked).
We amplify every down-bar move and re-run the rule. It answers "if the bad days were twice as bad, does this strategy still survive?" A rule that only works in calm markets is a trap. Promotion sim→live requires surviving the shock, not just the base case.
→ Holds up under stress.
Promotion verdict: OBSERVE
Cleared 4/6 gates (score 0.67).
Sim-to-live promotion is the whole point: only rules that pass return, risk, drawdown, profit-factor, stress and across-regime checks get handed to the model foundry as a candidate. "Promote" = ship to live paper/real; "observe" = keep collecting data; "reject" = back to the drawing board.
→ Promising but not proven — keep it in sim.

Backtest glossary

Backtest
Replaying a fixed set of trading rules over historical prices to estimate how they would have performed.
Sharpe ratio
Annualised return divided by the volatility of returns — reward per unit of total risk.
Sortino ratio
Like Sharpe but only counts downside volatility in the denominator.
Calmar ratio
Annualised return divided by the maximum drawdown — reward per unit of worst-case pain.
Max drawdown
The largest drop from a peak in the equity curve to a subsequent trough.
Profit factor
Gross profit divided by gross loss; above 1 means the strategy is net profitable.
Exposure
The fraction of bars the strategy was actually in a position (capital at work).
Stress test
Re-running the strategy on a deliberately worse price path to see if it survives bad conditions.
Sim-to-live promotion
The gate that decides whether a paper-traded rule-set is trustworthy enough to run with real consequences.