# Transaction costs

Transaction costs are the explicit fees and implicit trading costs incurred when executing a trade, including commissions, the bid-ask spread and market impact.

## What it means

A stock trade can cost more than a broker’s stated fee. The price available when an order executes may differ from the price used to value the shares before trading. Together, fees and execution-related price differences determine the cost of putting a trade into effect.

**Explicit costs** are charges such as broker commissions and applicable exchange or regulatory fees. **Implicit costs** include paying across the bid-ask spread, market impact from the order itself and price changes while an order waits to fill. Which items belong in a reported total depends on the measurement method and its reference price.

Transaction costs are distinct from a stock’s subsequent gain or loss. A trade can have a measurable execution cost even if the stock later rises, falls or stays flat.

## How it is calculated

For an executed stock order, one useful measure compares the average fill price with a benchmark recorded immediately before execution:

`Total transaction cost (US$) = signed shares × (average fill price − benchmark price) + explicit fees`

- **Signed shares** is the executed quantity: positive for a buy and negative for a sell. Its unit is shares.
- **Average fill price** is the share-weighted average price actually paid or received, in US$ per share.
- **Benchmark price** is a chosen reference, such as the midpoint of the best bid and ask just before execution, in US$ per share.
- **Explicit fees** are the applicable charges for the executed order, in US$. They can be zero.

Multiplying shares by US$ per share gives US$. For a buy, a fill above the benchmark is a positive cost; for a sell, a fill below it is a positive cost. A favorable fill can make the price-difference component negative. An estimate before trading substitutes an estimated fill price and estimated fees for values not yet known.

This benchmark-based measure combines effects rather than independently measuring spread, market impact and price movement. Adding separate estimates for those effects *on top of* an observed fill-to-benchmark difference can double-count them. Other measures, including implementation shortfall, use different benchmarks and may account for unfilled shares.

## Worked example

Suppose a hypothetical investor plans to buy 100 shares. Immediately before the order, the bid is US$49.90 and the ask is US$50.10. The midpoint benchmark is `(US$49.90 + US$50.10) ÷ 2 = US$50.00` per share.

1. **Record the fill:** All 100 shares execute at US$50.10 per share.
2. **Calculate the price difference:** `US$50.10 − US$50.00 = US$0.10` per share.
3. **Calculate the implicit cost against the midpoint:** `100 shares × US$0.10 per share = US$10`.
4. **Add fees:** With a hypothetical US$2 commission and no other fees, total measured cost is `US$10 + US$2 = US$12`.

The quoted spread was US$0.20 per share, but the buyer’s cost relative to the midpoint was half the spread: US$0.10 per share. The example assumes an immediate, complete fill at the ask. It does not separately establish how much market impact, if any, occurred.

## Why it matters before you trade

Costs reduce the proceeds of a sale or increase the effective purchase outlay. Their US$ amount also depends on order size: a small per-share difference becomes larger across many shares. For thinly traded stocks, a quoted price may not be available for the entire intended quantity, so a single displayed spread may understate the eventual cost.

A pre-trade check can examine the quoted or estimated spread, order size relative to typical daily volume, possible market impact, execution conditions and fees. These are estimates, not the final cost: available liquidity, prices and fills can change before or during execution. Comparing costs requires the same benchmark and the same treatment of fees and unfilled shares.

## How PreTrAIde uses it

PreTrAIde provides **pre-trade analysis** for a user-built stock basket before any order is placed. Its quantitative layer estimates bid-ask spread using a liquidity-tier model with a volatility uplift and a one-tick floor. It also estimates participation in daily volume and market impact using an Almgren-Chriss-style model. Those estimates inform its execution-related analysis and suggested execution strategy.

PreTrAIde’s free trading cost calculator covers spread plus market impact. Its trading-cost-by-stock pages show estimated spread and market impact for US$1,000, US$10,000 and US$100,000 orders. These estimates are not a quote for a particular fill or a complete accounting of every broker fee. PreTrAIde does not execute orders; users trade through their own broker. Its verdicts are decision support, not recommendations.

## Common mistakes

- **Counting only commissions.** A zero-commission trade can still incur spread and market-impact costs.
- **Charging the full spread to one immediate trade.** Relative to the midpoint, buying at the ask or selling at the bid initially costs half the quoted spread, assuming the displayed prices are available for the full quantity.
- **Adding overlapping cost measures.** A fill-to-benchmark difference may already capture spread and other price effects.
- **Treating an estimate as a fill.** Actual transaction costs depend on the executed quantity, price, fees and chosen benchmark.

---
Source: https://pretraide.com/glossary/transaction-costs
