Sample backtest report
What happens the day after a breakout?
If today closes above yesterday’s high, what remains after costs when we buy at the next open and sell at that close?
Illustrative simulation only. Prices are independently generated and fictional. These figures do not represent historical market prices or actual trading performance.
Fictional dates: 2030-01-01 — 2030-03-01 · 60 days
View delivery files · Discuss a backtest
- Net P&L
- -11.43 demo units
- Profitable trades
- 5 / 14
- Worst trade
- -2.73 demo units
Execution assumptions
Evaluate only after the daily close. For each signal, buy one unit of the fictional asset at the next open and exit the entire position at that day’s close. Size is fixed, with no compounding or shorting. Use only candles inside the sample and skip signals without a next candle.
Assume 0.05% adverse slippage on each fill: buy above the open and sell below the close. Fees are 0.10% of each filled notional. Net P&L = 1 × (sell price − buy price) − both fees. Taxes excluded.
The effect of costs
Gross P&L after slippage -8.70 demo units − fees 2.73 demo units = -11.43 demo units.
Compare fees and net P&L in the ledger to see how costs affect each trade. This fictional series cannot establish profitability in a real market.
Complete trade ledger
Prices, fees and P&L are in fictional units. Display rounded to two decimals; totals use the higher precision ledger.
Delivery files
Download the report, data and code (ZIP)
Extract the ZIP. In that folder run python3 replay.py to regenerate prices.csv and trades.csv using only the standard library.
Data generation: start at 100 fictional units and generate daily price changes using a pseudorandom sequence with fixed seed 1741. No external market data is used.
Test your own rule
Describe one entry or exit condition you would like to test. You can leave the market, period or fees open for discussion.
Discuss a backtest like this →