Quantitative Finance · Book 10 · Execution

Microstructure and Execution

Microstructure and Execution · Execution

22Portfolio Trades and Risk Bids

A pension fund asks three brokers for a price at which they will take on a basket of five hundred stocks at tonight’s close, knowing only its size, its sectors and its liquidity. The broker who wins learns the names afterwards, and learns whether it bid too much. This chapter prices such a bid on a simulated basket: the cost of liquidating it, the risk carried while doing so, and the shading that competition forces on a bidder who does not want to win only when it is wrong; it then compares a disclosed basket with a blind one and ends with a transition between two portfolios.

22.1 Agency and principal portfolio trades

Definition 22.1 (Agency portfolio trade, risk bid)

An agency portfolio trade executes a list of orders for a client as agent, the client bearing the costs and the risk and paying a commission. A risk bid is a principal price for the whole list: the broker buys (or sells) every position at an agreed benchmark, usually the close, less a discount, and bears the cost and risk of unwinding them.

Definition 22.2 (Blind risk bid)

A blind risk bid is a risk bid made on a description of the basket (its size, sectors, liquidity and risk characteristics) without the names, which are revealed only to the winner once the trade is agreed.

A portfolio trade (One Quant Book 2, chapter 22) moves a whole list at once: an index rebalance, a fund’s inflows, a change of manager. The client chooses between paying the costs itself (agency) and paying a broker to take them (principal); the risk bid is priced like any risk transfer (chapter 21), with two twists: the list is large and diversified, so its risk can be hedged in part, and in the blind version the bidder prices a description. Kavajecz and Keim (2005) studied such blind principal auctions and found that they gave the liquidity demander a transaction-cost saving relative to more traditional trading, and liquidity suppliers an efficient way to obtain order flow.

The simulated basket comes from Book 7’s synthetic market (firm.synthmkt): 786 names listed on its last day, with a median daily volume of USD 37.5 million and a median daily volatility of 171 basis points; half-spreads follow a size rule (an assumption: a median full spread of 5.9 basis points), and a ten-factor statistical risk model on 250 days of returns gives the covariance (Book 7’s firm.riskmodel). The pension fund’s basket holds 500 of them, USD 250 million, with positions from USD 38 000 to USD 4.8 million, a median of 1.0% of a day’s volume.

22.2 The cost of liquidating a basket

Definition 22.3 (Basket liquidity profile)

A basket liquidity profile summarises a basket without its names: the share of its notional in buckets of position size relative to daily volume, by sector, with its beta, volatility and other risk characteristics.

Each position is sold at no more than 20% of its daily volume, so a position of kk days’ volume takes max⁡(1,5k)\max(1,5k) days; its cost is its half-spread plus the square-root law’s Yσmin⁡(Q/V,0.2)Y\sigma\sqrt{\min(Q/V,0.2)} (chapter 11, Y=0.7Y=0.7). The basket’s liquidity profile is Figure 22.1: 98.8% of its notional is below 5% of a day’s volume, and no position needs more than a day. The winner’s cost of unwinding it is 14.9 basis points of the basket (firm_riskbid.liquidation).

The basket’s liquidity profile: its notional by position size relative to daily volume, what a blind bidder is shown (with the sector weights). Data: mx_riskbid.blind.
Figure 22.1. The basket’s liquidity profile: its notional by position size relative to daily volume, what a blind bidder is shown (with the sector weights). Data: mx_riskbid.blind.

22.3 Pricing a risk bid

While it sells, the winner holds what is left. With each position sold down in a straight line over its days did_i, the variance of the P&L is ∑ijwiwjCijI(di,dj)\sum_{ij}w_iw_jC_{ij}I(d_i,d_j), with CC the daily covariance and I(a,b)=a/2−a2/(6b)I(a,b)=a/2-a^2/(6b) for a≤ba\le b the overlap of the two holdings (for one day, a third of a day’s variance): this is the multi-asset Almgren–Chriss risk term (Almgren and Chriss, 2001; chapter 14) for straight-line schedules. For the basket, one standard deviation is 40.4 basis points; sold short in index futures at once to remove its market beta, 12.5.

def _overlap(d):
    a = np.minimum.outer(d, d)
    b = np.maximum.outer(d, d)
    return a / 2 - a**2 / (6 * b)


def risk_sd(notional, cov, days, hedge=None) -> float:
    w = np.asarray(notional, float)
    c = np.asarray(cov, float)
    if hedge is not None:
        load, var = hedge
        load = np.asarray(load, float)
        c = c - var * np.outer(load, load)       # the factor sold at once with a future
    var = w @ (c * _overlap(np.asarray(days, float))) @ w
    return float(np.sqrt(max(var, 0.0)))
Listing 22.1. The risk of holding a basket while it is sold down: each pair of positions contributes its covariance times the time their straight-line holdings overlap; a market hedge removes the factor’s part of the covariance. code/firm/riskbid/firm_riskbid.py

The bid, as a discount to the close, adds four parts: the expected cost, a charge for the risk (here one standard deviation of the hedged P&L, the desk’s choice), the shading that competition requires (the next section), and a margin (2 basis points). For the disclosed basket: 14.9 of cost, 12.5 of risk, 4.2 of shading and 2.0 of margin, a bid of 33.6 basis points below the close (Figure 22.2).

22.4 Blind bids and the winner’s curse

Every bidder estimates the same cost with its own error; the one whose estimate is lowest wins, and it wins most often when its estimate is too low. This is the winner’s curse of a common-value auction (One Quant Book 2, chapter 30). If each of four bidders (the desk and three competitors) estimates the cost with an independent error of standard deviation ss, the winner’s estimate is on average s E[max⁡ of 4 standard normals]=1.03ss\,\E[\max\text{ of 4 standard normals}]=1.03s too low, and a bidder who does not shade by that amount loses it on the trades it wins (firm_riskbid.curse).

def curse(sigma_est: float, competitors: int) -> float:
    return sigma_est * expected_max_normal(competitors + 1)


def auction(true_cost: float, sigma_est: float, bidders: int, shade: float,
            margin: float = 0.0, trials: int = 100_000, seed: int = 1) -> float:
    """Each bidder estimates the cost with an independent error; the lowest bid wins;
    the winner's profit is its bid minus the true cost."""
    rng = np.random.default_rng(seed)
    est = true_cost + sigma_est * rng.standard_normal((trials, bidders))
    win = est.min(axis=1) + shade + margin
    return float(np.mean(win - true_cost))
Listing 22.2. The winner’s curse and the auction that checks it: the shading is the expected lead of the best of n + 1 estimates; the simulated auction returns the winner’s average profit. code/firm/riskbid/firm_riskbid.py

With estimation errors of 15% of the cost and risk (4.1 basis points for the disclosed basket), the shading is 4.2 basis points; in 200 000 simulated auctions, bidders who add only the 2-basis-point margin make −2.2-2.2 basis points on the trades they win, and bidders who also shade make the 2.0 they wanted.

A blind bidder sees only the profile. To price it, the desk draws 300 baskets with the same profile (each position keeps its sector, its notional and its bucket of days of volume, with a name drawn from those that fit) and prices each: their cost averages 17.0 basis points (standard deviation 0.4) and their hedged risk 13.0 (1.1). The profile does not reveal that the fund held more of the liquid names than a random draw would: the blind estimate is 2.1 basis points above the disclosed cost. The larger estimation error adds 0.2 to the shading. The blind bid is 36.4 basis points, 2.8 more than the disclosed one; the client pays the difference for not showing its names before the trade.

The disclosed and blind bids on the same basket, part by part (basis points of the basket below the close): the blind bidder’s cost and risk are its estimates from the liquidity profile. Data: mx_riskbid.bids.
Figure 22.2. The disclosed and blind bids on the same basket, part by part (basis points of the basket below the close): the blind bidder’s cost and risk are its estimates from the liquidity profile. Data: mx_riskbid.bids.

The blind bid still has a use: the client’s names do not leak to the losers, who might otherwise trade ahead of the winner’s unwind (chapter 9’s leakage). Whether the 2.8 basis points buy enough protection depends on how many dealers would see the names and what they would do with them.

22.5 Transitions

A transition moves a fund from one portfolio (a manager it is leaving) to another. The transition manager (One Quant Book 8, chapter 29) nets the names the two portfolios share, crosses what it can internally against other flow, and trades the rest. For two portfolios of USD 250 million with 150 names in common: selling one and buying the other outright trades USD 500 million and costs 50.4 basis points of the fund; netting the shared names trades USD 322 million at 32.8; crossing 20% of the remainder internally leaves USD 258 million to trade, at 24.0 (firm_riskbid.transition). Internal crossing (One Quant Book 7, chapter 27) and the central risk book (Book 9, chapter 25) are the same idea at the scale of a bank: the cheapest trade is the one that never reaches the market.

22.6 Tutorial: pricing a risk bid

Goal. Price a principal bid for a 500-name basket, disclosed and blind, with its winner’s-curse shading, and cost a transition. End state: Figures 22.1 and 22.2 and the numbers of sections 2 to 5.

  1. Universe. mx_riskbid.universe() on firm.synthmkt and firm.riskmodel.pca_model; basket().
  2. Cost and risk. firm_riskbid.liquidation, risk_sd; price(names, notional).
  3. Blind. profile; blind().
  4. Bid. curse, auction; bids(); transition_study(); draw with fig_riskbid.py.

What to change next. Add cross-impact between the names (chapter 13); let the competitors’ errors be correlated (a shared model); make the basket less liquid than its profile suggests.

22.7 Build: risk bids

Purpose. The pricing of principal baskets and transitions for the desk of chapter 20 and the bank desks of Book 9.

Interface. liquidation(notional, adv, sigma, spread_bp, cap, y), risk_sd(notional, cov, days, hedge), profile(notional, adv, sector, edges), curse(sigma_est, competitors), auction(true_cost, sigma_est, bidders, shade, margin, trials, seed), transition(old, new, cross_share).

Rules. Costs in basis points of the basket’s gross notional; straight-line liquidation within each name’s days; a hedge removes a factor at once; bidders’ errors independent.

Acceptance tests. code/firm/riskbid/tests/: the liquidation rule; the profile; the straight-line risk against a numerical integral and a perfect hedge; the curse’s shading makes the winner’s profit the margin; the transition’s netting and crossing.

Stretch. Cross-impact; correlated bidders; optimal liquidation schedules instead of straight lines.

Sources and further reading

  • R. Almgren and N. Chriss, “Optimal execution of portfolio transactions”, Journal of Risk 3(2), 2001.
  • K. A. Kavajecz and D. B. Keim, “Packaging liquidity: blind auctions and transaction efficiencies”, Journal of Financial and Quantitative Analysis 40(3), 2005.

22.8 Exercises

Exercise 22.1 ★

A position of 30% of a day’s volume in a stock with a daily volatility of 200 basis points and a 6-basis-point spread: how many days does it take at a 20% cap, and what does it cost?

Solution

Solution of Exercise 22.1.

0.3/0.2=1.50.3/0.2=1.5 days; 3+0.7×200×0.2=65.63+0.7\times200\times\sqrt{0.2}=65.6 basis points.

Exercise 22.2 ★

One position sold in a straight line over three days with a daily volatility of 150 basis points: what is the standard deviation of its P&L, in basis points of the position?

Solution

Solution of Exercise 22.2.

The variance is σ2d/3\sigma^2d/3: 1503/3=150150\sqrt{3/3}=150 basis points.

Exercise 22.3 ★

What shading does a bidder need against five competitors with an estimation error of 4 basis points?

Solution

Solution of Exercise 22.3.

4×E[max⁡ of 6 normals]=4×1.27=5.074\times\E[\max\text{ of 6 normals}]=4\times1.27=5.07 basis points.

Exercise 22.4 ★★

Why does hedging with index futures cut the basket’s risk from 40.4 to 12.5 basis points, and why not further?

Solution

Solution of Exercise 22.4.

A long basket of 500 stocks is mostly market risk, which one futures trade removes at once. What remains is sector and style risk (the other factors) and the stocks’ specific risk, which the future does not hedge; with 500 names the specific part is small, so the other factors dominate.

Exercise 22.5 ★★

Why does the blind bidder overestimate this basket’s cost, and could it underestimate another’s?

Solution

Solution of Exercise 22.5.

The fund held more of the liquid names within each bucket than a random draw from the bucket does; the profile cannot show it. A basket tilted to the less liquid names of each bucket would be underestimated, which is the blind bidder’s real danger.

Exercise 22.6 ★★

If all four bidders use the same vendor’s cost model, what happens to the winner’s curse?

Solution

Solution of Exercise 22.6.

The errors become correlated: the common part of the error is not selected by the auction (every bidder shares it), so the curse from the independent part shrinks, but all bidders are wrong together, and the client gains or loses from the shared error.

Exercise 22.7 ★★★

Coding. Price the disclosed basket with a risk charge of two standard deviations instead of one. What is the bid?

Solution

Solution of Exercise 22.7.

Cost 14.9, risk charge 25.0, shading 6.2 (the estimation error scales with the larger base), margin 2.0: 48.1 basis points.

Exercise 22.8 ★★★

Find the flaw. “We won 40% of the risk bids we made last year, so our pricing is about right.”

Solution

Solution of Exercise 22.8.

Winning says the bids were low relative to the competitors, not that they covered the costs: the winner’s curse selects the trades whose costs were underestimated. Only the realised P&L of the won trades against their bids says whether the pricing was right.

22.9 Problem: Pricing the Basket Blind

Problem 22.1

Weekend problem — pricing the basket blind

A pension fund offers a 500-name basket for a principal bid at the close; your desk competes with three others.

Part I — The trade.

  1. Distinguish agency and principal portfolio trades.
  2. Define a risk bid and a blind risk bid.
  3. Describe the simulated universe and the basket.
  4. What did Kavajecz and Keim find about blind principal auctions?

Part II — Cost and risk.

  1. State the liquidation rule and give the basket’s cost.
  2. Derive the overlap I(a,b)I(a,b) of two straight-line holdings.
  3. Give the basket’s risk with and without the market hedge.
  4. What does the liquidity profile show?

Part III — Competition.

  1. Explain the winner’s curse and derive the shading.
  2. What do bidders make without shading and with it?
  3. How does the blind bidder estimate cost and risk, and what does it find?
  4. Give the disclosed and blind bids part by part.
  5. State the named result: the bid in basis points for the disclosed and the blind basket, and the winner’s-curse adjustment against three competitors.

Part IV — Transitions and judgement.

  1. Cost the transition outright, netted and with internal crossing.
  2. Why is internal crossing cheaper than any execution?
  3. When is a blind bid worth its premium to the client?
  4. Which assumption of the pricing would you check first?
  5. How would you price the bid if competitors shared your model?
  6. What would you tell the fund about agency against principal?
  7. In one sentence: what does a risk bid sell?
Solution

Solution of Problem 22.1.

1. Agency: the client bears costs and risk; principal: the broker takes the positions at an agreed price. 2. See the definitions. 3. 786 names, median daily volume USD 37.5 million, median volatility 171 basis points; a USD 250 million basket of 500 names, median position 1.0% of daily volume. 4. A transaction-cost saving for the client and an efficient source of flow for liquidity providers. 5. At most 20% of daily volume, half-spread plus Yσmin⁡(Q/V,0.2)Y\sigma\sqrt{\min(Q/V,0.2)}; 14.9 basis points. 6. ∫0a(1−t/a)(1−t/b) dt=a−a/2−a2/(2b)+a2/(3b)=a/2−a2/(6b)\int_0^a(1-t/a)(1-t/b)\,dt=a-a/2-a^2/(2b)+a^2/(3b)=a/2-a^2/(6b). 7. 40.4 basis points unhedged, 12.5 hedged. 8. 98.8% of the notional is below 5% of daily volume; no position needs more than a day. 9. The lowest of four independent estimates is too low by 1.03s1.03s on average; shade by that. 10. −2.2-2.2 basis points without shading, 2.0 (the margin) with it. 11. By pricing 300 baskets with the same profile: cost 17.0 (s.d. 0.4), hedged risk 13.0 (1.1). 12. Disclosed: 14.9, 12.5, 4.2 and 2.0; blind: 17.0, 13.0, 4.4 and 2.0. 13. Named result: 33.6 basis points below the close for the disclosed basket and 36.4 for the blind one; the winner’s-curse shading against three competitors is 4.2 and 4.4 basis points. 14. 50.4, 32.8 and 24.0 basis points of the fund. 15. It pays no spread and moves no price: both sides are satisfied at the mid. 16. When the names would leak to dealers who would trade ahead of the unwind by more than the premium. 17. The impact model’s coefficient and the competitors’ errors being independent. 18. Shade less for the shared error, but widen the margin for model risk. 19. Principal buys certainty at a price; agency is cheaper on average when the client can bear the risk. 20. The certainty of the close, for the cost and risk of the unwind and the winner’s curse.

22.10 Interview questions

Interview question 22.1 ★ trader

A client asks for a risk price on a basket at the close. What do you need to know, and how do you build the price?

Solution

Solution of Interview question 22.1.

The names (or profile), sizes against volume, spreads and volatilities, the covariance and available hedges, the benchmark, the competition. Price = expected liquidation cost + a charge for the unwind’s risk + winner’s-curse shading + margin.

What the interviewer is looking for: The four parts; hedging.

Interview question 22.2 ★★ researcher

Explain the winner’s curse in a risk-bid auction and how you would correct for it.

Solution

Solution of Interview question 22.2.

The winning estimate is the most optimistic of several noisy estimates; correct by adding the expected lead of the best of nn estimates, sE[max⁡]s\E[\max], or by pricing conditional on winning.

What the interviewer is looking for: Selection on the lowest estimate.

Interview question 22.3 ★★ risk

How would you measure the risk of holding a basket while you unwind it, and what can you hedge?

Solution

Solution of Interview question 22.3.

The variance of the P&L over the unwind, ∑wiwjCij∫xixj dt\sum w_iw_jC_{ij}\int x_ix_j\,dt with a risk model; hedge the market (and sectors or styles) with futures or ETFs at once, leaving specific and unhedgeable factor risk.

What the interviewer is looking for: Time-weighted covariance; hedges.

Interview question 22.4 ★★ bank

Your desk keeps losing money on the blind bids it wins. What do you check?

Solution

Solution of Interview question 22.4.

Whether the profile hides adverse tilts (the client’s baskets are less liquid within buckets than assumed), whether the shading reflects the real number of competitors and the model’s error, and whether the losses come from cost, risk or leakage after winning.

What the interviewer is looking for: Profile bias; shading; decomposition of the P&L.

Interview question 22.5 ★★ trader

Plan a transition from one equity manager to another for a pension fund.

Solution

Solution of Interview question 22.5.

Inventory both portfolios, net the common names, cross internally, hedge the out-of-market exposure with futures, schedule the rest by liquidity, and report the cost against the pre-trade estimate.

What the interviewer is looking for: Netting, crossing, hedging, reporting.

Interview question 22.6 ★★★ researcher

How would you estimate the cost of a basket you cannot see from its liquidity profile, and how would you know if the estimate was biased?

Solution

Solution of Interview question 22.6.

Draw baskets consistent with the profile and price them; check the bias by pricing, after the fact, disclosed baskets as if they were blind and comparing with their true cost over many trades.

What the interviewer is looking for: Simulation from the profile; back-testing the blind estimate.

Terms defined in this chapter

See all 2333 terms in the glossary