Learn how to model crypto trading fees, spreads, slippage, funding, and network costs so your backtest produces a more credible estimate of net strategy results.
Quick Answer
Model crypto trading fees when each cost is incurred, using the executed notional, order type, venue, position direction, and holding period. Include commissions, bid-ask spread, slippage, funding or borrowing charges, and any network costs required by the strategy. Then rerun the test under baseline and adverse assumptions. The main limitation is that future execution costs cannot be known precisely. Fee schedules, liquidity, funding rates, and market impact change, so a credible backtest should evaluate a plausible range rather than depend on one favorable estimate.
Key Takeaways
- Apply commissions to every fill, including entries, exits, partial closes, and position adjustments.
- Keep commissions, spread, slippage, funding, borrowing, and network charges as separate inputs.
- Match the model to the intended venue, instrument, order type, and holding period.
- Do not give passive limit orders both guaranteed fills and favorable maker fees.
- Test normal and stressed cost scenarios instead of relying on one fixed estimate.
- Judge the effect on net expectancy, drawdown, and stability—not gross returns alone.
Which Crypto Trading Fees Belong in a Backtest?
A useful model separates costs according to how and when they arise. Combining everything into one arbitrary percentage makes the results difficult to audit and can hide the strategy’s actual weakness.
| Cost | When it applies | Practical modeling method |
|---|---|---|
| Trading commission | Spot, futures, and perpetual orders | Apply the relevant rate to executed notional for each fill |
| Bid-ask spread | Trades that cross available liquidity | Use bid-ask data or a documented spread estimate |
| Slippage | When the expected and simulated fill prices differ | Vary by order type, size, liquidity, and volatility |
| Funding payment | Perpetual positions open at a funding event | Apply the relevant rate at each event |
| Borrowing charge | Margin positions and borrowed assets | Accrue over the actual holding period |
| Network cost | On-chain swaps, transfers, and bridging | Deduct gas and protocol charges when the action occurs |
| Conversion cost | Trades involving asset or quote-currency conversion | Apply conversion fees and spreads where required |
Commission is usually the simplest component. If a venue charges a percentage of notional, the basic formula is:
commission = absolute quantity × execution price × fee rate
Apply it to each fill rather than once per completed trade. A position opened in two fills and closed in three creates five commission events.
Spread is different from commission. A market buy generally executes near the ask, while a market sell executes near the bid. A candle-based test that uses the same price for both can silently assume midpoint execution that was unavailable.
Slippage is the difference between the expected order price and the simulated or realized fill. It tends to become less favorable when volatility rises, liquidity falls, or order size becomes large relative to available depth. Avoid deducting it twice if the execution model already incorporates bid-ask prices or market impact.
Funding also needs separate treatment. A perpetual position pays or receives funding only if it remains open at the relevant event. Its direction and magnitude can change. A constant annual estimate can distort strategies whose holding periods vary substantially.
A strategy laid out end to end in the Kvants editor.
A Step-by-Step Crypto Trading Fees Workflow
1. Define the instrument and venue
Specify whether the strategy trades spot, margin, dated futures, perpetual contracts, or on-chain assets. Record the intended venue because fee schedules, contract terms, funding rules, and liquidity differ.
Do not treat every market for the same token as interchangeable. A liquid spot pair and a thin perpetual contract can have very different execution characteristics.
2. Specify order behavior
Define whether each instruction is a market order, passive limit order, marketable limit order, stop, or another order type. This affects both execution and the applicable maker or taker classification.
A limit order should not automatically receive a maker fee. A marketable limit order can execute immediately as a taker, while a passive order might fill partially or not at all.
3. Build an explicit commission schedule
Create assumptions for each venue, instrument, order category, and relevant fee tier. Note the date and source used for the assumption because schedules can change.
If the trader’s future fee tier is uncertain, test multiple tiers. Do not make the baseline dependent on a discount that may not apply.
4. Add spread and slippage
Use historical bid-ask data when it is available and suitable for the strategy’s time horizon. When only candle data is available, use a transparent approximation and document its limitations.
At minimum, define ordinary and stressed execution conditions. A more detailed model can vary slippage with volatility, trade size, participation rate, or observed liquidity.
5. Apply holding costs at the correct events
For perpetuals, determine whether each position crosses a funding timestamp and apply the corresponding rate. For margin positions, accrue borrowing charges over the actual holding period.
Two trades with identical entry and exit prices can therefore produce different net results if only one crosses a funding event.
6. Include on-chain costs only when required
Gas, swap, and bridge charges belong in the test when the strategy requires those transactions. Do not add network gas to an exchange trade that never moves assets on-chain. Conversely, do not omit it from a strategy that rebalances through decentralized protocols.
On-chain execution can also involve price impact, failed transactions, and changing gas conditions. A simple fixed estimate is incomplete, but it is more defensible than assuming free execution.
7. Run sensitivity tests
Test at least three coherent scenarios:
- Favorable: lower costs without assuming impossible execution.
- Baseline: assumptions considered plausible for the intended venue and process.
- Adverse: wider spreads, worse slippage, higher funding, or increased network costs.
Change assumptions systematically rather than adjusting them until the result looks acceptable. The objective is to find where the conclusion becomes fragile.
8. Recalculate strategy-level metrics
Review net expectancy, profit factor, maximum drawdown, turnover, and results across market conditions. A strategy with frequent trades can be highly sensitive to small per-fill errors because those errors compound through repetition.
Inspect the distribution as well as the total. Costs may affect certain assets, sessions, volatility regimes, or holding periods more severely than others.
A backtest's equity curve and trade-by-trade log.
Worked Example: From Gross to Net P&L
Consider a hypothetical perpetual trade with these assumptions:
- Entry notional: $10,000
- Exit notional: $10,120
- Gross price-based gain: $120
- Entry commission: 0.06% of entry notional
- Exit commission: 0.06% of exit notional
- Combined spread and slippage impact: $8
- Funding paid while the position is open: $4
The commissions are:
- Entry:
$10,000 × 0.0006 = $6.00 - Exit:
$10,120 × 0.0006 = $6.07
The estimated net result is:
$120 − $6.00 − $6.07 − $8 − $4 = $95.93
These figures are illustrative and do not represent a particular exchange. The important feature is the structure: gross P&L is adjusted for costs attached to both fills, execution, and the holding period.
If the strategy has only a small average gross edge, a plausible increase in slippage could move net expectancy below zero. That does not necessarily invalidate the signal itself. It may show that the chosen market, order type, trade frequency, or execution process is incompatible with the signal.
Common Crypto Cost-Modeling Failure Modes
Charging only one side of the trade
Opening and closing transactions can both incur fees. Scaling in, reducing exposure, and using partial exits create additional fee events.
Treating every limit order as a maker fill
This grants the strategy a favorable fee and guaranteed execution. Passive orders can remain unfilled, fill partially, or execute after the market moves adversely.
Using current fees for an entire historical period
Today’s schedule may not describe earlier market conditions. When historical schedules are unavailable, disclose the approximation and test reasonable alternatives.
Averaging away funding risk
A long-term average can hide clusters of unusually unfavorable funding. Event-level historical data is preferable for leveraged positions held across multiple funding periods.
Ignoring missed and partial fills
A complete execution model must consider whether a signal becomes a full position. Liquidity constraints, order expiration, and partial execution can change both exposure and cost.
Reviewing only total fees
Two strategies can incur the same total cost but have different vulnerabilities. One may be weakened by frequent commissions, while another is exposed to occasional severe slippage. Separate components make those risks visible.
Deploying a strategy to paper or live with a pre-flight gate.
Testing Cost Assumptions in Kvants
In Kvants Studio, traders can turn plain-English crypto strategy ideas into editable, auditable logic. Execution assumptions should be stated explicitly, including the instrument, order behavior, commission basis, slippage treatment, and relevant holding costs.
Kvants backtests run on NautilusTrader’s event-driven engine. Event-driven testing is useful when the sequence of orders, fills, exits, and other events changes the result. Parameter sweeps can compare defined assumptions, while walk-forward and crisis-stress validation can test whether conclusions persist beyond the initial development sample.
The goal is not to search for the cost input that creates the strongest equity curve. It is to identify how sensitive the strategy is to plausible execution conditions. Additional workflows are available on the Kvants blog, with platform guidance in the documentation.
Frequently Asked Questions
Should crypto trading fees be calculated on profit or notional?
Trading commissions are commonly calculated from executed notional rather than profit. Apply the relevant rate to each fill after checking the venue’s rules. Funding, borrowing, gas, and other charges use separate calculations.
How should maker and taker fees be modeled?
Connect the fee category to simulated order behavior. Use taker fees when an order crosses available liquidity. Apply maker treatment only when an order rests and fills under qualifying conditions. Test both cases if the data cannot establish the distinction.
Do spot crypto backtests need funding costs?
Ordinary unleveraged spot positions do not incur perpetual funding. They can still incur commissions, spread, slippage, conversion charges, withdrawal fees, or network costs. Margin-based spot positions may also incur borrowing charges.
What is a reasonable crypto slippage assumption?
There is no universal percentage. Slippage depends on the asset, venue, order size, order type, volatility, and available liquidity. Estimate it from relevant data when possible and test both baseline and adverse conditions.
When is a strategy too sensitive to fees?
Sensitivity is concerning when a small, plausible cost increase removes most of the net expectancy, materially increases drawdown, or makes the result dependent on unrealistic maker fills. Treat that as a robustness warning rather than relying on a universal threshold.
Risk Note
This article is educational and is not investment advice. Crypto trading can involve substantial loss, leverage, liquidity constraints, changing fee schedules, and uncertain execution. Backtested performance does not guarantee future results. Kvants is a research tool, not an investment adviser, and no model can fully reproduce future market or execution conditions.