Skip to content
All library documents

Backtesting Transaction Costs, Order Types, and OHLC Data

Article FMZ forum · Author: 善

Summary

This article explains how commissions, fees, taxes, slippage, latency, spreads, liquidity, and market impact can alter a strategy’s backtest results. It contrasts fixed transaction-cost assumptions with linear, piecewise linear, and quadratic models. Fixed costs are simple but do not reflect volatility or liquidity; more complex models can better represent nonlinear slippage and impact, at greater implementation and computing cost. Historical execution costs may improve estimates, especially for large or fast trading, but are difficult to model.

The article also compares market orders, which prioritize execution but can incur uncertain prices, with limit orders, which constrain price but may not fill. It warns that high-frequency simulations can look too favorable if market impact and order-book behavior are omitted. Daily OHLC data may contain outliers or tick errors, particularly in composite feeds, making strategies that depend on bar extremes less representative of live execution. The suggested remedies are higher-frequency data or exchange-specific data. These are general implementation cautions, not a quantified comparison or guarantee that a particular cost model will match live results.

Key ideas

  • Backtests should include commissions, fees, taxes, slippage, spreads, and market impact.
  • Fixed transaction-cost assumptions are easy to implement but miss liquidity and volatility effects.
  • More complex cost models can better capture nonlinear behavior, with added effort and computation.
  • Market orders and limit orders have different execution and fill tradeoffs that simulations should represent.
  • Composite daily OHLC data can contain outliers that distort strategies relying on bar extremes.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.