I am building a custom hash implementation for storing NASDAQ ITCH order messages. Obviously this is keyed on the order reference number and I am wondering if these numbers are sequential, random or exhibit any interesting characteristics in their distribution.

The hash table will be on a relatively low memory device and knowing these characteristics will allow me to efficiently optimise the datastructure.

  • $\begingroup$ This question is very similar to your previous one. $\endgroup$ Mar 22, 2012 at 1:55
  • $\begingroup$ The only thing you're guaranteed is that they are day unique. Anything else would be heuristic, which I'd urge you to try to measure yourself if you think it is important. $\endgroup$ Mar 22, 2012 at 3:11
  • $\begingroup$ @chrisaycock Similar although the previous one was volume, this one refers to the order IDs. I have added "reference" to the question to try and make this more clear. $\endgroup$ Mar 22, 2012 at 11:17
  • $\begingroup$ @LouisMarascio I may have to although this probably wont be possible as its a purely academic project. $\endgroup$ Mar 22, 2012 at 11:18
  • $\begingroup$ No offense, but I'll never buy that optimizing the hash map on NASDAQ's order id's is a purely academic project. $\endgroup$
    – LazyCat
    Mar 22, 2012 at 13:03

1 Answer 1


I don't work with ITCH, but I would do the following:

1) ask the data provider.

2) whenever a new order arrives, record it's ID separately, and then analyze for a pattern.

Most probably they are sequentially growing numbers per instrument.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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