The answers from these two replies seem to contradict each other. The first numerator is bidSize*bidPrice + askSize*askPrice but the second is bidSize*askPrice + askSize*bidPrice.
Does anyone know what I'm missing here?
Edit: I think the 2nd link above is correct formula but I'm likely misreading first link. This because this paper seems to agree with 2nd link: http://home.uchicago.edu/~shim/Papers/HFT-FrequentBatchAuctions.pdf