Start a new topic

Please clarify the order matching algorithm

As the markets on PredictIt become more liquid, it is of more significant concern that all participants are aware of the underlying order matching algorithm. Is it FIFO? Pro Rata / Allocation? Some combination of these? I don't necessarily have an opinion on which one is "right" but I think we at least need to know what method is being used so that we can discuss it.

The link below provides an outline of the most common order matching algorithms.

1 person likes this idea

From my experience, It is FIFO for bid to ask contract matching 

We use FIFO.

1 person likes this

Excellent Dave. Thanks for the clarification!

Do you mean the order in which bids are met, or in which sales are made on shares you own?

FIFO stands for "first in, first out". It simply means that we will sell off your shares in the same order that you bought them. When you place an offer to sell shares, the platform will scan to see which shares were purchased first, regardless of the price they were purchased at, and sell them in the same order they were purchased. This is the method used on regulated U.S. exchanges. PredictIt has adopted the same method.

Dave - you're talking about two different mechanisms here. The accounting method used for computing profit / fees can be different from the order matching algorithm. Do you use FIFO for both mechanisms? Allow me to clarify what I mean.

If you saw m4ry73's separate question thread, they are asking about the accounting method used for computing fees and profit. Let's say I buy 100 shares at $0.50, and subsequently buy 50 shares at $0.60. Under FIFO, if I go to sell 110 shares at $0.70, all 100 of my $0.50 shares will be sold first (resulting in 100 x $0.20 = $20 gross profit and x 10% = $2 fees for $18 net profit). After that set has been completely exhausted, the final 10 shares will be 10 of my $0.60 shares (resulting in 10 x $0.10 = $1.00 gross profit and x 10% = $0.10 fees for $0.90 net profit). This makes sense and was known publicly already.

I started this thread, however, to determine a much different piece of the puzzle - namely, how resting orders get matched in the market. So for example, let's say there are 100 shares of Yes available for purchase in a market for $0.50. These are resting orders - orders that were placed by somebody but were not immediately matched. If I, as an outsider to this market, go in and place an order to buy up all 100 shares @ $0.50, I will be matched to these resting orders immediately, the order will execute, and the shares will just appear in my account. Hooray!

The tricky part, from a trader's perspective, comes in with WHO placed those resting orders and when. Who did my shares come from? Let's say there were two people who placed those orders:

Person A decided to sell 96 Yes @ $0.50 on September 24.
Person B decided to sell 4 Yes @ $0.50 on September 25.

If I only wanted to buy 50 shares of Yes @ $0.50, whose order(s) would I be matched to? Your "this is the method used on regulated U.S. exchanges" declaration is not 100% accurate if you are referring to the order matching algorithm. See here:

If FIFO is the order matching algorithm used, then my buy order of 50 would match against ONLY Person A's order, because he got there first.

If Pro-Rata is the order matching algorithm used, then my buy order of 50 would match against both Person A and Person B:

96% x 50 = 48 of my shares would be purchased from Person A
4% x 50 = 2 of my shares would be purchased from Person B.

The effect of a Pro-Rata order matching algorithm, in disregarding the time of order submission, is that smaller players (Person B) can't be "blocked out" of participating in the market by larger players who have more capital (Person A). If somebody placed a resting order of 5000 shares under a FIFO order matching algorithm, it could take quite a while to cycle through those and get to the next person's resting order, perhaps long enough that the others may be completely unable to participate.

And to reiterate, it is entirely possible that you could have a Pro-Rata order matching algorithm while still doing your profit/fee accounting with FIFO. Or you could do FIFO order matching with LIFO accounting, or LIFO order matching with FIFO accounting. The mechanisms are very distinct and separate.

Am I making any sense? Is it FIFO for both? Just want to be 100% clear that the correct information is out here.

6 people like this

Good question! I don't know why this was never clarified.

1 person likes this
It's done by price time priority. So if I'm first to offer shares at 50 cents and then someone else offers 50cents, mine are filled first.

Can someone from PredictIt please chime in here? I'm still curious.

@ChillTomG do you work for PredictIt or is this just based on your observations? I tend to agree with you but I want PredictIt to officially address the specific distinctions referenced above.

Login to post a comment