Quantitative Challenges in Algorithmic Execution Robert Almgren Quantitative Brokers and NYU Feb 2009
Sell-side (broker) viewpoint "Flow" business no pricing computations use for standardized exchange-traded products Agency trading: execute large transactions profit from commissions Optimize each order individually no knowledge of overall program optimize whatever metrics you set You are the execution consultant 2
Algo trading business Three legs of quantitative framework 1. optimal trading strategies 2. post-trade reporting 3. pre-trade cost estimation Client uses these to improve investment results Very highly developed in equities all brokers provide rich suite of transaction cost tools and execution algorithms In development for other asset classes 3
Algorithmic trading system "Buy 50,000 XYZ, moderate urgency, max price $55, complete by 14:00" Client hedge fund mutual fund "You are done on 23,000 XYZ, at 15c better than strike. Today's average so far on 17 orders is 13 bp better than VWAP" Orders and execution parameters Fill reports and execution quality analysis Market Data Algorithmic Trading System Broker Trades and quotes News feeds etc. Time slicing and order submission using quantitative analysis Child orders Fill reports To Cincinnati exchange: "Limit buy order 100 XYZ @ 53.22" Markets equities options futures foreign exchange etc. 4
Post-trade report Design to reflect criteria for good trade Mean and standard deviation of results Relative to arrival price, VWAP, close Subdivide by all possible parameters strategy, urgency, buy/sell, primary exchange, duration, order size, index membership, etc. Execution optimizes to these benchmarks 5
Post-trade cost reporting Sample mean Benchmarks: strike, VWAP, close Sample standard deviation 6
Quantitative pre-trade cost modeling How much slippage will it cost me to execute this trade? Calibrate from historical trades. Individual algo executions Execution price relative to pre-trade price, as fraction of daily vol Regression model Active area of current research: temporary/permanent impact linear/nonlinear models time rate of decay of impact non-gaussian residuals Trade size as % of daily volume 7
Algo trading ranking Institutional Investor's Alpha, Sept 2008, Top Equity Trading Firms B of A #1 2008 up from #4 2007 8
Outline 1. Arrival price framework trading fast vs trading slow 2. Adaptive vs non-adaptive strategies non-adaptivity in the base case price limits, short-term signals, views 3. Mean-variance adaptivity subtle aspects of time-dependent MV Julian Lorenz PhD thesis 4. Other asset classes 9
1. Arrival Price Framework Agency trading is about access to liquidity dispersed in "space": smart order routing tactics: technology and microstructure dispersed in time: time slicing and trajectories strategy: optimization and differential equations How to determine optimal trajectory how fast should you trade? what is the exact optimal profile? 10
What is a good trade "Implementation shortfall" (Perold 1988) Actual trade price vs "ideal" Depends on benchmark most important: decision price or "arrival price" other possibilities: VWAP, close, etc Trade to minimize discrepancy to benchmark average price should be close or better result should be predictable (low variance) 11
How fast should you trade? Why trade slowly? Market impact: wait for counterparties to appear Why trade fast? Arrival price answer: reduce volatility exposure Other answers short-term alpha, control info leak, dynamic views These answers determine optimal strategy Grinold & Kahn 1996, Almgren & Chriss 2000 12
Arrival price solution E Expected cost Fast Shares remaining to execute Mean variance min E+λV Urgency (risk-aversion) λ set by client. Or proxy by target percentage of volume Variance of cost VWAP V High urgency (immediate) E large, V small Low urgency (VWAP) E small, V large Mean variance popular instead of utility function because simple, graphical indifferent to total wealth Order entry time Imposed end time Time 13
2. Adaptive vs. non-adaptive Arrival price trajectory is determined at start compute optimal trade list (calculus of variations) Information is revealed as execution proceeds standard filtration: price moves are only new info changes in parameters, changes in preferences Should you use new info to change trade list? 14
Arrival price answer: No New price information does not change trade list Shares remaining Reevaluate trajectory at intermediate time Price Price up or price down does not change optimal strategy for remaining time with same market parameters and risk aversion 15
Arrival price time-stability New information does not change list Reevaluate trajectory partway through trading gains or losses are sunk costs risk-reward tradeoff for tail is same as original Depends on constant risk aversion (mean-variance) constant market parameters arithmetic Brownian motion 16
Percentage of volume parameter Continuous-time adapting: VWAP trajectory Shares remaining to execute Specify urgency by initial trade rate (slope of tangent at t=0) "Start at 25% of expected mkt vlm" This is a "false" reason for adapting, since it is not optimal in any sense Reevaluate with same parameter gives different trajectory Time 17
Other reasons to adapt Asset price approaches limit price Price Limit price: customer says it is not worth buying above this level As price gets close to limit, do you Speed up because may not be able to complete? Slow down because asset is getting less valued? Answer depends on value of unexecuted shares. Interesting research problem 18
Customer belief on process Example: Price is up at mid-program Momentum belief: Price will continue up Accelerate buy programs Slow down sell programs Price Reversion belief: Price will revert down Slow down buy programs Accelerate sell programs Almgren/Lorenz 2006 : Trade decisions determined overnight cause momentum effects Behavioral finance loss aversion: "Sell winners too early and ride losers too long" (Shefrin/Statman 1985) 19
Liquidity and volatility fluctuations σ(t) η(t) Liquidity or market impact: estimate from microstructure model Instantaneous volatility: estimate from HF modeling Arrival price trajectory depends on balance of market impact cost and volatility risk. Should adapt dynamically to variations Discrete time: Nitin Walia, Princeton senior thesis 2006 (Cheridito) Continuous time: interesting nonlinear PDE Interesting research problem 20
S ( 2 ( S τ + αξs ξ = exp χ + βv ξ ) ) τ + αξs ξ = exp 2 ( χ + βv ξ ) e ξ S 2 + 1 β e ξ S 2 + 1 L 2 αβ β L 2 αβ L 2 S ξξ L 2 S ξξ in which χ appears only as a parameter (no χ-derivatives). We solve in which this equation χ appearsseparately only as afor parameter each value (noof χ-derivatives). χ, and since we We are solve interested this equation only inseparately the case χ for = each 0 thisvalue reduces of χ, to and (4). since we are interested only in the case χ = 0 this reduces to (4). PDE for random liquidity It is convenient to make the change of variables It is convenient to make the change of variables R(τ, ξ) = e ξ u(τ, ξ) R(τ, ξ) = e ξ u(τ, ξ) Liquidity and volatility log-ou processes for Value thenfunction u solves for then u u τ + α ( ξ β 2) u ξ = e (γ 1)ξ u 2 α (ξ 12 ) τ + α ( ξ β 2) u ξ = e (γ 1)ξ u 2 α (ξ 12 ) β2 u + 1 β2 u + 2 1αβ2 u ξξ (5) 2 αβ2 u ξξ (5) with initial data with initial data u(τ, ξ) 1 u(τ, ξ) τ 1, τ, τ τ 0. 0. Then the dimensional rate of selling is simply Then ξ = instantaneous the dimensional rateliquidity, of selling is simply v = κ x u(τ, ξ). v = κ x u(τ, ξ). τ = time to expiration 21
Implementation in practice "Third-generation" algorithm Arrival price trajectory modified by liquidity Trade price and bid/offer Liquidity indicator for buy and sell 22
Cumulative shares purchased Gamma hedging Variant of "departure price:" benchmark is close price Target quantity X(T) = Δ0+Γ (S(T)-S0) Cannot go backwards (agency trading) S(t) Price Problem: charaterize distribution of final over-traded quantity Interesting research problem T 23
3. Mean-variance adaptivity Broker should optimize to post-trade benchmark Shows historical sample mean and variance Optimal arrival price trajectories adapt to price not related to momentum or mean reversion 24
3 kinds of adaptivity 1. No adaptivity Strategy required to be fixed in time 2. Dynamic programming Adapt freely to minimize E+λV at each instant, using price observed to date Classic arrival price: 1 & 2 give same solution Unlike option pricing! hedge depends on price 25
Dr. Strangelove Strategy 3. Rule of adaptivity is fixed in advance Minimize E+λV measured at initial time Not allowed to modify rule at intermediate times even if risk preferences are different at that time This corresponds to ex-post mean-var report Optimal solutions adapt dynamically to price 26
Effect of trading gains/losses Buy order: price up = trading loss Compensate by slowing rest of program to reduce market impact costs Buy order: price down = trading gain Accelerate rest of program, spending the gain on market impact costs Price Introduce anti-correlation between trading gain/loss in first part of program market impact costs in remainder Use to improve mean-variance tradeoff 27
Single-update strategy Almgren/Lorenz 2007 1 0.9 10 2 Shares remaining x(t) 0.8 0.7 0.6 0.5 0.4 Urgency κ 10 1 10 0 1 0 1 Normalized cost C 0 0.3 0.2 Nonadaptive strategy Change once, based on price move to that time 0.1 0 0 0.2 0.4 0.6 0.8 1 Time t 28
Dynamic programming Standard dynamic programming: control variable is number of shares to trade Modified dynamic programming extra variable is return target for remainder Solve for entire efficient frontier over time 29
Dynamic programming for frontier Efficient frontier at t j-1 for x shares Efficient frontier at t j for x shares Var[C] Var[C]... j... j E[C] c z 0 z + z - E[C] 30
Continuous-time update Almgren/Lorenz 2008 1 Shares remaining x(t) 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 1 0.5 S(t) S 0 0 0.5 1 0 0.2 0.4 0.6 0.8 1 Time t 0 0 0.2 0.4 0.6 0.8 1 Time t 31
Improved efficient frontier 7 µ=0 6 0.05 κ=7.1 5 0.1 κ=6.0 4 E/E lin 0.15 0.2 7.1 κ = 8 κ=4.9 3 6.0 4.9 0 0.2 0.4 0.6 0.8 Nondimensional cost C 2 1 0 μ = "market power" ability of portfolio to push market relative to volatility VWAP 0 0.2 0.4 0.6 0.8 1 V/V lin 32
Related to short-term investment performance Cvitanic, Lazrak, Wang 2008: problems with ex-post Sharpe ratio measurement "Problem" disappears with exponential utility Schied & Schöneborn 2008: static pre-computed solutions are optimal 33
4. Algo trading outside equities Same factors drive other markets: clients are becoming sophisticated clients want transaction and execution research markets are becoming more electronic 34
Development in other assets Electronic Milestone 3 rd Generation Algorithms (Adaptive) 2 nd Generation Algorithms (Arrival Price, Departure Price) Smart Order Routings 1 st Generation Algorithms (TVOL, TWAP, TVOL) Advanced Order Types Limit Orders RFQ Evolutionary Cycle: Equities 32 years Instinet 1976 Futures 16 years SFE 1992 FX 15 years EBS 1993 Fixed Income 9 years TradeWeb 1998 EQUITY FUTURES FX FIXED INCOME 35
In order of maturity 1. Equities poster child for agency algo execution 2. Equity-linked products: futures and options equity players are expanding there 3. Foreign exchange electronic trading is widespread, algos coming 4. Fixed income most traditional, furthest from algo development product complexity combines with market 36
ASSET MANAGEMENT GROUP Best Execution Guidelines for Fixed-Income Securities WHITE PAPER J ANUARY 2008... It is clear that the duty to seek best execution imposed on an asset manager is the same regardless of whether the manager is undertaking equity or fixed income transactions. The characteristics of the fixedincome markets present a manager with practical difficulties, though, in assessing and documenting fixedincome best execution not faced when undertaking equity transactions. 37
Larry Tabb, Advanced Trading, April 2008 The opportunity may be right to open up the fixedincome markets to alternative execution... the industry may need to migrate from a traditional OTC market without a central venue to a more traditional exchange model in which there are not only liquidity providers making two-sided markets but a vibrant agency model as well. In this model, investors work with brokers on a commission-basis and trade on behalf of their clients in a more transparent and open community. 38
Summary Lots of interesting problems in adaptivity Come directly from real challenges Brokers play important role 39