In a recent paper titled “Optimal position-building strategies in Competition”, N. Chriss examines the important notion of competitive trading, whereby traders are impacted by other traders’ market impact, and must therefore adjust their strategy accordingly.
The first point we’ll address this week is how to recover the Almgren-Chriss solution in our framework. For this, let’s consider the problem of building up a position Q>0 shares in a stock, by time T, in an optimal way which minimizes the costs stemming from a linear temporary market impact function. Under a simple Brownian model without drift for the stock price s_t, it is easily seen that our inventory q_t and cash account x_t processes follow:
where δ>0 is a constant half-spread we pay above mid, θ>0 represents the linear market impact, and λ_t >= 0 is the speed of buying (shares per unit of time). We want to maximize our pnl over control λ_t, and define the value function:
where the last factor is a risk-aversion term (kappa = const being the level of risk-aversion). Under these assumptions, we see readily that we can drop δ in (1) (since Qδ is a cost we’ll incur no matter what the control λ_t is), and get the following Hamilton-Jacobi-Bellman equation for the value function u:
which, taking into account the usual Ansatz
can be rewritten
and finally boils down to
along with the first-order condition from (3)
Let’s now make the link between this Hamiltonian formulation and the Lagrangian formulation in N. Chriss’s paper (reference above). For this, all we need to do is differentiate (7) in time to get
and, using (7) again
Differentiating (6) wrt q, we have
which, combining with (9), yields:
Applying boundary conditions q(0) = 0 and q(T) = Q, we then infer the optimal inventory q(t) as a function of time:
which is the Almgren-Chriss formula. We can now plot the solution to (12) for various values of the normalized risk-aversion-to-market-impact coefficient:
Next week, we’ll examine the situation of a trader subject to the market impact of another, and what his optimal response should be, following the above framework as well as N. Chriss’s paper.
(Python script beyond the paywall.)
Quantitatively Yours,
import numpy as np
import matplotlib.pyplot as plt
# MaverickQuant 9/10/2024
T = 1
nt = 100
Q = 10000
sqrt_kappa_over_theta_values = np.array([2,3,5])
n = len(sqrt_kappa_over_theta_values)
q = np.zeros((nt,n))
q0 = np.zeros(nt)
for k in range(n):
sqrt_kappa_over_theta = sqrt_kappa_over_theta_values[k]
for i in range(nt):
t = T * i / (nt - 1)
q[i,k] = Q * np.sinh(sqrt_kappa_over_theta * t) / np.sinh(sqrt_kappa_over_theta * T)
for i in range(nt):
t = T * i / (nt - 1)
q0[i] = Q * t / T
plt.figure()
plt.plot(q0,'--')
plt.plot(q[:,0])
plt.plot(q[:,1])
plt.plot(q[:,2])
plt.title('Optimal Inventory -- Almgren-Chriss formula')
plt.xlabel('time')
plt.ylabel('shares')
plt.show()