Garman (1975)

http://dx.doi.org/10.1016/0304-405X(76)90006-4

Clear introductory model that started the field.

Model

Monopolist market maker, single lot trades, supply and demand curves represent memoryles rates of trading (hence an exponential / Poisson process).

Results

For a driftless market maker supply rate and demand rate should be the same. Then the ideal spread is the one that maximizes spread times rate $(a - b) (S(b) + D(a))$.

Amihud-Mendelson (1986)

https://doi.org/10.1016/0304-405X(86)90065-6

Hard to read, functions defined only implicitly.

Model

Same as Garman, but dynamic bid-ask based on inventory.

Results

You should skew but not over midpoint.

Own work

Actually numerically solving for the optimal spread for each inventory level is not trivial. You have to optimize over a function of the steady state of the dynamical system. Using pytorch, the important part is to get a calculation of the steady state with stable gradients:

  • Using torch.linalg.lstsq to solve the equation \( S Q = 0 \) with \( \sum S = 1 \), gives terrible gradients
  • Approximating with torch.linalg.matrix_exp, slightly less bad gradients.
  • Directly using the solution of the birth-death process steady state, good gradients but inflexible.

Exact shape and slope of the solution is highly dependent not just on the slope of the supply / demand curves, but also on on the amount of steps before the inventory limit.