Backtest LabsGet started
ReturnSharpeMax drawdownTrades
Benchmarks, buy and hold
-50%0%+50%20222023202420252026+45.9%+34.8% hold
Total return
+45.9%
CAGR
+7.9%
Sharpe
0.37
Sortino
0.56
Max drawdown
-31.8%
Volatility
21.6%
Win rate
56.6%
Profit factor
1.19
Trades
274
Closed

Monte Carlo

1,000 resamples, TSLA

0%+100%+200%+46% actual+45% medianstart of tradeslast trade
5th percentile outcome
-30.5%
Actual +45.9%
Median outcome
+44.6%
Worst-case drawdown
-51.7%
About this test

What it shows. The strategy's closed trades were drawn at random, with replacement, thousands of times to build many possible equity paths from the same trades. The solid line is the actual path, the dashed line the median simulated path, and the shaded bands hold the middle 50%, 80% and 90% of simulated paths. The horizontal axis is how far through the trade sequence each point sits.

How to read it. Returns are measured from the starting capital. A wide band means the mix of trades drawn matters a lot to the outcome. An actual line that sits near the top of the band was a fortunate draw; one near the bottom was unlucky.

Trade Sequence

1,000 shuffles, TSLA

0%+50%+46% actual order+46% medianstart of tradeslast trade
Drawdown percentile
53rd
Actual -28.8%
Losing streak percentile
76th
Actual 7 in a row
Worst streak in shuffles
9 in a row
About this test

What it shows. The same closed trades were shuffled into thousands of different orders. The solid line is the actual order, the dashed line the median shuffled order, and the bands hold the middle 50%, 80% and 90% of shuffled paths. The horizontal axis is how far through the trade sequence each point sits.

How to read it. Returns are measured from the starting capital. If the actual line runs near the middle of the band, the order the trades happened in was ordinary. Near an edge, the order itself was a large part of the result.

Hold-Out

50/50 split, TSLA

0%+20%+40%+5% in-sample+39% out-of-samplestart of each partend of each part
Out-of-sample vs in-sample
729%
+38.7% vs +5.3%
Out-of-sample max drawdown
-22.5%
Out-of-sample Sharpe
0.61
In-sample 0.11
About this test

What it shows. The backtest is split in two and the strategy is run on each part by itself. In-sample is the first part, out-of-sample the second. Both curves are rebased to 100% at their own start and drawn over how far through their own part each point sits, so the two shapes overlay directly.

How to read it. Two curves that climb at a similar pace mean the strategy did about as well in the second part as in the first. An out-of-sample curve that flattens or falls while the in-sample curve climbs means it made its money in the first part and not the second.

Market Regime

TSLA

Low volatilityMedium volatilityHigh volatilityUptrend+27%37 trades, 54% won+61%37 trades, 62% won+107%41 trades, 68% wonDowntrend-32%48 trades, 71% won-32%52 trades, 46% won-18%59 trades, 44% won
Best regime
Uptrend
+61.3% per year
Worst regime
Downtrend
-27.5% per year
Trend spread
88.8% per year
About this test

What it shows. Each bar of the backtest was labeled by the market's trend (up or down) and volatility (low, medium or high). The grid shows the strategy's annualized return during bars that were in both a trend and a volatility regime at once, green for gains and red for losses.

How to read it. A strategy that makes money in every cell does not depend on one kind of market. A cell can hold most of the losses even when each regime looks fine on its own. A cell with too few bars shows no return.

Rolling Window

5 windows, TSLA

0%+100%2021-10 to 2023-062022-08 to 2024-042023-06 to 2025-022024-04 to 2025-122025-02 to 2026-10average +9%StrategyBuy and hold
Windows profitable
3 of 5
Worst window
-14.4%
Aug '22 - Apr '24
Windows beating the market
3 of 5
About this test

What it shows. The backtest was re-run over several overlapping windows that step through the period. The bars show each window's return beside an outlined bar for buying and holding the ticker over the same dates, with the dashed line at the average.

How to read it. Similar bar heights mean the strategy earned about the same whenever it ran; one tall bar means the total depends on a single stretch. A solid bar above its outlined bar beat the market in that window.

Cost Stress

TSLA

-20%0%+20%+40%1x+46%1.25x+36%1.5x+27%2x+11%2.5x-3%3x-15%breakeven 2.4x
Breakeven cost multiplier
2.4x
Elevated (2.0x-2.5x)
Net profit at 2x costs
+11.3%
Baseline +45.9%
Net profit at 3x costs
-15.1%
Baseline +45.9%
About this test

What it shows. The backtest was re-run with commissions and slippage multiplied up to three times their configured level. The line is net profit at each cost level.

How to read it. Where the profit line crosses zero is the breakeven cost multiplier. A line that falls slowly keeps most of its profit under higher costs.

Execution Robustness

TSLA

0.00.20.40.37Baseline0.14Both +1-0.04Both +20.05Both +30.19Entry +10.21Entry +20.23Entry +30.32Exit +10.07Exit +20.05Exit +3On timeDelayed fills
Sharpe at 1-bar delay
0.14
On time 0.37
Average delayed Sharpe
0.14
On time 0.37
Worst delay
-0.04
Both +2
About this test

What it shows. The backtest was re-run with entries, exits or both filled one, two and three bars after the signal, to imitate slow fills. The bars show the Sharpe ratio of each delayed run beside the on-time run.

How to read it. Bars close to the on-time bar mean the strategy handles a slow fill. A bar far below it means the trades depend on acting at the signal bar.

Parameter Sensitivity

TSLA

1.001.50configuredsetting loweredsetting raisedRSI (2) OverboughtRSI (1) OversoldMA (2) PeriodMA (1) Period
Profit Factor range
0.66 to 1.56
Baseline 1.19
Most sensitive setting
RSI (2) ยท Overbought
-0.53 at worst
Runs completed
24 of 24
24 unique runs
About this test

What it shows. A selected-parameter sensitivity: only the 4 settings the author chose were moved a little above and below their values, one at a time, and the backtest re-run; the strategy's other settings were not tested. The curves show the Profit Factor for each setting on its own at every value that was tested.

How to read it. Flat curves mean nearby settings work about as well, so the result is not tied to one exact number. A steep curve means small changes to that setting move the result a lot.

Walk Forward

10 cycles, 30% out of sample, TSLA

-50%0%+50%Cycle 1-33% WFECycle 2186% WFECycle 3644% WFECycle 4-65% WFECycle 5Cycle 6-17% WFECycle 7198% WFECycle 8111% WFECycle 912% WFECycle 10-5% WFEIn-sample, per yearOut-of-sample, per year
Walk-forward efficiency
46%
Battery failed
Out-of-sample return
+31.5%
Benchmark +49.1%
Out-of-sample max drawdown
-27.4%
About this test

What it shows. The backtest window was cut into consecutive cycles. In each cycle the selected settings were re-optimized on an in-sample stretch and the winner was then run on the out-of-sample stretch that follows. The bars show each cycle's in-sample return beside its out-of-sample return, both per year.

How to read it. Walk-forward efficiency is the out-of-sample return relative to the in-sample return; 50% or more is the common passing line. Small, steady gaps between each pair of bars mean the re-optimized settings kept working on data they were not tuned on.

Overfitting Detection

40 variants, 20% spread, TSLA

0%25%50%75%100%PBO 68% at the middle placebest out-of-sample rankworst of 40 variants
Probability of overfitting
68%
Probability of out-of-sample loss
54%
Deflated Sharpe ratio
33%
Sharpe 0.46
About this test

What it shows. Many variants of the strategy were built by moving every numeric setting together within a spread, then the pool was judged on every half and half split of the history. The chart shows how often the variant that won on one half finished at each place or worse when ranked on the other half.

How to read it. The probability of backtest overfitting (PBO) is the share of splits where the winner finished in the bottom half on the other half; lower is better, and it is marked where the chart crosses the middle place. The deflated Sharpe ratio is the probability that the configured settings beat zero Sharpe after allowing for how many variants were tried; higher is better.

RSI (1)

Period
5
Overbought
70
Oversold
30
Direction
Bullish
Trigger
Cross

Buy

Direction
Enter Long
Amount Type
% of Cash
% Value
100
Order Type
Market

RSI (2)

Period
5
Overbought
70
Oversold
30
Direction
Bearish
Trigger
Cross

Sell

Direction
Exit Long
Amount Type
% of Position
% Value
100
Order Type
Market

MA (1)

Type
Trend
Method
SMA
Period
9
Direction
Bullish

And

Stock Price

Price Source
Close
Lag / Shift
0

MA (2)

Type
Trend
Method
SMA
Period
50
Direction
Bearish

Crossover

Mode
Cross
Direction
Bearish

Or

Privacy Preferences

We use cookies and similar technologies to run Backtest Labs, understand how it's used, and measure our advertising. Choose which ones to allow below. You can change this at any time.

Necessary

Required for the site to work, such as signing in and keeping your account secure.


Analytics

Help us understand how visitors use Backtest Labs, such as which pages and features are used most, so we can improve it. This includes recordings of your sessions.

Advertising

Help us measure whether our ads led to a sign-up or subscription.