December 23rd, 2020, 1:12 pm
Have done some of this modeling in the past on Futures. Did not find any papers of interest, just a rule set based on exchange rules, with equities it can become more challenging given the fragmentation.
But really if you are interested in the spread only, and are willing to assume what was shown was "real", regardless of size, its just best offer best bid. If they cross/hit/lift without a cancel event away from that price and bid/offer does not re-bid/re-offer then you lean on last un removed best bid or offer. This of course is reconciled with trades book @Time.
If the source is timestamped/coloed well, things should line up quite well with simple rules.
Of course if you have some more specific questions, post I will try my best to help.