Forums  > Basics  > Reverse-engineering aggressive orders from ITCH feed  
     
Page 1 of 1
Display using:  

trialanderror


Total Posts: 48
Joined: Feb 2019
 
Posted: 2020-03-17 14:01
I need to reconstruct aggressive orders from the ITCH feed. I have to find some good (possible to argue for being correct) solution as I am writing my thesis and counting aggressive orders and their initial volume is an important part of the analysis. What I was thinking about doing was to make an assumption on the matching engine, specifically to assume that "E"-messages following each other with 1 ns between them come from the same aggressive order. After emails with NASDAQ I have been informed that this assumption is not advisable, but I don't expect them to tell me how their engine works either.

The (relevant) data points I have for each message packet are:
- Timestamp
- Messagetype
- OrderId
- Price
- Volume
- MatchId

Tips? Do you think the 1 ns idea could work? This is regarding the Stockholm stock exchange.

Nous promettons selon nos espérances, et nous tenons selon nos craintes.

EspressoLover


Total Posts: 446
Joined: Jan 2015
 
Posted: 2020-03-17 17:52
> specifically to assume that "E"-messages following each other with 1 ns between them come from the same aggressive order... I have been informed that this assumption is not advisable

I can't comment on Stockholm specifically, but I have experience with similar ITCH systems. The timestamps are based on the matching engine event. So the entire marketable quantity of an order should have the same timestamp. Even if the messages spill across multiple MoldUDP packets. Subsequent orders represent a new matching engine event, with a different wall clock.

So, your assumption should hold. E-messages share a timestamp if and only if they belong to the same marketable order. The only time this may not be true is during an auction. During the cross, many orders may get executed on the same matching engine event. Also be mindful to distinguish the marketable and resting part of an order. I may enter a limit buy for 2000 shares against an ask of 1500 shares. 1500 would be executed at arrival. Then 500 would rest on the book at the bid, which may get crossed at a later time.

One way to empirically verify that your ITCH system behaves like mine is to check for add (type-A) messages with overlapping timestamps. Assuming, your order book doesn't support mass-quote functionality, then each new OUCH message should result in at most one add message on the ITCH feed. If you see A-messages with overlapping timestamps, then that tells you the timestamps aren't coming from matching engine event time.

Good questions outrank easy answers. -Paul Samuelson

trialanderror


Total Posts: 48
Joined: Feb 2019
 
Posted: 2020-03-17 19:56
Just checked A-messages, no overlaps except for at the opening cross.

I am aware of the issue of aggressive orders splitting into executed/passive when entering a higher volume than what is available at the quotes. I could look for an E-message and an A-message following within 1 ns for those. Is it appropriate to apply also for limit orders walking up the book do you think?

Nous promettons selon nos espérances, et nous tenons selon nos craintes.
Previous Thread :: Next Thread 
Page 1 of 1