---
title: "Transaction-Cost Analysis"
book: "Microstructure and Execution"
subject: quant
language: en
chapter: 19
exercises: 8
source: https://one-course.com/books/quant/10/en/chapter/19-transaction-cost-analysis
---

# Chapter 19 — Transaction-Cost Analysis

A portfolio manager’s order cost 25 basis points against the arrival price; the broker’s report says it beat VWAP by three. Both numbers are right, and only one of them says what the order cost the fund. Transaction-cost analysis (One Quant Book 7, chapter 23) is the discipline of choosing the number that answers the question asked, of explaining it, and of comparing orders that were not equally hard. This chapter builds a simulated order log in which every order was worked by two algorithms, so that the true difference between them is known, and then analyses the log a desk would actually have, in which each order saw only one.

## 19.1 Benchmarks and what each hides

**Definition 19.1 (Execution benchmark).**

An *execution benchmark* is the reference price an execution is measured against: the decision or arrival price (implementation shortfall), the volume-weighted price over the order’s interval or the day, the close. The slippage against it is the average execution price minus the benchmark, signed so that a positive number is a cost.

The simulated log has 100 days of `firm.agentmkt` on `firm.exchsim`, each 18 minutes long, with a volatility regime (the hidden value jumping 0.1, 0.2 or 0.4 times a second) and an activity level (0.7, 1 or 1.4 times the base flow) drawn per day. Each day carries two [parent orders](https://one-course.com/books/quant/10/en/chapter/14-the-almgrenchriss-framework#def-mx-the-almgren-chriss-framework-parent), a buy or a sell of 2 000 to 12 000 shares (2% to 24% of the volume over their window), decided 30 seconds before they start, worked over five minutes in ten 30-second slices, with a limit 20 ticks from the arrival price. Two algorithms (chapter 16’s schedules on chapter 17’s executor) work them:

- *patient* : equal slices, each resting at the best quote and repriced, with a [clean-up trade](https://one-course.com/books/quant/10/en/chapter/17-child-order-placement#def-mx-child-order-placement-risk) at the slice’s end;
- *urgent* : an Almgren–Chriss schedule front-loaded with $\kappa T=3$ (chapter 14), every slice crossed at once.

Every order is worked by both, and the day is also run without it, all with the same exogenous order flow (chapter 11’s counterfactual). Prices are in ticks: a tick is a cent on a USD 100 stock, about a basis point.

| algorithm | vs arrival | vs interval VWAP | vs day VWAP | vs close |
| --- | --- | --- | --- | --- |
| patient | 2.42 | $-0.29$ | 1.90 | 2.51 |
| urgent | 3.66 | 1.40 | 3.39 | 4.10 |

***Table 19.1.** Average slippage per filled share (ticks) of the 200 simulated orders under each algorithm, against four benchmarks. Data: `mx_tca.study`.*

The patient algorithm “beats” the interval VWAP by 0.29 ticks while costing 2.42 against the arrival price: the VWAP over its own window includes its own trades and the price they pushed, so it moves with the order. Against the day’s VWAP or the close, both algorithms look better or worse depending on what the rest of the day did. Only the arrival price, or the decision price before it, is fixed before the order touches the market. Perold (1988) set the paper portfolio, traded at the decision price, against the real one: the implementation shortfall.

## 19.2 Pre-trade estimates

**Definition 19.2 (Pre-trade cost estimate).**

A *pre-trade cost estimate* is the expected cost of an order computed before it is sent, from its size, the stock’s volume, volatility and spread, and a model of impact; it prices the decision to trade and sets the yardstick for the result.

The square-root law (One Quant Book 7, chapter 27, and chapter 11) gives the model: a half-spread plus $\eta\,\sigma\sqrt{Q/V}$, with $\sigma$ the price’s volatility over the order’s horizon and $Q/V$ its participation. The desk estimates $\sigma$ for each volatility regime from its days without orders (7.6, 10.0 and 11.5 ticks over five minutes) and fits $\eta$ on the patient algorithm’s orders of the first 50 days (with $-0.5$ tick, the half-spread it earns, as the intercept): $\eta=1.04$ with a standard error of 0.18 (`firm_tca.fit_pretrade`, on Book 7’s `firm.tcost`). On the next 50 days the model predicts 2.47 ticks a share on average and the orders cost 2.73 (standard error 0.52): right on average, but the correlation between prediction and outcome across orders is only 0.25 ([Figure 19.1](#fig-mx-transaction-cost-analysis-calibration)). A single order’s cost is mostly the price’s own move; a pre-trade model is a statement about averages.

![The pre-trade model out of sample: the patient algorithm’s orders of the last 50 days in five groups by predicted cost, their mean realised cost against arrival and its standard error. Data: mx_tca.study.](https://one-course.com/images/onecourse/chapters/quant-10/mx-transaction-cost-analysis/fig-7b7ba2b4934f.svg)

***Figure 19.1.** The pre-trade model out of sample: the patient algorithm’s orders of the last 50 days in five groups by predicted cost, their mean realised cost against arrival and its standard error. Data: `mx_tca.study`.*

## 19.3 Post-trade attribution

**Definition 19.3 (Slippage attribution).**

*Slippage attribution* splits an order’s implementation shortfall into parts that add up to it: the delay before the order reaches the market, the spread paid or earned on each fill, the impact (the price’s move caused by the order), the timing (the price’s move it did not cause), the opportunity cost of what was not filled, and fees.

With a decision price $d$, arrival $a$, fills $q_i$ at $p_i$ when the mid was $m_i$ (just before the fill) and would have been $\tilde m_i$ without the order, target $X$ and final mid $e$, the shortfall of a buy is

$$
\underbrace{\textstyle\sum q_i(a-d)}_{\text{delay}}+\underbrace{\textstyle\sum q_i(p_i-m_i)}_{\text{spread}}+\underbrace{\textstyle\sum q_i(m_i-\tilde m_i-(a-\tilde a))}_{\text{impact}}+\underbrace{\textstyle\sum q_i(\tilde m_i-\tilde a)}_{\text{timing}}+\underbrace{(X-\textstyle\sum q_i)(e-d)}_{\text{opportunity}}+\text{fees},
$$

which is Perold’s delay, execution, opportunity and fees (`firm_markout.shortfall`) with the execution split in three. Real TCA does not see $\tilde m$; it splits impact from timing with a model or with the market’s move. The simulator sees it, which is what makes the split below exact.

```python
    f = np.asarray(fills, float).reshape(-1, 4)
    t, px, q, fee = f[:, 0], f[:, 1], f[:, 2], f[:, 3]
    m = ref_at(mid[0], mid[1], t - 1e-9)                 # the mid just before each fill
    cf = ref_at(cf_mid[0], cf_mid[1], t - 1e-9)
    cf0 = float(ref_at(cf_mid[0], cf_mid[1], [t_arrival])[0])
    own0 = arrival - cf0                     # what earlier orders did to the arrival mid
    out = {"delay": side * q.sum() * (arrival - decision),
           "spread": side * float(q @ (px - m)),
           "impact": side * float(q @ (m - cf - own0)),
           "timing": side * float(q @ (cf - cf0)),
           "opportunity": side * (target - q.sum()) * (end - decision),
           "fees": float(q @ fee)}
    ref = shortfall(side, target, decision, arrival, np.c_[px, q], end, 0.0)
    out = {k: v / target for k, v in out.items()}
    out["total"] = sum(out.values())
    out["check"] = (ref["total"] + float(q @ fee)) / target - out["total"]
    out["filled"] = float(q.sum() / target)
```

***Listing 19.1.** Attribution of a parent order’s implementation shortfall, per share of its target: the mid before each fill against the fill price (spread), against the mid the same market had without the order (impact), and that mid’s own move (timing). code/firm/tca/firm_tca.py*

![Attribution of the implementation shortfall of the 200 orders under each algorithm: the parts add up to the total exactly. Data: mx_tca.study.](https://one-course.com/images/onecourse/chapters/quant-10/mx-transaction-cost-analysis/fig-d633ceaa61fa.svg)

***Figure 19.2.** Attribution of the implementation shortfall of the 200 orders under each algorithm: the parts add up to the total exactly. Data: `mx_tca.study`.*

The two algorithms spend differently ([Figure 19.2](#fig-mx-transaction-cost-analysis-attribution)). The patient one earns 0.65 ticks of spread and pays 2.41 of impact: resting a large order at the best quote for five minutes holds the price on its side. The urgent one pays 2.43 of spread, which includes walking the book on its large early slices, and 1.13 of impact. Timing averages near zero (0.59 and $-0.07$), as it should with random sides; opportunity is small (99.5% and 98.0% filled within the limit); fees are a rebate for the patient algorithm ($-0.20$) and a charge for the urgent one (0.29). In total, 1.90 against 3.79 ticks per share, with standard deviations of 5.98 and 4.60: the urgent algorithm costs more and varies less.

**Definition 19.4 (Post-trade reversion).**

*Post-trade reversion* is the move of the price after an order’s last fill, signed against the order: a price that gives back the order’s push (negative) shows temporary impact; a price that keeps going shows that the order carried information or that it leaked (chapter 9).

Two minutes after the last fill the price has given back 3.51 ticks for the patient algorithm and 1.06 for the urgent one (1.37 and 0.07 after 30 seconds). The patient algorithm’s last fills are often its [clean-up trades](https://one-course.com/books/quant/10/en/chapter/17-child-order-placement#def-mx-child-order-placement-risk), which push the price at the end of the window; the urgent algorithm’s last slices are small. No simulated order carries information, so no price keeps going; in real logs, a continuation after completion is the leakage signal.

## 19.4 Comparing across orders, brokers and peers

Which algorithm is cheaper? In the full log the answer is known: working every order with both, the urgent algorithm costs 1.89 ticks a share more, with a standard error of 0.25 clustered by day. The desk’s log is different. Its routing gave the urgent algorithm large orders on volatile days more often (53.5% of orders went to it, averaging 7 039 shares against 4 126 for the patient one), so the raw difference in its log is 3.36 ticks (standard error 0.76): hard orders made the urgent algorithm look worse than it is.

**Definition 19.5 (Peer-universe comparison).**

A *peer-universe comparison* measures an execution’s cost against that of comparable orders from other traders, brokers or funds, after adjusting for how hard each order was (size against volume, volatility, spread, [urgency](https://one-course.com/books/quant/10/en/chapter/14-the-almgrenchriss-framework#def-mx-the-almgren-chriss-framework-urgency)), usually as the residual of a cost model fitted on the universe.

Adjusting means regressing the cost on the algorithm and on the order’s difficulty (the regime’s volatility, the participation, the square-root term and its interaction with the algorithm), with standard errors clustered by day because the two orders of a day share its market (clustered errors are One Quant Book 4, chapter 16’s); `firm_tca.adjusted_difference` returns both the raw and the adjusted coefficient.

```python
def assigned(r: dict) -> bool:
    """The desk's routing: the urgent algorithm gets more large or volatile orders."""
    z = (math.log(r["qty"]) - math.log(5000)) / 0.5
    p = 1 / (1 + math.exp(-(-0.5 + 1.5 * z + 1.5 * (r["vol"] == VOLS[-1]))))
    return bool(np.random.default_rng(7_000 + 10 * r["day"] + r["order"]).random() < p)
```

***Listing 19.2.** The desk’s routing in the simulated log: the probability of sending an order to the urgent algorithm rises with its size and on volatile days, which is what makes the raw comparison biased. code/microstructure/19-transaction-cost-analysis/python/mx_tca.py*

![The cost difference between the two algorithms with 95% intervals: raw on the desk’s log, adjusted for difficulty on the same log, and the truth from working every order with both. Data: mx_tca.study.](https://one-course.com/images/onecourse/chapters/quant-10/mx-transaction-cost-analysis/fig-f1fc0fb833fc.svg)

***Figure 19.3.** The cost difference between the two algorithms with 95% intervals: raw on the desk’s log, adjusted for difficulty on the same log, and the truth from working every order with both. Data: `mx_tca.study`.*

The adjusted difference is 2.00 ticks, with a 95% interval from 0.32 to 3.68 ([Figure 19.3](#fig-mx-transaction-cost-analysis-estimates)): the adjustment removes most of the bias (3.36 raw against 1.89 true) and the interval covers the truth, but it is wide, because 200 orders with a cost standard deviation of five or six ticks do not pin down a two-tick difference. Measured against the pre-trade model instead, the patient algorithm’s orders cost 0.77 ticks less than predicted (standard error 0.56) and the urgent one’s 1.50 more (0.46): the same conclusion, with the model’s own error on top. Anand, Irvine, Puckett and Venkataraman (2012) found in institutional trade data that trading desks sustain their relative performance from one period to the next; Frazzini, Israel and Moskowitz (2018), on a large manager’s live executions, found real trading costs an order of magnitude smaller than earlier studies suggested. Both needed difficulty adjustment of this kind before any comparison.

**As of September 2026 — Best-execution reports in Europe.**

MiFID II required execution venues to publish execution-quality reports (“RTS 27”) and investment firms to publish their top five venues each year (“RTS 28”). Directive (EU) 2021/338 suspended the venues’ periodic reports until 28 February 2023. Directive (EU) 2024/790 of 28 February 2024, noting that the reports were rarely read and did not allow meaningful comparisons, deleted the top-five-venue report and replaced the execution-quality report with a duty to tell each client where its order was executed; member states had until 29 September 2025 to transpose it. In the United Kingdom the FCA removed both reports from 1 December 2021 (policy statement PS21/20).

## 19.5 Closing the loop

TCA pays for itself when it changes what the desk does. The loop here fits the cost on the algorithm and its interaction with difficulty on the first 50 days of the desk’s log, and routes each order of the last 50 days to the algorithm with the lower prediction. The model sends every order to the patient algorithm; scored with the truth, that costs 2.17 ticks a share on those days, against 3.24 for the desk’s routing and 3.88 for sending everything to the urgent algorithm. The urgent algorithm’s lower dispersion is the reason a desk might still choose it: a manager who penalises the variance of cost enough (exercise 6) pays the 1.9 ticks gladly. The comparison of algorithms by experiment rather than by regression, with orders assigned at random, is chapter 20’s algo wheel; the refinements of A/B testing (One Quant Book 7, chapter 21, including variance reduction by CUPED) apply directly.

## 19.6 Tutorial: analysing an order log

**Goal.** Generate a parent-order log in the simulated market, run TCA against every benchmark, attribute the shortfall, fit and test a pre-trade model, and compare two algorithms with and without difficulty adjustment against the truth. **End state:** [Table 19.1](#tab-mx-transaction-cost-analysis-benchmarks), Figures [19.1](#fig-mx-transaction-cost-analysis-calibration), [19.2](#fig-mx-transaction-cost-analysis-attribution) and [19.3](#fig-mx-transaction-cost-analysis-estimates) and the numbers of sections 4 and 5.

1. **Log.** `mx_tca.conditions(d)` , `orders(d)` , `day_runs(d)` (the day without orders, patient, urgent), `log()` .
2. **Measure.** `firm_tca.attribute` , `benchmarks` , `reversion` .
3. **Pre-trade.** `fit_pretrade` , `pretrade` .
4. **Compare.** `assigned(r)` , `adjusted_difference` , `peer_compare` ; `study()` ; draw with `fig_tca.py` .

**What to change next.** Give some orders information (a price drift in their direction) and watch reversion turn into continuation; route at random and see the adjustment become unnecessary; add a third algorithm.

## 19.7 Build: transaction-cost analysis

**Purpose.** The measurement layer behind the algo wheel of chapter 20, the [execution algorithm](https://one-course.com/books/quant/10/en/chapter/16-benchmark-algorithms#def-mx-benchmark-algorithms-algo) of chapter 28 and the desk’s reports.

**Interface.** `attribute(side, target, decision, arrival, fills, mid, cf_mid, end, t_arrival)`, `benchmarks(side, fills, arrival, window, day, close)`, `reversion(side, t_end, mid, horizons)`, `pretrade(half_spread, eta, sigma, participation)`, `fit_pretrade`, `cluster_ols(y, X, clusters)`, `adjusted_difference(cost, treat, controls, clusters)`, `peer_compare(cost, predicted, groups, clusters)`.

**Rules.** Costs positive when paid; attribution per share of target (opportunity counts), benchmarks per filled share; the mid just before each fill; clustered errors by the unit that shares a market (the day).

**Acceptance tests.** `code/firm/tca/tests/`: the attribution on a hand example, adding up to Book 7’s shortfall; benchmarks and reversion; the clustered adjustment recovers a planted effect that the raw difference overstates; the peer comparison.

**Stretch.** Attribution without a counterfactual (impact from the pre-trade model); peer universes by size and liquidity bucket.

Sources and further reading

- A. F. Perold, “The implementation shortfall: paper versus reality”, *Journal of Portfolio Management* 14(3), 1988.
- A. Anand, P. Irvine, A. Puckett and K. Venkataraman, “Performance of institutional trading desks: an analysis of persistence in trading costs”, *Review of Financial Studies* 25(2), 2012.
- R. Kissell, *The Science of Algorithmic Trading and Portfolio Management* , Academic Press, 2014.
- A. Frazzini, R. Israel and T. J. Moskowitz, “Trading costs”, working paper, SSRN 3229719, 2018.
- Directive (EU) 2021/338 and Directive (EU) 2024/790 amending Directive 2014/65/EU (MiFID II); FCA, PS21/20, 2021.

## 19.8 Exercises

**Exercise 19.1 ★.**

A buy of 1 000 shares is decided at 100.00 and arrives at 100.02; 800 shares fill at an average of 100.05, the price ends at 100.10, and fees are 0.3 cents a share. Compute the delay, execution, opportunity and fee costs and the shortfall per share of target.

**Solution of Exercise 19.1.**

Delay $800\times0.02=16$, execution $800\times0.03=24$, opportunity $200\times0.10=20$, fees $800\times0.003=2.4$ dollars: 62.4 dollars, or 6.24 cents per share of the 1 000-share target.

**Exercise 19.2 ★.**

The same order’s interval VWAP was 100.06. What does the VWAP report say, and what does the arrival report say?

**Solution of Exercise 19.2.**

The VWAP report says it beat the benchmark by a cent a share ($100.05-100.06$); the arrival report says it cost 3 cents a filled share, and with delay, opportunity and fees 6.24 cents a share of the order.

**Exercise 19.3 ★.**

With the fitted model ($-0.5$ tick of spread, $\eta=1.04$), what is the pre-trade estimate for an order at 10% participation in the middle regime ($\sigma=10.0$ ticks)?

**Solution of Exercise 19.3.**

$-0.5+1.04\times10.0\times\sqrt{0.1}=2.79$ ticks a share.

**Exercise 19.4 ★★.**

Why is the raw difference between the algorithms in the desk’s log larger than the truth?

**Solution of Exercise 19.4.**

The desk sent the urgent algorithm the larger orders (7 039 shares on average against 4 126) and more of the volatile days’ orders; both raise the cost whatever the algorithm, so part of the raw 3.36 ticks is the orders’ difficulty, not the algorithm.

**Exercise 19.5 ★★.**

Why is the patient algorithm’s reversion larger than the urgent one’s, when it trades more gently?

**Solution of Exercise 19.5.**

Reversion is measured after the last fill. The patient algorithm’s last fills are often [clean-up trades](https://one-course.com/books/quant/10/en/chapter/17-child-order-placement#def-mx-child-order-placement-risk) that cross the spread at the end of a slice, after five minutes of resting pressure; the price then gives back that push (3.51 ticks after two minutes). The urgent algorithm’s last slices are the smallest of its front-loaded schedule, and its large early trades have already reverted during the window.

**Exercise 19.6 ★★.**

A manager minimises expected cost plus $\lambda$ times its variance (per share, in ticks). Above what $\lambda$ does the urgent algorithm’s lower standard deviation justify its higher mean?

**Solution of Exercise 19.6.**

When $1.89<\lambda(5.98^2-4.60^2)=14.6\lambda$, that is $\lambda>0.13$ per tick.

**Exercise 19.7 ★★★.**

*Coding.* Adjust the comparison for participation only. What difference and interval do you get, and why?

**Solution of Exercise 19.7.**

2.32 ticks, with a 95% interval from 0.79 to 3.85. Participation captures most of the size effect, but not the volatile days that the urgent algorithm also received more often, so part of the bias remains (the truth is 1.89); the interval is narrower because the estimate uses fewer controls.

**Exercise 19.8 ★★★.**

*Find the flaw.* “The patient algorithm beat the VWAP by 0.3 ticks on average, so its orders cost our clients nothing.”

**Solution of Exercise 19.8.**

The interval VWAP includes the algorithm’s own trades and the price they moved: it drifts with the order. The same orders cost 2.42 ticks a filled share against the arrival price.

## 19.9 Problem: Bad Broker or Hard Day?

**Problem 19.1.**

Weekend problem — bad broker or hard day?

A desk’s TCA report says the urgent algorithm costs 3.4 ticks a share more than the patient one. The broker behind it says its orders were harder.

**Part I — Benchmarks.**

1. Define the four benchmarks of the chapter.
2. Give each algorithm’s slippage against them.
3. Why does the patient algorithm beat its interval VWAP?
4. Which benchmark answers “what did the order cost the fund”, and why?

**Part II — Estimates and attribution.**

5. State the pre-trade model and its fitted coefficient.
6. How well does it predict out of sample, on average and order by order?
7. Write the attribution and show it adds up to the implementation shortfall.
8. Give the attribution of each algorithm.
9. What does the reversion after the last fill say?

**Part III — The comparison.**

10. Describe the desk’s routing and the orders each algorithm received.
11. Give the raw difference and its standard error.
12. Write the adjusted regression and explain the clustering.
13. *State the named result* : the difficulty-adjusted cost difference between the two algorithms with its confidence interval, against the raw difference.
14. How does it compare with the truth, and why can a real desk not see the truth?
15. What does the comparison against the pre-trade model give?

**Part IV — Closing the loop.**

16. What routing does the fitted model recommend, and what does it save?
17. Why might a manager still choose the urgent algorithm?
18. How would randomised routing change the analysis?
19. Bad broker or hard day: what do you answer?
20. In one sentence: what makes two execution costs comparable?

**Solution of Problem 19.1.**

**1.** The arrival price, the VWAP over the order’s interval, the day’s VWAP, the close. **2.** Patient 2.42, $-0.29$, 1.90, 2.51; urgent 3.66, 1.40, 3.39, 4.10 ticks a filled share. **3.** Its window’s VWAP contains its own trades and their impact. **4.** The arrival (or decision) price: fixed before the order touches the market, so it measures the whole cost of trading. **5.** Half-spread plus $\eta\sigma\sqrt{Q/V}$; $\eta=1.04$ (standard error 0.18) with $-0.5$ tick of spread. **6.** 2.47 predicted against 2.73 realised on average; a correlation of 0.25 order by order. **7.** Delay, spread, impact, timing, opportunity and fees add up to Perold’s shortfall because impact and timing split the execution cost exactly. **8.** Patient: delay $-0.35$, spread $-0.65$, impact 2.41, timing 0.59, opportunity 0.10, fees $-0.20$, total 1.90; urgent: $-0.15$, 2.43, 1.13, $-0.07$, 0.16, 0.29, total 3.79. **9.** The price gives back 3.51 ticks (patient) and 1.06 (urgent) within two minutes: temporary impact, no leakage. **10.** 53.5% of orders to the urgent algorithm, more of them large or on volatile days (7 039 shares on average against 4 126). **11.** 3.36 ticks, standard error 0.76. **12.** Cost on the algorithm, the regime’s volatility, participation, the square-root term and its interaction with the algorithm; clustered by day because the day’s market is common to its orders. **13.** *Named result*: urgent minus patient, adjusted for difficulty, is 2.00 ticks a share with a 95% interval from 0.32 to 3.68, against a raw difference of 3.36 (standard error 0.76); the truth, from working every order with both, is 1.89 (0.25). **14.** Close: the adjustment removed most of the bias and the interval covers it. A real order is worked once; its other outcome is never seen. **15.** Patient 0.77 ticks under the prediction (0.56), urgent 1.50 over it (0.46). **16.** Everything to the patient algorithm: 2.17 ticks a share on the last 50 days against 3.24 for the desk’s routing. **17.** Its cost varies less (standard deviation 4.60 against 5.98 ticks): a manager penalising variance enough prefers it. **18.** With orders assigned at random, the raw difference is unbiased and adjustment only narrows the interval. **19.** Hard orders explain about 1.4 of the 3.4 ticks; the rest, about 2 ticks, is the algorithm, measured within an interval that a year of such orders would narrow. **20.** The same benchmark, fixed before trading, and an adjustment for how hard each order was.

## 19.10 Interview questions

**Interview question 19.1 ★ trader.**

Your order beat VWAP but cost 20 basis points against arrival. Explain both numbers to the portfolio manager.

**Solution of Interview question 19.1.**

VWAP measures how the order’s prices compared with the market’s during the order, including the order’s own push; arrival measures what the fund paid against the price when it decided. The 20 basis points are impact and drift; the VWAP beat says the algorithm tracked the day.

*What the interviewer is looking for: Which benchmark moves with the order.*

**Interview question 19.2 ★★ researcher.**

How would you split an order’s slippage into spread, impact and timing without a counterfactual?

**Solution of Interview question 19.2.**

Spread against the mid just before each fill; impact from a pre-trade model (or from the market’s move beta-adjusted to an index or sector), timing as the remainder; or match similar orders on the opposite side to cancel the market’s move.

*What the interviewer is looking for: A model or a control for the market’s move.*

**Interview question 19.3 ★★ researcher.**

Two brokers’ average costs differ by 3 basis points. What do you need before concluding that one is better?

**Solution of Interview question 19.3.**

The number of orders and the noise of each (standard errors clustered by day or stock), the difficulty of each broker’s orders (size, volatility, [urgency](https://one-course.com/books/quant/10/en/chapter/14-the-almgrenchriss-framework#def-mx-the-almgren-chriss-framework-urgency)) and how orders were assigned; ideally randomised routing.

*What the interviewer is looking for: Standard errors, difficulty, assignment.*

**Interview question 19.4 ★★ risk.**

What does [post-trade reversion](#def-mx-transaction-cost-analysis-reversion) tell you, and how would you use it to detect [information leakage](https://one-course.com/books/quant/10/en/chapter/9-dark-pools-and-blocks#def-mx-dark-pools-and-blocks-leakage)?

**Solution of Interview question 19.4.**

A price that gives back the order’s push after completion shows temporary impact; one that keeps going shows information. Compare post-completion drift with a pre-trade expectation, by broker and venue; drift that starts before the order’s large child trades suggests leakage.

*What the interviewer is looking for: Sign conventions; timing relative to the order.*

**Interview question 19.5 ★★ developer.**

Design the data a TCA system must capture for each parent and [child order](https://one-course.com/books/quant/10/en/chapter/14-the-almgrenchriss-framework#def-mx-the-almgren-chriss-framework-parent).

**Solution of Interview question 19.5.**

Parent: decision time and price, arrival, instructions, target, limit, algorithm and parameters, cancellations. Child: send, acknowledgement and fill times, venue, price, quantity, fees, liquidity flag; market data around each (mid, spread, depth, volume) at microsecond time stamps.

*What the interviewer is looking for: Timestamps; the decision price; child-level venue data.*

**Interview question 19.6 ★★★ bank.**

A client’s TCA vendor ranks your algorithms last in its peer universe. How do you examine the claim?

**Solution of Interview question 19.6.**

Ask for the universe’s composition and the vendor’s difficulty model, check whether the client’s orders were routed differently (larger, more urgent, more volatile names), rerun the comparison on the client’s own orders adjusted with its own pre-trade model, and look at the interval.

*What the interviewer is looking for: Composition; adjustment; uncertainty.*
