Quoto

Learn / Library / Market making

Matching order books

Market makingMedium

Venue A offers to sell units at and units at . Venue B offers to buy units at and units at . A trader buys from A and sells to B, taking every trade that has a positive profit and matching the best prices first. What is the total profit?

Checking an answer needs JavaScript. The hint and the solution open without it.

A whole number, a decimal, a fraction like 3/8 or a percent.

Hint

Pair the cheapest offers with the highest bids until the gap closes.

Solution
  1. The first units are bought at and sold at , earning .
  2. The next units are bought at and sold at , earning .
  3. The next offer at is above the remaining bid at , so the total profit is .

Answer: