Moving-average cross lost money.
After costs on BTCUSDT 15m: −62.35% in-sample, −18.46% out-of-sample.
Equity, day by day
After fees and slippage
Total return, in-sample
−62.35%
Clear loss: t is −2.95 over 572 trades.
Total return, out-of-sample
−18.46%
Cannot be told apart from zero: t is −0.68 over 263 trades.
| Sample | Trades | Win rate | Average R | t-statistic | Total return | Max drawdown |
|---|---|---|---|---|---|---|
| In-sample 2025-11-18 to 2026-07-30 | 572 | 20.80% | −0.31 | −2.95 | −62.35% | 63.33% |
| Out-of-sample 2026-07-31 to 2026-11-18 | 263 | 19.01% | −0.05 | −0.68 | −18.46% | 31.18% |
Computed by perpmath 0.1.0 on 2026-11-18 11:40 UTC. A backtest is arithmetic on past prices, not a forecast.
Win rate, drawn to scale
A win is a trade with a profit after costs.
The averages
Fast is the simple average of the last 20 closes. Slow, of the last 50.
The cross
Fast crosses above slow: close any short, go long. Fast crosses below slow: close any long, go short.
The stop
Long: the signal bar’s close minus 2 × ATR. Short: the close plus the same. ATR is averaged over 14 bars.
No target
No profit target. A position ends at the opposite cross or the stop. After a stop it waits, flat, for the next cross.
Fixed parameters
- Fast average, in bars
fast_period - 20
- Slow average, in bars
slow_period - 50
- ATR length, in bars
atr_period - 14
- Stop distance, in ATR
stop_atr_mult - 2
Set before the first run on real data. Not adjusted since.
Costs
- Fee
- 0.055% per side
- Slippage
- 0.02% per fill, against you
- Position size
- 100% of equity
- Starting capital
- 10,000
Fee: Bybit’s base taker rate, so check the current table. Slippage: an assumption, not a measurement.
Fills
- Decision
- Bar close
- Fill
- Next bar open
- Stop and target in one bar
- Stop first
- Look-ahead check
- Passed, 9 shortened runs
What is not modelled
- Funding payments.
- Leverage, margin and liquidation.
- Maker fees, partial fills, latency, order-book depth and market impact.
- The order of events inside a bar, beyond stop-first.
Data
- Market
- BTCUSDT, 15m bars, Bybit public data
- First bar
- 2025-11-18 11:30 UTC
- Last bar
- 2026-11-18 11:15 UTC
- Bars
- 35,040, 0 missing
- Out-of-sample from
- 2026-07-31 00:00 UTC
- Data file SHA-256
- ac4acc429d7f33dd10e480195bce85f5639714b5d46869499b4275666f9fa037
- Result file SHA-256
- 13c4163eb9c20bf25c917704ed3e251fd13585384a79fd676aed0924e59af84b
Run it yourself
perpmath download BTCUSDT 15m --start 2025-11-18T11:30:00Z --end 2026-11-18T11:30:00Z perpmath backtest ma_cross --symbol BTCUSDT --interval 15m --config configs/ma_cross.json --out results/ma-cross-btcusdt.json