Strategy testingStrategy backtesting: fees, drawdown and validation
What a backtest measures, which costs to include and why an attractive equity curve is not enough.
Follow a 4 USDT reference gain down to 0.996 USDT after fill adjustments and fees.

A trading bot's result should include the cost of entering and exiting each position. Start with actual simulated fill prices, subtract the fees charged on those fills, and add any holding costs that apply. Keep a separate gross result so you can see how much of the apparent advantage disappears after trading costs.
Do this before adding another indicator. A strategy that repeatedly aims for a small price move can look attractive when transactions are free and fail under an ordinary cost assumption. The first useful test is one invented trade that you can reconcile by hand.
A fee is a charge by the venue. Its amount can depend on the instrument, account tier and whether an order adds or removes liquidity. Use the schedule for your account and trade date; a rate in someone else's tutorial is not your rate.
The spread is the distance between the best bid and ask. Slippage is a difference between a declared reference price and the actual fill. Define that reference before measuring it. A candle close, midpoint and executable quote are not interchangeable.
Avoid double counting. If your entry already uses the ask and your exit uses the bid, their difference already captures that quoted spread. If fill prices also incorporate an adverse adjustment, do not subtract the same adjustment again as a separate cash cost.
Suppose a fictional bot buys 10 units. The reference entry is 100 USDT, but the simulated fill is 100.05. The reference exit is 100.40, while the fill is 100.35. Assume a teaching fee of 0.10% on each fill, paid in quote currency. These are invented prices and rates, not a current exchange offer.
At the reference prices, gross profit is 10 × (100.40 − 100) = 4 USDT. At the fills, it is 10 × (100.35 − 100.05) = 3 USDT. Entry notional is 1,000.50; exit notional is 1,003.50. Fees are 1.0005 and 1.0035 USDT, totaling 2.004 USDT.
Net profit is therefore 3 − 2.004 = 0.996 USDT. Total drag against the reference result is 3.004 USDT. That consumes 75.1% of the apparent 4 USDT edge. No additional spread charge belongs in this example: the stated fill adjustment already represents the modeled price disadvantage.
Work backward from the move your strategy tries to capture. In the example, increasing adverse entry and exit adjustments from 0.05 to 0.10 USDT leaves only 2 USDT of fill-price profit. The same fee assumptions produce 2.004 USDT of fees, so net profit becomes −0.004 USDT.
This is sensitivity analysis, not a prediction of future fills. Try a baseline, a wider-spread scenario and a delayed-exit scenario. Label how each changes prices or charges. Report results per trade and for the whole period, because changing turnover changes the total cost burden.
Subscription and infrastructure charges belong in a separate period-level view. A 30 USDT monthly tool cost divided by 60 completed trades is 0.50 USDT per trade for attribution. It is not an exchange fee, and that allocated amount changes when the trade count changes.
TradingView lets strategies specify commission and slippage, but its slippage setting uses ticks. Convert ticks using the instrument's minimum price increment; do not enter a percentage as though the units matched. Other engines have their own conventions.
A limit order does not automatically mean a maker fee or a guaranteed fill. A marketable limit order can remove liquidity. A resting order may remain unfilled even when a candle touches its price. Record the simulator's fill rule instead of assuming the most favorable interpretation.
For derivatives, check funding and borrowing separately where relevant. A spot example does not validate a perpetual-futures cost model. Our backtesting guide explains how costs fit into a broader historical test.
Clerix's proposed workflow connects strategy rules, Backtest, Paper and analysis. Its public examples do not execute orders; testing engines and live execution remain in development. Review Clerix features with a reconciled sample trade so you can ask which cost inputs a currently available workflow supports.
No. It is an example here. Check your venue, account, market and date. If the rate is uncertain, show several explicit scenarios rather than silently choosing the cheapest.
You can limit an acceptable execution price, but may receive no fill or only part of the quantity. Model that trade-off instead of assigning a perfect fill.
Investigate whether the stress assumption fits the intended market and size. Failure is a reason to reconsider the hypothesis or execution requirements, not to hide that scenario.