Question about weighted midpoint formula

The answers from these two replies seem to contradict each other. The first numerator is bidSizebidPrice + askSizeaskPrice but the second is bidSizeaskPrice + askSizebidPrice.

Price functions based on order book events

Control for bid/ask bounce in high-frequency trade data?

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

It depends on your goal. Suppose we have a stock whose top-of-book quotes show far more size on the bid than on the ask.

If you want the weighted mid to reflect sentiment at this moment, then certainly the market participants agree that the fair price is less than the mid.

However, if you assume that these participants are informed market makers and your goal is to infer momentum, then the participants believe that the price will revert upwards. I.e., the fair price is higher than the mid.

For trading purposes, I would go with the second one. If I see dealers quoting more on the bid than ask, then I will assume that the price will increase over time, so I want my weighted mid to reflect that.

• I'm thinking of second as well. My goal is say that I have a choice of buying stock A or B. My time horizon for the trade is 1 day and I like A or B equally but am trying to reduce transaction cost as much as possible so am wondering if order book provides any more information as to which stock to buy. Nov 18, 2013 at 0:02
• I disagree with going for one. Try both and see which is better out of sample. Nov 18, 2013 at 14:49
• Of course, that comment of mine depends on the purpose of using it .. and is only true if the OP's objective is to forecast accurately which may not be the case. Nov 18, 2013 at 15:36
• I would add that the best bid/offer doesn't reflect the depth of the market. If the size is all on the bid, then the small best ask size is likely masking a larger size at a higher price. Without that, the mid price would be higher, so the 2nd would be a better bet. So the depth of the book makes all the difference here. Nov 22, 2013 at 9:18