Перейти к содержимому

Limit and Market Orders: How Deep to Post, When to Cross | Algorithmic & HFT Ch. 8

Order of Randomness

0:00 / 0:00

Limit and Market Orders: How Deep to Post, When to Cross | Algorithmic & HFT Ch. 8

9 просмотров · 2 нед. назад
Order of Randomness
22 подписчика
9 просмотров · 2 нед. назад
A seller has five shares to sell in the next sixty seconds. A market order sells at once but pays the half-spread; a limit order posted above the midprice earns more when it is filled, but it may not be filled before the clock runs out. How deep should the order be posted, and when is it worth giving up and crossing the spread with a market order? This lecture builds the answer step by step. We start from the fill probability of a limit order and the book that produces it, set up the model with a Brownian midprice and a thinned Poisson clock of market buy orders, and write the dynamic programming equation. The price drops out, an exponential change of variables turns the nonlinear system into a linear ladder, and the optimal depth comes out in closed form. We then add a risk-averse seller and the option to hit the bid with market orders, solve the resulting quasi-variational inequality exactly for one and two shares and numerically for ten, and check every strategy with exact event-driven simulations. What you will learn: why the fill probability of a limit order is exp(-κδ) and why the static best depth is 1/κ how one Bellman step gives the depth δ* = 1/κ + h(t,q) - h(t,q-1), with the midprice and its volatility dropping out how the substitution ω = exp(κh) linearises the problem and gives a closed form as a Poisson-weighted polynomial why exponential utility is equivalent to a running inventory penalty φ = σ²γ/2 how market orders add a stopping rule: execute when the shadow cost of a share equals the half-spread, with a depth floor of 1/κ - ξ how to track a target schedule instead of simply liquidating what breaks when κ, the fill law or the no-adverse-selection assumption is wrong The lecture goes beyond the textbook: it derives steps the book only states, solves the four exercises with numbers, and checks the printed formulas, with the slips we found marked on screen. CHAPTERS 0:00 Selling five shares in a minute: limit or market? 6:57 The fill probability of a limit order 15:04 The limit-order-only model 22:24 The dynamic programming equation and the depth 33:00 A linear ladder and the closed-form solution 43:48 How the optimal depth behaves 53:22 Exact simulation of the limit-order strategy 1:05:33 Exponential utility and risk aversion 1:16:43 Adding market orders: the quasi-variational inequality 1:26:56 Closed forms for one and two shares 1:39:54 Solving the ladder of inequalities for ten shares 1:50:25 Simulating limit and market orders together 2:01:47 Tracking a target schedule 2:11:41 The four exercises solved with numbers 2:21:17 Robustness: what breaks when assumptions fail 2:30:34 Take-home rules of thumb and open questions Based on chapter 8 (Optimal Execution with Limit and Market Orders) of "Algorithmic and High-Frequency Trading" by Álvaro Cartea, Sebastian Jaimungal, José Penalva (Cambridge University Press, 2015). This is an independent educational explainer: not affiliated with or endorsed by the authors or the publisher. Not financial advice. Animations are made with manim; all simulations shown were run for this video; narration is a synthetic text-to-speech voice. #OptimalExecution #AlgorithmicTrading #QuantFinance #LimitOrderBook