Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

What is an efficient data structure to model order book of prices and quantities to ensure:

  1. constant look up
  2. iteration in order of prices
  3. retrieving best bid and ask in constant time
  4. fast quantity updates
share|improve this question
add comment

1 Answer 1

Since Quant Cup 1's objective was an efficient price/time matching engine, the data structure of the winning implementation might partly be what you are looking for.

Else the setup of LOBSTER is supposed to be quick.

share|improve this answer
    
Nice. I was thinking of a simple array based implementation. The best implementation in Quant Cup does something similar. –  Sam Hayen Jul 10 '12 at 20:23
    
However, note that it will be less optimal when price levels are sparse and we care about every price level. –  Sam Hayen Jul 10 '12 at 20:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.