## 1. Introduction

In this post, I replicate the main results from Glosten and Milgrom (1985) using the setup outlined in Back and Baruch (2003). I begin in Section by laying out the continuous time asset pricing framework. I consider the behavior of an informed trader who trades a single risky asset with a market maker that is constrained by perfect competition. Then, in Section I solve for the optimal trading strategy of the informed agent as a system of first order conditions and boundary constraints. Finally, I show how to numerically compute comparative statics for this model.

## 2. Asset Pricing Framework

There is a single risky asset which pays out at a random date . There is an informed trader and a stream of uninformed traders who arrive with Poisson intensity . All traders have a fixed order size of . The model end date is distributed exponentially with intensity .

Let denote the net position of the noise traders up to but not including date and let denote the net position of the informed up to but not including date . The market maker sees an anonymous order flow at each time of so that generates a -field which represents the market maker’s information set.

Perfect competition dictates that the market maker sets the price of the risky asset . Let and denote the bid and ask prices at time .

(1)

Let be the left limit of the price at time . Given that , we can interpret as the probability of the event at time given the information set . The informed trader chooses a trading strategy in order to maximize his end of game wealth at random date with discount rate. Let and let .

(2)

In order to guarantee a solution to the optimization problem posed above, I restrict the domain of potential trading strategies to those that generate finite end of game wealth.

(3)

I then look for probabilistic trading intensities which make the net position of the informed trader a martingale.

At each time , an equilibrium consists of a pair of bid and ask prices,Definition:(4)

as well as a vector of trading intensities,

(5)

such that the prices equal the conditional expectation of the asset value relative to given a sell or buy order and the trading intensities solve the informed agent’s objective function, satisfy the finiteness conditions and are martingales relative to the informed trader’s information set :

(6)

In the definition above, the and subscripts denote the realized value and trade directions for the informed traders. So, for example, denotes the trading intensity at some time in the buy direction of an informed trader who knows that the value of the asset is .

## 3. Optimal Trading Strategies

I now characterize the equilibrium trading intensities of the informed traders. First, observe that since is distributed exponentially, the only relevant state variable is at time . Thus, in the equations below, I drop the time dependence wherever it causes no confusion.

Since the bid and ask prices are conditional expectations, we can compute their values using Bayes’ rule.

(7)

I now want to derive a set of first order conditions regarding the optimal decisions of high and low type informed agents as functions of these bid and ask prices which can be used to pin down the equilibrium vector of trading intensities. Let and denote the value functions of the high and low type informed traders respectively.

No arbitrage implies that for all with and since:Condition 1:(8)

Thus, for all it must be that and . What’s more, and are absorbing points for meaning that while .

The around a buy or sell order, the price moves by jumping from or from so we can think about the stochastic process as composed of a deterministic drift component and jump components with magnitudes and .Condition 2:(9)

The probabilities and can be computed using Bayes’ rule.

(10)

Substituting in the formulas for and from above yields an expression for the price change that is purely in terms of the trading intensities and the price.

(11)

However, via the conditional expectation price setting rule, must be a martingale meaning that .

(12)

At the time of a buy or sell order, smooth pasting implies that the informed trader was indifferent between placing the order or not. For instance, if he strictly preferred to place the order, he would have done so earlier via the continuity of the price process.Condition 3:(13)

It is not optimal for the informed traders to bluff. i.e., a high type informed trader can never increase his value function by selling at time and vice versa for a low type informed trader.Condition 4:(14)

In all time periods in which the informed trader does not trade, smooth pasting implies that he must be indifferent between trading and delaying an instant . There are forces at work here. In each instant , there is a probability that will arrive and the informed trader’s value function will plummet to . This cost has to be offset by the value delaying. For the high type informed trader, this value includes the value change due to the price drift , the value change due to an uninformed trader placing a buy order with probability and the value change due to an uninformed trader placing a sell order with probability . Similar reasoning yields a symmetric condition for low type informed traders.Condition 5:(15)

This combination of conditions pins down the equilibrium.

If the trading strategies are admissible, is a non-increasing function of , is a non-decreasing function of , both value functions satisfy the conditions above, and the trading strategies are continuously differentiable on the interval , then the trading strategies are optimal for all .Proposition:

In the section below, I solve for the equilibrium trading intensities and prices numerically.

## 4. Numerical Solution

In the results below, I set and for simplicity. I compute the value functions and as well as the optimal trading strategies on a grid over the unit interval with nodes. Let denote the vector of prices.

(16)

Let and denote the vector of value function levels over each point in the price grid after iteration . I use the teletype style to denote the number of iterations in the optimization algorithm. denotes the level of the value function at price point after iterations.

(17)

The algorithm below computes , , and . The equilibrium trading intensities can be derived from these values analytically. I seed initial guesses at the values of and .

(18)

Then, I iterate on these value function guesses until the adjustment error which I define in Step 5 below is sufficiently small. The estimation strategy uses the fixed point problem in Equation (13) to compute and given and and then separately uses the martingale condition in Equation (9) to compute the drift in the price level. The algorithm updates the value function in each step by first computing how badly the no trade indifference condition in Equation (15) is violated, and then lowering the values of for near when the high type informed trader is too eager to trade and raising them when he is too apathetic about trading and vice versa for the low type trader. Along the way, the algorithm checks that neither informed trader type has an incentive to bluff.

Below I outline the estimation procedure in complete detail. Code the for the simulation can be found on my GitHub site.

Numerically compute and at each point.Step 1.(19)

I fill in each of the boundary derivatives manually.

(20)

Solve for bid and ask prices using Equation (13).Step 2.(21)

I interpolate the value function levels at and linearly. Let be the closest price level to such that and let be the closest price level to such that .

(22)

Compute using Equation (9).Step 3.(23)

I then plug in Equation (10) to compute and .

(24)

I then use Equation (7) to solve for and in terms of only prices.

(25)

Combining these equations leaves a formulation for which contains only prices.

(26)

At each for , set and ensure that Equation (14) is satisfied. If the high type informed traders want to sell at price , increase their value function at price by .Step 4.(27)

If the low type informed traders want to buy at price , decrease their value function at price by .

(28)

Update and by adding times the between trade indifference error from Equation (15).Step 5.(29)

Evaluate update error.Step 6.(30)