Trading · Order book and P&L · Medium
An average no worse than 50.05
The offers in a stock's order book, best price first, are 50.00 × 400, 50.05 × 600 and 50.10 × 1,000 (price in dollars × shares). A market order to buy fills against the offers in that order. What is the largest number of shares you can buy with one market order if the average price you pay must be no more than 50.05 dollars?
Answer and solution
Answer
1400
Solution
The average stays at or under 50.05 for as long as the savings on the cheap shares cover the excess on the dear ones.
The first 400 shares save 400 × 0.05 = 20 dollars against 50.05, and the next 600 at 50.05 change nothing. Each share at 50.10 costs 0.05 too much, so you can take 20/0.05 = 400 of them. The largest order is 400 + 600 + 400 = 1,400 shares.
Order book and P&L comes up in 3 firms' roundsCitadel Securities · Tower Research · IMC
These 4 rounds ask this kind of problem live, with follow-ups. Every round on every track is in Premium.