Cross-weight the two quoted prices
Let b be best bid, a best ask, qb bid quantity, and qa ask quantity. The weighted midpoint is m = (a × qb + b × qa)/(qb + qa). Ordinary midpoint is (a + b)/2. With positive quantities and a valid spread, the weighted value lies between the quotes. Bid quantity weights the ask price, while ask quantity weights the bid price; weighting each price by its own side would reverse the intended queue-imbalance direction.
Calculate an imbalanced quote example
Suppose the best bid is 100 with quantity three and the best ask is 102 with quantity one. Ordinary midpoint is 101. The proxy is (102 × 3 + 100 × 1)/4 = 101.5. If both displayed quantities become two, the proxy returns to 101 even though neither quoted price changes. These are hypothetical quote units, and the result is a weighted reference rather than an available trade at 101.5.
A snapshot omits queue behavior
Displayed size may be canceled, replenished, hidden elsewhere, or stale before an order reaches the venue. The formula ignores deeper levels, trade arrival rates, queue priority, and fees. It should reject crossed quotes and invalid quantities rather than manufacturing an apparently meaningful value. Stoikov's research explicitly distinguishes a fitted micro-price from the weighted midpoint. Use this transparent proxy to inspect an input snapshot, then keep any prediction or execution claim separate from the arithmetic.