Probability of Informed Trading (PIN)
In the market microstructure literature, Easley et. al. (1996) proposed a trading model that can decompose the bid-ask spread. The most commendable aspect of this model is the introduction of the "Probability of Informed Trading," or PIN, which serves as a means of measuring the informational component in the spread. As the name suggests, under ideal conditions, PIN can reflect the probability of informed trading in a market with market maker. In this article, I attempt to comb through the modeling process in the Easley et. al. (1996) paper and discuss how to handle the objective function in maximum likelihood estimation to avoid overflow errors during computation.
Table of Contents
Assume that the buy and sell orders of informed and uninformed traders follow independent Poisson processes, and the following tree diagram describes the entire trading process:
- On each trading day, there is a probability of that new information will appear, and obviously a probability of that there will be no new information.
- The probability of new information being bearish is , and the probability of it being bullish is .
- If the news is bearish, the arrival rate of buy orders on that day is , and the arrival rate of sell orders is .
- If the news is bullish, the arrival rate of buy orders on that day is , and the arrival rate of sell orders is .
- When there is no new information, the arrival rate of both buy and sell orders is .
Next, assume that the market maker is a Bayesian, that is, he will update his understanding of the overall market status, especially whether there is new information on that day, by observing trades and trading rates. Suppose each trading day is independent, is the market maker's prior probability perception, where represents no new information, represents bearish bad news, and represents bullish good news, so .
Let be the event of a sell order arriving at time , and be the event of a buy order arriving at time . Also, let be the updated probability perception of the market maker after observing a sell order arriving at time based on the existing information. Then, according to Bayes' theorem, if there is no new information at time and the market maker observes a sell order, the posterior probability should be:
Similarly, if there is bearish information and the market maker observes a sell order at time , the posterior probability should be:
If there is bullish information and the market maker observes a sell order at time , the posterior probability should be:
Thus, the expected zero-profit bid price at time on day should be the conditional expectation of the asset value based on historical information and observing sell order at this time, that is,
Here, is the value of the asset at the end of day , and let the asset value be when there is positive news, when there is negative news, and when there is no news, with .
At this point, the ask price should be:
Let's associate these bid and ask prices with the expected asset value at time . Considering that the conditional expectation of the asset value at this time is:
we can write the above and as:
Thus, the bid-ask spread is , which is:
This indicates that the bid-ask spread at time is actually:
The probability of a buy order being an informed trade the expected loss due to the informed buyer + the probability of a sell order being an informed trade the expected loss due to the informed seller
Therefore, the probability that any trade at time is based on asymmetric information from informed traders is the sum of these two probabilities:
If no information event occurs () or there are no informed trades (), both and the bid-ask spread should be zero. If the probabilities of positive and negative news are equal, i.e., , the bid-ask spread can be simplified to:
And our measure is simplified to:
After the model is established, let's talk about the parameter estimation of this model. The parameters we need to estimate, , are actually very difficult to estimate. This is because we cannot directly observe them, and can only observe the arrival of buy and sell orders. In this model, the daily buy and sell orders are assumed to follow one of the three Poisson processes. Although we don't know which process it is specifically, the overall idea is: more buy orders imply potential good news, more sell orders imply potential bad news, and overall buying and selling will decrease when there is no new information. With this idea in mind, we can try to estimate using the maximum likelihood estimation method.
First, according to the trading model shown in the diagram, assume that there is bad news on a certain day, then the arrival rate of sell orders is , which means both informed and uninformed traders participate in selling. The arrival rate of buy orders is , that is, only uninformed traders will continue to buy. Therefore, the probability of observing a sequence of trades with buy orders and sell orders in a period of time is:
If there is good news on a certain day, the probability of observing a sequence of trades with buy orders and sell orders in a period of time is:
If there is no new information on a certain day, the probability of observing a sequence of trades with buy orders and sell orders in a period of time is:
So, the probability of observing a total of buy orders and sell orders on a trading day should be the weighted average of the above three possibilities, and the weights here are the probabilities of each possibility. Therefore, we can write out the likelihood function:
Hence, the objective function of the maximum likelihood function is:
The problem seems to end here. With the objective function, it seems to be all set as long as you program it and pay attention to the parameter boundaries. However, the real challenge comes next, because if you really write the objective function like this and run it, you will inevitably encounter an overflow error. After all, this function is filled with powers and factorials. Even if the time element is chosen very small, some highly liquid assets will still have hundreds of transactions within a few seconds. Therefore, both , , and can beautifully crash your program. So, further processing of the objective function here is extremely important.
By observing equation (16), the three terms in the likelihood function can actually extract a common factor ! After extracting this common factor, you can also substitute into it. The transformed likelihood function, after taking the logarithm, will be in the form:
Now, since the last term does not affect the parameter estimation at all, it can be safely excluded. The remaining part can perfectly avoid overflow. Personally, I think the brilliant move here is the introduction of , which prevents the overflow error caused by .