Family 9 of 9 · 10 formulas · each in 3D
Market making and execution
The order book, mid and microprice, spreads, inventory skew, price impact, VWAP and the cost of trading. This is where models meet the market. A good signal executed badly loses money.
Showing all 10
- 01beginner
Mid price
The mid price is the average of the best bid and the best ask. It is the simplest estimate of what the asset is worth at this instant.
Used by market maker: Centres its own bid and ask around the mid (or a better fair price) and measures its edge on each fill against it.
Full lesson - 02intermediate
Microprice (size-weighted mid)
The microprice weights each side's price by the size on the opposite side. When the bid queue is much bigger than the ask queue, the price is more likely to tick up, so the fair value leans towards the ask.
Used by market maker: Quotes around the microprice instead of the mid, so it does not sell cheaply just before the thin ask is taken out.
Full lesson - 03beginner
Bid–ask spread in basis points
The spread is the gap between the best price to buy and the best price to sell. Dividing by the mid turns it into a percentage cost you can compare across cheap and expensive stocks.
Used by market maker: Earns the spread when it buys on the bid and sells on the ask, and widens it when risk or volatility rises.
Full lesson - 04intermediate
Order-book imbalance
Imbalance compares the shares waiting to buy with the shares waiting to sell near the top of the book. Near +1 the book is bid-heavy, near −1 it is ask-heavy, and 0 means balanced.
Used by market maker: Skews quotes away from the heavy side, pulling back a bid that sits in front of a large ask queue.
Full lesson - 05advanced
Reservation price (Avellaneda–Stoikov)
A market maker holding inventory should centre its quotes away from the mid, below it when long and above it when short. The shift grows with inventory, risk aversion, variance and the time left to hold.
Used by market maker: Skews both quotes by the reservation-price shift, so fills naturally push inventory back towards zero.
Full lesson - 06advanced
Optimal spread (Avellaneda–Stoikov)
The best total spread for a market maker has two parts: a charge for the inventory risk it takes on, and a part set by how quickly fills dry up as quotes move away from the mid.
Used by market maker: Sets its quote width from estimates of σ and k, widening when volatility rises or when fills are insensitive to price.
Full lesson - 07advanced
Kyle's lambda (price impact of order flow)
Kyle's lambda measures how much prices move per unit of net buying. It is the slope of price changes regressed on signed order flow, and a low lambda means a deep, liquid market.
Used by quant researcher: Estimates lambda per stock and time of day as a measure of liquidity and of how informed the flow is.
Full lesson - 08intermediate
Square-root law of market impact
The price impact of a large order grows with the square root of its size relative to daily volume, scaled by volatility. Doubling the order raises impact by about 41%, not 100%.
Used by execution trader: Estimates the cost of an order before trading it and decides how many days to spread it over.
Full lesson - 09beginner
VWAP (volume-weighted average price)
VWAP is the average price over a period, where each price counts in proportion to how much traded at it. Busy periods count more than quiet ones.
Used by execution trader: Runs VWAP algorithms that split an order to follow the day's volume curve, aiming to trade at the day's VWAP.
Full lesson - 10intermediate
Implementation shortfall
Implementation shortfall is the gap between the price when you decided to trade and the price you actually got. Trading fast pays more impact; trading slowly lets the price drift away. The best speed balances the two.
Used by execution trader: Chooses how aggressively to work an order by comparing impact against the expected drift.
Full lesson
Nothing matches. Try a shorter word or pick "All".
Rather not code the maths yourself? Describe your trading idea and let AI build the bot.
Build a bot with AgenKitEvery model is drawn from the formula's own code, so what you see is the exact maths. Models simplify markets on purpose. This is education, not financial advice.