# Lin, Sanger and Booth (1995)

A spread decomposition model for estimating adverse selection.

## Definition

Lin, Sanger and Booth (1995) develop a spread decomposition model based on trade direction that follows Huang and Stoll (1994), Lin (1993) and Stoll (1989). They define the signed effective half spread $z_k$ as the positive (negative) difference between transaction price and the bid-ask midpoint for buyer (seller) initiated orders. The asymmetric information cost is $\lambda$ of the effective half spread $z_k$, and $\lambda z_k$ is the quote revision. For stock $i$ at day $t$, the adverse selection component $\lambda_{i,t}$ as a proportion of the spread is the slope coefficient estimated from the following regression model:

$$ \Delta M_{i,t,k+1}=\delta_{i,t}+\lambda_{i,t} z_{i,t,k}+ e_{i,t,k+1} $$

where $\Delta M_{i,t,k+1}$ is the change of quoted bid-ask midpoint from kth to (k+1)th transaction, and $z_{i,t,k}$ is the signed effective half spread defined previously. $\lambda_{i,t}$ as a proportion should be bounded by zero and one.

As in Lin, Sanger and Booth (1995), the logarithms of the transaction price and quote midpoint are used in order to generate a continuously compounded rate for the dependent variable and a relative effective spread for the independent variable.

## Source Code

This example Python code is not optimized for speed and serves only demonstration purpose. It may contain errors.

```
# LinSangerBooth1995.py
import numpy as np
name = 'LinSangerBooth1995'
description = 'Adverse selection measure as in Lin, Sanger and Booth (1995)'
vars_needed = ['Price', 'Mid Point', 'Direction']
def estimate(data):
log_midpt = np.log(data['Mid Point'])
diff_log_midpt = np.diff(log_midpt)
signed_effective_sprd = data['Direction'] * \
np.abs(np.log(data['Price']) - log_midpt)
# lag signed effective spread
x = np.vstack([np.ones(len(diff_log_midpt)),
signed_effective_sprd[:-1]]).T
try:
coef, _, _, _ = np.linalg.lstsq(x, diff_log_midpt, rcond=None)
except np.linalg.LinAlgError:
return None
else:
return coef[1]
```