**Also available as eBook on:**

**Handbook of Price Impact Modeling** provides practitioners and students with a mathematical framework grounded in academic references to apply price impact models to quantitative trading and portfolio management. Automated trading is now the dominant form of trading across all frequencies. Furthermore, trading algorithm rise introduces new questions professionals must answer, for instance:

- How do stock prices react to a trading strategy?
- How to scale a portfolio considering its trading costs and liquidity risk?
- How to measure and improve trading algorithms while avoiding biases?

Price impact models answer these novel questions at the forefront of quantitative finance. Hence, practitioners and students can use this Handbook as a comprehensive, modern view of systematic trading.

For financial institutions, the Handbook’s framework aims to minimize the firm’s price impact, measure market liquidity risk, and provide a unified, succinct view of the firm’s trading activity to the C-suite via analytics and tactical research.

The Handbook’s focus on applications and everyday skillsets makes it an ideal textbook for a master’s in finance class and students joining quantitative trading desks. Using price impact models, the reader learns how to:

- Build a market simulator to back test trading algorithms
- Implement closed-form strategies that optimize trading signals
- Measure liquidity risk and stress test portfolios for fire sales
- Analyze algorithm performance controlling for common trading biases
- Estimate price impact models using public trading tape

Finally, the reader finds a primer on the database kdb+ and its programming language q, which are standard tools for analyzing high-frequency trading data at banks and hedge funds.

Authored by a finance professional, this book is a valuable resource for quantitative researchers and traders.

Preface

**I Introduction**

**Introduction to Modeling Price Impact**- The Handbook’s Scope
- Introduction
- What is Price Impact? Why do Traders Care About It?
- The Causality Challenge for Price Impact Models
- Four Core Modeling Principles
- A Brief History of Price Impact Models
- Trading Terminology
- Trading Strategies
- Trading Data: Fills, Orders, and Binned Data
- Trading Signals, Alpha Signals
- Intended, Predicted, and Realized Data
- Basic Trading Parameters
- Order Slippage, Arrival Price
- Alpha Slippage, Slippage Due to Price Impact
- Trading Experiments: A-B Tests and Back Tests
- Outlining Applications
- Transaction Cost Analysis (TCA) for Sell-Side Execu-
- Portfolio Optimization for Buy-Side Statistical Arbi-
- Liquidity Reports for Risk Management Teams
- Portfolio Consolidation Analysis for Senior Manage-
- Roadmap
- What to Expect from the Handbook
- A Brief Summary of Each Chapter

tion Teams

trage Teams

ment

**II Acting on Price Impact**

2 Mathematical Models of Price Impact

2.1 A Pedagogical Example

2.2 Mathematical Setup

2.2.1 Defining Price Impact and Instantaneous Transaction Costs

2.2.2 Establishing P & L in Discrete Time

2.2.3 Examples of Microstructure Assumptions

2.2.4 Reduced Form Models

2.3 The Obizhaeva and Wang (OW) Propagator Model

2.3.1 An Optimal Execution Problem

2.3.2 Closed- Form Optimal Trading Strategy

2.3.3 Intuition Behind the Optimal Trading Strategy

2.4 Extensions Related to the Objective Function

2.4.1 Alpha Signal

2.4.2 Two- Sided Trading

2.4.2.1 Bid- ask Spread as Regularization Term

2.5 Extensions Related to Time

2.5.1 Time Change

2.5.2 Stochastic Push

2.5.2.1 Sensitivity Analysis in Impact Space

2.5.3 Linear Propagator Models

2.6 Extensions Related to External Impact

2.6.1 Microstructure Assumptions

2.6.2 Optimal Trading Strategy with External Impact

2.6.3 Local Concavity

2.6.4 Global Concavity

2.7 Price Manipulation Paradoxes

2.7.1 Constraints on Price Impact Models

2.7.2 Extension to Locally Concave Models

2.7.3 Constraints on Volume Predictions

2.8 Summary of Results

2.8.1 Generalized OW Impact Model

2.8.2 Generalized OW Impact Model with External Impact

2.8.3 Control Problems

2.8.4 Price Manipulation Bounds

2.9 Exercises

3 Applications of Price Impact Models

3.1 A Pedagogical Example

3.2 Optimal Execution

3.2.1 Pre-Trade Cost Model

3.2.1.1 Idealized Optimal Execution Problem

3.2.1.2 Communication with the Portfolio Team

3.2.1.3 Implied Alpha

3.2.1.4 The Square- Root Law

- Including Alpha Signals in the Execution Strategy
- Alpha Latency
- Reactive Execution Schedule
- Allowing for Tactical Deviations at the Microstructure Level
- Quantifying Deviations’ Impact
- Block Trades and Auctions
- Changing the Execution Strategy when New Orders Arrive
- A Simulation Example
- Summary

- Transaction Cost Analysis (TCA)
- TCA Best Practices
- Control for Basic Trading Parameters
- TCA Predictions
- An Experiment to Size Orders Correctly
- Clean-Up Costs for Partial Executions
- An Experiment for Consecutive Orders
- A Simulation to Improve High-Touch Trading
- Summary of Results
- Optimal Execution Without Intraday Alpha
- Pre-Trade Cost Model
- Implied Alpha
- The Case of Sizable Orders
- Implied Alpha’s TCA Implication
- Clean-up Costs
- Intraday and Low-Latency Alphas
- Intraday Alpha
- The Cost of Tactical Algorithms
- Optimal Execution for Multiple Orders
- Combining Order Executions
- TCA for Consecutive Orders
- Exercises

**Further Applications of Price Impact Models**- A Pedagogical Example
- Statistical Arbitrage
- Using External Impact as an Alpha Signal
- Cont, Cucuringu, and Zhang’s Alpha Signal
- Model Architecture
- Extensions
- Adjusting Regression Techniques for Liquidity
- Using Price Impact for Simulation
- Waelbroeck’s Simulation Environment
- Business Applications of a Market Simulator
- Portfolio and Risk Management
- How Price Impact Distorts Accounting P&L and Perceived Risk
- Expected Closing P&L
- P&L Bias Examples
- P&L Bias in Steady State
- General Implications and Actions
- Portfolio Management Implications
- Liquidity Risk Implications
- Senior Management Implications
- Simulating Fire Sales
- Liquidation Without Fire Sale
- Liquidation With Fire Sale
- Combining Two Portfolios’ Trading
- Theory in the Case Without Mutual Information
- Theory in the Case With Mutual Information
- Empirical Simulation Approach
- Summary of Results
- Alpha Research
- Market Simulator
- Liquidity Risk Management
- Combining Two Portfolios’ Trading
- Exercises
**An Introduction to the Mathematics of Causal Inference**- A Pedagogical Example
- A Technical Primer on Causal Inference
- Causal Structures
- Do-Calculus
- Simpson’s Paradox
- Identifiability of Causal Formulas
- Methods to Reduce Causal Biases
- Standard A-B testing
- Causal Regularization
- Regularization in the Predictive Case
- Regularization in the Causal Case
- Summary of Results
- Causal Structures and Models
- Do-Calculus
- A-B Testing
- Interventional Data
- Causal Regularization
- Exercises
**Dealing with Biases when Fitting Price Impact Models**- A Pedagogical Example
- Chapter Roadmap
- A Non-Technical Primer on Causal Inference
- Applying Causal Inference to Trading
- A Template for Dealing with Causal Biases
- Prediction Bias
- Definitions
- Actions and Counterfactuals
- Why Impact Research is Complex
- Experiments and Regularization
- A Simulation Example
- Synchronization Bias
- Definitions
- Actions and Counterfactuals
- Experiments
- Implementation Bias
- Definitions
- Actions and Counterfactuals
- Experiments and Regularization
- Issuer Bias
- Definitions
- Actions and Counterfactuals
- Experiments and Regularization
- Concluding Thoughts
- Summary of Results
- Prediction Bias
- Synchronization Bias
- Implementation Bias
- Issuer Bias
- Exercises
**Empirical Analysis of Price Impact Models**- A Pedagogical Example
- Methodology
- Pre-Processing the Event-Based Data
- Definition of the Base Features and Binned Data
- Definition of the Time Kernel and Price Impact Computation
- Definition of the Prediction Horizon and Training Samples
- Definition of the Testing and Validation Samples
- Review of the Models in the Literature
- The Order Flow Imbalance (OFI) Model
- The Original OW Model
- The Locally Concave Bouchaud Model
- The Reduced-Form Model
- The Globally Concave AFS Model
- Empirical Model Comparisons
- Across Timescales
- Across Time of Day
- Across Clocks
- Across Stocks
- The Magnitude of Price Impact
- Cross-Impact
- Causal Bias for Cross-Impact
- Price Impact for Factor Trading
- Causal Graph for the EigenLiquidity Model
- Distinction Between do(
*Q*) and do(_{i}, Q_{j}*Q*¯) - Counterfactuals Under
- Cross-Impact for Risk-Management and Fac-
- Price Impact for Pairs Trading
- Bonds in Schneider and Lillo (2019)[200]
- Options in Said et al. (2021)[197]
- Commodity Futures in Tomas, Mastromatteo,
- Rosenbaum and Tomas (2021)[193]
- Sparse Equities Cross-Impact in Cont, Cu- curingu, and Zhang (2021)[71
- Summary of Results
- Discrete Formulas for Price Impact Models
- The Original OW Model
- The Locally Concave Bouchaud Model
- The Reduced-Form Model
- The Globally Concave AFS Model
- Summary Table
- The EigenLiquidity Model
- Exercises

**III Measuring Price Impact**

tor Research

and Benzaquen (2022)[217]

**IV Appendix**

**A Using Kdb+ for Trading Models**

- A Gentle Introduction to Kdb+
- What is Kdb+ and Why Does It Matter to Quants?
- First Steps in Kdb+
- Basic Operations in Q
- Q does not Follow the Traditional Order of Operations
- Assignments and Other Basic Operators
- Atoms, Lists, and Dictionaries
- Strings and Symbols
- Functions and Loops
- Tables are Flipped Dictionaries of Lists
- Setting Up a Small Database
- A Cheat-Sheet for Quantitative Trading
- Data Wrangling in Kdb+
- Qsql Queries
- Joins
- Generalizing Qsql
- Long or Wide Format?
- Vectorized Operations and Parallelism in Kdb+
- An Efficient Implementation of the Generalized OW Model
- Key Mathematical Idea
- Key Algorithmic Idea
- Computing Impact States
- An Efficient Implementation of TCA
- Key Algorithmic Idea
- Computing TCA Returns

**Functional Convergence Theorems for Microstructure**- Or How to Deal with Local Non-Linearities in Microstructure
- Functional Law of Large Numbers
- Functional Central Limit Theorem
- Further Readings
**Solutions to Exercises**

C. 1 Solutions to Chapter 2

C. 2 Solutions to Chapter 3

C.3 Solutions to Chapter 4

C.4 Solutions to Chapter 5

C.5 Solutions to Chapter 6

C.6 Solutions to Chapter 7

**Bibliography**

Index

### Biography

**Dr. Kevin Webster** graduated with a PhD from Princeton University Operations Research and Financial Engineering Department (ORFE). At ORFE, he studied mathematical models applied to high-frequency trading, emphasizing price impact, and market-making models. He previously worked at Deutsche Bank and Citadel and is currently a Visiting Assistant Professor (Visiting Reader) in the Department of Mathematics at Imperial College London.

Dr. Webster created and taught the course, ORF 474 High-Frequency Markets: Models and Data Analysis, as a Visiting Lecturer at Princeton in 2015. His publications include, *The Self-Financing Equation in High Frequency Markets*, *Information and Inventories in High Frequency Trading*, *A Portfolio Manager's Guidebook to Trade Execution*, and *High Frequency Market Making*.

"Kevin Webster has written a remarkable textbook that studies these problems in a uniquely comprehensive manner. To wit, he covers theory, empirics,

andimplementation by bringing together insights developed in a number of different research communities, ranging from Industry Practitioners, Financial Economists, Econophysicists, to Applied Mathematicians. In doing so, Kevin develops the underlying theory in a very accessible manner. He also presents important practical applications beyond optimal trading (such as risk management), which showcase that a good grasp of the mechanics of price impact is an essential part of any modern financial engineer's toolkit."

- Johannes Muhle-Karbe,Imperial College London.Full article: Handbook of Price Impact Modeling (tandfonline.com)