# Transaction cost analysis (TCA)

Transaction cost analysis (TCA) is the measurement or estimation of a trade’s execution costs against a defined price benchmark, including effects such as spread, market impact and fees.

## What it means

A quoted stock price is not necessarily the price at which an entire order can be filled. Transaction cost analysis (TCA) compares execution with a stated reference price and expresses the difference in money or basis points. It can be done **before a trade**, using estimates, or **after a trade**, using actual fills.

The benchmark matters. An arrival price captures the price when an order decision is recorded; a midpoint benchmark uses the middle of the quoted bid and ask at a specified time. Different benchmarks answer different questions and can produce different cost figures for the same fills.

TCA may examine spread, market impact, commissions and other fees. A broader measure, implementation shortfall, can also account for shares that were not filled. State what is included before comparing results.

## How it is calculated

For a fully filled stock order, one simple signed, benchmark-relative measure is:

`Cost (US$) = s × Q × (P_fill − P_ref) + F`

- `s` is `+1` for a buy and `−1` for a sell; it has no units.
- `Q` is the number of shares filled.
- `P_fill` is the share-weighted average fill price, in US$ per share.
- `P_ref` is the benchmark price, in US$ per share, observed at the specified time.
- `F` is included commissions and fees, in US$.

A positive result is a cost relative to the benchmark; a negative result is a saving. To express it in basis points, use `Cost (bps) = Cost (US$) ÷ (Q × P_ref) × 10,000`, where `Q × P_ref` is the order’s benchmark value in US$ and one basis point equals 0.01%.

This formula gives an **all-in benchmark difference** when fees are included. It does not, by itself, separate spread from market impact or isolate a price move that would have happened without the order. Partial fills require an explicit treatment of unfilled shares.

## Worked example

Suppose, hypothetically, an investor buys 100 shares. The recorded arrival price is US$50.00 per share, the share-weighted average fill price is US$50.10, and included fees are US$1.00.

1. Price difference: US$50.10 − US$50.00 = US$0.10 per share.
2. Difference across 100 shares: 100 × US$0.10 = US$10.00.
3. Add fees: US$10.00 + US$1.00 = **US$11.00** of cost against the arrival-price benchmark.
4. Benchmark value: 100 × US$50.00 = US$5,000. Cost in basis points: US$11.00 ÷ US$5,000 × 10,000 = **22 bps**, or 0.22%.

These are illustrative fills, not an estimate for any real stock. Using another benchmark could change the measured cost.

## Why it matters before you trade

Pre-trade TCA asks what execution might cost under stated assumptions, rather than treating the last traded price as a guaranteed fill. Order size relative to daily volume, estimated spread, volatility and expected market impact can all affect that assessment. The estimate helps make execution conditions and cost assumptions explicit; actual costs remain uncertain until execution.

Post-trade TCA instead uses recorded fills to compare what happened with the chosen benchmark. Keeping estimated and realized costs separate makes it possible to inspect differences without treating a pre-trade estimate as a promise.

## How PreTrAIde uses it

PreTrAIde performs **pre-trade analysis** on a user-built stock basket before any order is placed. Its deterministic quantitative layer estimates bid-ask spread, participation in daily volume and market impact using an Almgren-Chriss-style model, alongside other risk and execution measures. It produces execution scores and returns a GO, NO-GO or MODIFY verdict with a suggested execution strategy and plain-language reasoning for the basket and each line.

Those inputs relate to **estimated** transaction costs; they are not a report of achieved fills. PreTrAIde does not receive, transmit or execute orders. Its verdicts support the user’s decision and are not trade recommendations.

## Common mistakes

- **Omitting the benchmark or its timestamp:** a cost figure is ambiguous without both.
- **Mixing estimates with actual fills:** pre-trade and post-trade TCA use different information.
- **Counting the same cost twice:** an all-in fill-versus-benchmark difference may already reflect spread and impact; adding separate estimates can double-count them.
- **Ignoring unfilled shares:** a filled-shares-only formula does not capture the full effect of a partial fill.
- **Comparing unlike figures:** check whether each result includes fees and uses the same benchmark and units.

---
Source: https://pretraide.com/glossary/transaction-cost-analysis
