Algorithmic Market Making in Spot Precious Metals
Alexander Barzykin Philippe Bergault Olivier Guéant







Algorithmic Market Making in Spot Precious Metals
    Alexander Barzykin[HSBC, 8 Canada Square, Canary Wharf, London E14 5HQ, United Kingdom, alexander.barzykin@hsbc.com.] Philippe Bergault[Université Paris Dauphine-PSL, Ceremade, Place du Maréchal de Lattre de Tassigny, 75116 Paris, France, bergault@ceremade.dauphine.fr.] Olivier Guéant[Université Paris 1 Panthéon-Sorbonne, Centre d'Economie de la Sorbonne, 106 Boulevard de l'Hôpital, 75642 Paris Cedex 13, France, olivier.gueant@univ-paris1.fr.]
    
===================================================================================================================================================================================================================================================================================================================================================================================================================================================================





The primary challenge of market making in spot precious metals  is navigating the liquidity that is mainly provided by futures contracts. The Exchange for Physical (EFP) spread, which is the price difference between futures and spot, plays a pivotal role and exhibits multiple modes of relaxation corresponding to the diverse trading horizons of market participants. In this paper, we introduce a novel framework utilizing a nested Ornstein-Uhlenbeck process to model the EFP spread. We demonstrate the suitability of the framework for maximizing the expected P&L of a market maker while minimizing inventory risk across both spot and futures. Using a computationally efficient technique to approximate the solution of the Hamilton-Jacobi-Bellman equation associated with the corresponding stochastic optimal control problem, our methodology facilitates strategy optimization on demand in near real-time, paving the way for advanced algorithmic market making that capitalizes on the co-integration properties intrinsic to the precious metals sector.

Key words: Market making, precious metals, internalization-externalization dilemma, hedging, stochastic optimal control, Riccati equations, closed-form approximations.








§ INTRODUCTION


Recent decades have seen a profound transformation in financial markets, driven largely by the widespread adoption of electronification. This digital evolution has been paralleled by the development of new decision-making tools for market makers and the emergence of systematic market making for most asset classes. The case of stocks traded through central limit order books has been discussed extensively (see <cit.> for a good example using stochastic optimal control), but OTC markets have also been addressed using the modelling framework introduced by Avellaneda and Stoikov in <cit.> (see for instance <cit.> for the FX market). These market making models have helped dealers to manage inventory risk through strategic hedging and quote skewing. In single-asset models, optimal quotes typically vary monotonically with current inventories, influenced by factors such as risk aversion, clients' pricing sensitivity, and the liquidity on external platforms. Dealers aim to maximize client flow internalization to mitigate the cost of external execution and reduce market impact, hedging only when inventories exceed franchise-dependent thresholds (on the internalization-externalization dilemma, see for instance <cit.> and <cit.>).


Multi-asset extensions of market making models have been built to help dealers manage their risk at the portfolio level (see for instance <cit.> and <cit.>). Market makers often deal indeed with large portfolios of assets of very different liquidity. Illiquid assets may be difficult to internalize and costly to execute in the market. However the risk associated with illiquid assets may sometimes be partially offset by positions in other instruments that are more liquid, leaving time to unwind the illiquid asset with less cost. Most existing models consider the case of asset price dynamics driven by correlated Brownian motions.


Diverging from conventional approaches that focus solely on correlated asset price dynamics, our model capitalizes on the unique benefits of using co-integrated assets for hedging, regardless of whether the market maker proposes quotes in those assets. Co-integration offers indeed a special opportunity for market makers to tap into enhanced liquidity pools and benefit from mean reversion.  This is particularly relevant in the case of a spot dealer hedging their position through futures, as in the case of precious metals market. While the interbank spot market does exist, precious metals futures are considerably more liquid, with tighter spreads and higher volumes. Since the price difference between futures and spot – so-called Exchange for Physical (EFP) spread – is primarily driven by swap rates which are relatively stable over the market maker's intraday risk horizon, the co-integration assumption between spot and futures prices is very natural.[There are other asset classes were the same mathematical ideas could be used. In FX, one can think of market making involving Non-Deliverable Forwards and onshore spot liquidity for instance.]


Our modelling framework builds on the classical foundation laid by <cit.> and <cit.> (see the two reference books <cit.> and <cit.> for a detailed discussion). In this framework, a single underlying instrument (spot) price is modelled by an arithmetic Brownian motion. The arrival rates and size distribution of client trades are modelled with predetermined intensity kernels. Going beyond the initial academic literature and building on recent advances, our model considers a dealer quoting in spot who can hedge (with costs) in both spot and futures. The novelty comes from the modelling of EFP by a nested Ornstein-Uhlenbeck (hereafter nested OU) process, as inspired by the observation of multiple relaxation times in the market ranging from hours to days, possibly related to different trading horizons of different types of traders, as illustrated in 
Figure <ref>. This article expands, therefore, the now classical stochastic optimal control framework for market making by incorporating the existence of co-integrated and liquid assets. Not only does it address a gap in the existing academic literature on market making models but also provides a new class of price dynamics compatible with the approximation techniques developed in <cit.>.




In the forthcoming sections, we begin by introducing our model alongside the key equations that define the optimal strategies for market makers in the spot precious metals market. We also discuss the merits and limitations of utilizing nested OU processes. Subsequently, we demonstrate the applicability of the method from <cit.> to our general framework. We conclude with an in-depth numerical analysis focused on the gold market, illustrating the practical implications of our model.





§ THE MODEL




 §.§ State variables and optimal control problem


We consider a spot market maker in a given precious metal. We denote by (S_t)_t a reference spot price for that metal and assume that the market maker continuously streams to clients a pricing ladder at the bid, S^b(t,z) = S_t - δ^b(t,z), and at the ask, S^a(t,z) = S_t +δ^a(t,z), where z denotes the sizes in ounces (oz). Transaction likelihood is assumed to depend solely on the distance between the proposed prices and the reference spot price. Subsequently, we introduce two intensity functions for bid and ask: (z, δ) ↦Λ^b(z, δ) and (z, δ) ↦Λ^a(z, δ). We assume that the functions Λ^b and Λ^a take the form[Generalizations do not raise difficulties.]

    Λ^b(z,δ)=Λ^a(z,δ) = Λ (z,δ) = λ(z) f(δ)   with   f(δ) =  1/1+e^α + βδ.


The market maker is also capable of hedging their position by trading on various platforms, using either or both spot and futures (the most liquid contract is typically chosen). The execution rates associated with the market maker's activities are modeled by the processes (v^S_t)_t and (v^F_t)_t for spot and futures, respectively.


We denote by (F_t)_t the price process of the futures contract and by (E_t)_t the EFP process, i.e. F_t = S_t + E_t.[We consider de-seasonalized futures prices with interest rate dependence on time to maturity factored out.]
 In what follows, we consider a Brownian dynamics for (S_t)_t and a nested OU dynamics[It is possible to expand the nested dynamics to include more than  one level if there is statistical or practical need.] for (E_t)_t, i.e.,

    dS_t = σ_S dW^S_t,      σ_S > 0
 and

    dE_t = -k_E (E_t - D_t ) dt + σ_E dW^E_t,      k_E, σ_E > 0,

with

    dD_t = -k_D (D_t - D̅)dt + σ_D dW^D_t,      k_D, σ_D ≥ 0,   D̅∈ℝ,

where (W_t^S, W_t^E, W_t^D)_t is a three-dimensional Brownian motion with correlation matrix R. In what follows, we denote by Σ the variance-covariance matrix [ σ_S   0   0;   0 σ_E   0;   0   0 σ_D ] R [ σ_S   0   0;   0 σ_E   0;   0   0 σ_D ].


We denote the inventory process of the market maker in spot by (q^S_t)_t and the inventory in the futures contract by (q^F_t)_t. Mathematically, the dynamics of (q^S_t)_t is formalized by considering the random measures J^b(dt,dz) and J^a(dt,dz) modeling the times and sizes of OTC trades on the bid and ask sides, respectively. Subsequently, the inventory dynamics for spot can be expressed as

    dq^S_t = ∫_z=0^∞ zJ^b(dt,dz) - ∫_z=0^∞ zJ^a(dt,dz) + v^S_t dt,

while the dynamics for the inventory in the futures contract is modelled by

    dq^F_t = v^F_t dt.


The resulting cash process (X_t)_t of the market maker writes 

    dX_t =  ∫_z=0^∞ S^a(t,z)zJ^a(dt,dz) -  ∫_z=0^∞ S^b(t,z)zJ^b(dt,dz) - v^S_tS_t dt - L^S(v^S_t) dt - v^F_t F_t dt - L^F(v^F_t) dt,

where the terms L^S(v^S_t) and  L^F(v^F_t) account for spread costs along with the temporary price impact of the market maker upon externalizing.[We have not considered permanent market impact here for the sake of simplicity. We might assume that both spot and futures external transactions (i.e. the processes (v^S_t)_t and (v^F_t)_t) affect the spot price equally, without altering the EFP spread. Under the assumption of linear permanent market impact, our model remains effective. For more details on market impact, see the reference book <cit.> and the recent paper <cit.> on the importance to have a good market impact model.] The functions L^S and L^F are typically nonnegative, strictly convex, and asymptotically super-linear. Here, we consider 
    L^S(v) = ψ^S |v| + η^S v^2     and     L^F(v) = ψ^F |v| + η^F v^2.


The market maker wants to maximize the expected utility of the Mark-to-Market value of their portfolio at the end of the period [0,T] minus a penalty corresponding to remaining inventories. We assume that the market maker has a CARA utility function, and maximizes

    𝔼[-exp(-γ(X_T + q^S_T S_T + q^F_T F_T - K ((q^S_T)^2 + (q^F_T)^2) )) ]

by selecting δ^b, δ^a, v^S and v^F, where γ indicates the market maker's risk aversion and K ≥ 0 is a penalty constant.




 §.§ Solution


We denote by u:[0,T]×ℝ^6→ℝ the value function of this stochastic control problem. The Hamilton-Jacobi-Bellman equation associated with it is:

    0    =   ∂_t u - k_E  (E  - D )∂_Eu - k_D (D-D̅)∂_D u+ 1/2Tr(Σ∇^2_SEDu) + ℒ^b u + ℒ^a u 
           + v^Ssup( v^S∂_q^S u - ( L^S(v^S) + v^SS ) ∂_x u) + v^Fsup( v^F∂_q^F u- ( L^F(v^F) + v^F(S+E) ) ∂_x u),

with terminal condition u(T,x, q^S, q^F,S, E, D) = -exp(-γ(x + q^S S + q^F (S+E) - K ((q^S)^2 + (q^F)^2) )), where

    ℒ^b u (t,x,q^S,q^F,S,E,D) =∫_0^∞δ^bsup  f(δ^b) ( u(t,x-z(S-δ^b), q^S+z, q^F, S, E, D) - u(t,x,q^S,q^F,S,E,D) ) λ(z)   dz


    ℒ^a u (t,x,q^S,q^F,S,E,D) =∫_0^∞δ^asup f(δ^a) ( u(t,x+z(S+δ^a), q^S-z, q^F, S, E, D) - u(t,x,q^S,q^F,S,E,D) ) λ(z) dz.

This equation can be simplified through the use of the ansatz

    u(t,x,q^S,q^F,S,E,D) = -exp(-γ( x+q^S S + q^F(S+E) + θ(t,q^S,q^F,E,D) )),

where θ:[0,T]×ℝ^4→ℝ is a differentiable function such that θ(T,q^S,q^F,E,D) = - K ((q^S)^2 + (q^F)^2).


 The partial differential equation associated with θ is indeed the following:

    0    =   ∂_t θ - k_E  (E  - D )(q^F + ∂_Eθ)  - k_D (D-D̅)∂_D θ+1/2Tr(Σ∇^2_EDθ) 
           - γ/2[   q^S + q^F; q^F + ∂_E θ;       ∂_D θ ]^⊺Σ[   q^S + q^F; q^F + ∂_E θ;       ∂_D θ ]+ 𝒥_H θ + ℋ^S (∂_q^Sθ) +  ℋ^F (∂_q^Fθ)

where Σ is the submatrix of Σ obtained by removing the first row and the first column, ℋ^S and ℋ^F are the Hamiltonian functions defined by

    ℋ^S:p∈ℝ ↦v^S sup(v^Sp- L^S(v^S)   )   and  ℋ^F:p∈ℝ ↦v^F sup(v^Fp- L^F(v^F)   ),
 and

    𝒥_H θ(t,q^S, q^F, E , D)    =   ∫_0^∞ zH (z, θ(t,q^S, q^F, E , D) -  θ(t,q^S+z, q^F, E , D) /z)λ(z) dz
        +   ∫_0^∞ zH (z, θ(t,q^S, q^F, E , D) -  θ(t,q^S-z, q^F, E , D) /z)λ(z) dz

with H:(z,p)∈ (0, +∞) ×ℝ↦δsupf(δ)/γ z(1-e^-γ z (δ-p)).

Under classical assumptions on the intensities (here on the function f – see for instance <cit.>), it can be proved that, given a smooth solution to the equation (<ref>), the optimal controls are given by[Because q^S is not a continuous process, we consider in (<ref>) the left limit of q^S at time t denoted by q^S_t-.]

    {δ^b*(t,z)    = δ̅(z, θ(t,q^S_t-, q^F_t, E _t, D_t) -  θ(t,q^S_t-+z, q^F_t, E _t, D_t) /z) 
    δ^a*(t,z)    = δ̅(z, θ(t,q^S_t-, q^F_t, E _t, D_t) -  θ(t,q^S_t--z, q^F_t, E _t, D_t) /z) 
    
    v^S*_t    = ℋ^S'( ∂_q^Sθ(t,q^S_t-, q^F_t, E _t, D_t) ) 
    
    v^F*_t    = ℋ^F'( ∂_q^Fθ(t,q^S_t-, q^F_t, E _t, D_t) )
    .

where δ̅(z, p) = f^-1(γ z H(z,p)-∂_p H (z,p)  ).



 §.§ Remarks on nested OU processes


Optimal quoting and hedging strategies in our model are contingent upon current inventories and the current values of the processes (E_t)_t and (D_t)_t. While the EFP and inventories are directly observable, (D_t)_t is not, introducing a challenge for practical implementation. However, assuming (D_t)_t is fixed as in a simple OU model where k_D = σ_D = 0 leads to market makers engaging in overly confident statistical arbitrage. This could lead indeed to strategies that are strongly reliant on the EFP mean reverting to the constant value of the process (D_t)_t.


To encourage caution, our model introduces variability in (D_t)_t by setting k_D and σ_D to positive values. These parameters can then be viewed as hyperparameters, allowing market makers to modulate their confidence. With that vision, the current value of the process (D_t)_t might be estimated or pragmatically chosen.


Another point of view consists in statistically estimating all the
parameters and filtering the signal to get an approximation of
(D_t)_t at all times. For that purpose, we can assume a correlation
structure R = [ 1 ρ 0; ρ 1 0; 0 0 1 ] with ρ∈ [-1,1]. Then, all the parameters can
be estimated using classical maximum likelihood (without observing
(D_t)_t) methods because (E_t)_t is a Gaussian process whose
covariance function is known in closed form. Once parameters are estimated, we use filtering techniques to write

    dS_t   = σ_S dW_t^S
    
        dE_t    = -k_E (E_t - D_t ) dt + σ_E dW^E_t
    
        dD_t    = -k_D (D_t - D̅)dt + 1/√(1-ρ^2)k_E/σ_Eν_t^2 dW^D_t

where

    D_t = 𝔼[D_t | (S_s)_s≤ t, (E_s)_s≤ t],   ν^2_t = 𝕍(D_t | (S_s)_s≤ t, (E_s)_s≤ t),

and 
    W_t^S = W_t^S,   W^E_t = W^E_t + k_E/σ_E∫_0^t (D_s-D_s) ds,   W^D_t =  W^E_t - ρW_t^S/√(1-ρ^2)
 define a three-dimensional Brownian motion adapted to the natural filtration of the processes (S_t)_t and (E_t)_t with correlation structure R = [        1        ρ        0;        ρ        1 √(1-ρ^2);        0 √(1-ρ^2)        1 ] of rank 2.


Using standard Bayesian filtering techniques, (ν_t^2)_t is in fact deterministic and satisfies

    dν_t^2/dt = - 1/1-ρ^2k_E^2/σ_E^2ν_t^4 - 2 k_D ν_t^2 + σ_D^2.

In particular, assuming we have observed the spot and futures prices for a long time, we can replace ν_t^2 by its asymptotic value:

    ν_∞^2 = σ_D^2/k_D + √(k_D^2 + 1/1-ρ^2k_E^2/σ_E^2σ_D^2 ).


Our market making problem can then be solved by replacing the unobservable process (D_t)_t by the observable process (D_t)_t up to the replacement in equation (<ref>) of R by R and σ_D by 
    σ_D = 1/√(1-ρ^2)k_E/σ_Eν_∞^2 = σ_D ξ/k_D + √(k_D^2 + ξ^2 ),   where  ξ = 1/√(1-ρ^2)k_Eσ_D/σ_E.





§ APPROXIMATION TECHNIQUE


Approximating numerically the solution θ of equation (<ref>) using grid methods poses challenges due to the high dimensionality of the state space and the complex geometry of the frequently visited inventory states at optimality. To avoid grids, we adopt a methodology similar to that described in <cit.>, which involves approximating equation (<ref>) with a closely related equation. The solution to that equation, denoted by θ̌, will be a quadratic polynomial and serve as an approximation to the original value function θ. Consequently, θ̌ will be utilized in lieu of θ in (<ref>) to derive strategies that are nearly optimal.


To obtain our new equation, we employ instead of L^S and L^F the quadratic approximations Ľ^S(v) = η^S v^2 and Ľ^F(v) = η^F v^2. Subsequently, we substitute ℋ^S and ℋ^F in (<ref>) by

    ℋ̌^S:p∈ℝ ↦v^S sup(v^Sp- Ľ^S(v^S)   ) = p^2/4η^S    and    ℋ̌^F:p∈ℝ ↦v^F sup(v^Fp- Ľ^F(v^F)   ) = p^2/4η^F.

Also, following <cit.>, we approximate the function H by a quadratic function

    Ȟ(p) = α_0 + α_1 p + 1/2α_2 p^2.


We then obtain the following partial differential equation:

    0    =   ∂_t θ̌- k_E  (E  - D )(q^F + ∂_Eθ̌)  - k_D (D-D̅)∂_D θ̌+1/2Tr(Σ∇^2_EDθ̌) 
           - γ/2[    q^S + q^F; q^F + ∂_E θ̌;       ∂_D θ̌ ]^⊺Σ[    q^S + q^F; q^F + ∂_E θ̌;       ∂_D θ̌ ]+ 𝒥_Ȟθ̌+ 1/4 η^S(∂_q^Sθ̌)^2 +  1/4 η^F(∂_q^Fθ̌)^2

with terminal condition θ̌(T,q^S,q^F,E,D) = - K ((q^S)^2 + (q^F)^2), whose solution θ̌ will be our approximation of θ.


As announced above, the interest of the above approximation is that the solution to (<ref>) is a polynomial of degree 2 in q^S, q^F, E, and D. Let us make indeed the following ansatz:

    θ̌(t,q^S, q^F, E , D) = - [ q^S; q^F;   E;   D ]^⊺ A(t) [ q^S; q^F;   E;   D ] - [ q^S; q^F;   E;   D ]^⊺ B(t) - C(t),

where A:[0,T] ↦ℳ_4(ℝ), B:[0,T] ↦ℝ^4, and C:[0,T] ↦ℝ are differentiable functions such that

    A(T) =  [ -K  0  0  0;  0 -K  0  0;  0  0  0  0;  0  0  0  0;    ],     B(T) = [ 0; 0; 0; 0 ]  and   C(T) = 0.
 Plugging this polynomial ansatz into (<ref>) yields a system of ODEs for A, B, and C:[We only report here the equations for A and B, as C is irrelevant for the computation of the optimal strategy.]


    A'(t)    = A(t)M^A A(t) + A(t)U^A + U^A^⊺ A(t) +R^A
    
        B'(t)    =  A(t) M^A B(t) +A(t) V^B + U^A^⊺ B(t)

where

    M^A = ([ 4α_2 ∫_0^+∞ zλ(z) dz + 1/η^S    0 
    
    0    1/η^F                                          0_2×2;                                          0_2×2                                           -2γΣ;                                                ]),    U^A = 
    ([                                    0_2× 2                                     0_2×2; γ[ 0 1 0; 0 0 1;   ]Σ[ 1 1; 0 1; 0 0;   ]                  k_E     -k_E 
    
    0     k_D;                                           ]),


    R^A = -1/2γ([   I_2 0_2×1; 0_2×2 0_2×1;       ])Σ([   I_2 0_2×2; 0_1×2 0_1×2;       ]) - 1/2 k_E [  0  0  0  0;  0  0  1 -1;  0  1  0  0;  0 -1  0  0;    ] and   V^B = 
    [        0;        0;        0; -2k_D D̅ ].


This system of ODEs can easily be solved numerically. It leads to the following approximations of the optimal controls:

    {δ̌^b*(t,z)    = δ̅( z(e^S)^⊺ A(t) e^S + 2 [ q^S; q^F;   E;   D ]^⊺ A(t) e^S + (e^S)^⊺ B(t) ) 
    δ̌^a*(t,z)    = δ̅( z(e^S)^⊺ A(t) e^S - 2 [ q^S; q^F;   E;   D ]^⊺ A(t) e^S - (e^S)^⊺ B(t) ) 
    v̌^S*_t    = ℋ^S'( -2(e^S)^⊺ A(t) [ q^S; q^F;   E;   D ] - (e^S)^⊺ B(t)  ) 
    v̌^F*_t    = ℋ^F'(  -2(e^F)^⊺ A(t) [ q^S; q^F;   E;   D ] - (e^F)^⊺ B(t) ),
    .

where e^S = [ 1; 0; 0; 0 ] and e^F = [ 0; 1; 0; 0 ]. 


It is important to note that in (<ref>), we employ the original functions δ̅, ℋ^S and ℋ^F without resorting to quadratic approximations. The only function approximated is θ, which is replaced by θ̌. In the terminology of reinforcement learning, this is equivalent to approximating the true value function and then selecting greedy actions based on this approximation. In particular, the spread effects introduced by the functions L^S and L^F are duly considered.





§ NUMERICAL RESULTS AND DISCUSSION


For illustration, we consider market making in spot gold (XAUUSD) with access to futures liquidity.


A typical pricing ladder size discretization is set as 100, 200, 500, 1000, 2000 and 5000 oz. We assume a standard client trade intensity represented by 
    λ(z) =  
    1600    if  z = 100 
    
    600    if  z = 200 
    
    1000    if  z = 500 
    
    600    if  z = 1000 
    
    120    if  z = 2000 
    
    80    if  z = 5000
      and   f(δ) = 1/1+ e^α + βδ
 where price sensitivity parameters are taken to be α = -0.8 and β = 5 bp^-1. Gold spot and EFP volatility parameters are set to σ_S = 140 bp·day^-1/2 and σ_E  = 5 bp·day^-1/2, respectively. Spot-EFP correlation is typically small and assumed to be zero in this example. EFP price relaxation rate is k_E  = 8 day^-1. We assume first, as a benchmark, a simple OU framework with k_D = σ_D = 0 and D̅ is fixed at zero. Standard functional dependence of instantaneous market impact on execution rate is assumed: L^S(v) = ϕ^S |v| + η^S v^2 and L^F(v) = ϕ^F |v| + η^F v^2 with
ϕ^S = 0.4 bp, ϕ^F = 0.2 bp, η^S = 7·10^-8 bp·day·oz^-1 and 
η^F = 3·10^-8 bp·day·oz^-1.
We consider a time horizon of T=1 hour that ensures convergence towards stationary quotes and hedging rates at time t=0. Terminal penalty is set to zero unless specified otherwise.[These parameters have been selected by analyzing a subset of HSBC market making franchise. However, they should not be considered as representative of HSBC but rather of a typical institutional spot gold dealer. Daily turnover in this setup is approximately $1B.
Basis point convention is used for price changes, which is an approximation insignificant in practical terms given the time frame of the problem <cit.>.]




Figure <ref> demonstrates the variation of optimal market making controls with spot inventory. When there are no futures in the book, the equilibrium spot position is zero, and the dealer will skew quotes to attract client flow in the direction towards this equilibrium. As noticed previously (see <cit.>), there exists a pure internalization area where skewing will be considered as the only risk reducing option. Larger positions will also involve hedging in the market. We can see that the onset for hedging with futures is earlier and the corresponding rate of execution is higher for futures than for spot.
This is totally understandable given the liquidity (and thus the cost of trading) difference. A non-zero position in futures leads to a shifted quasi-equilibrium in spot, corresponding to an EFP position (where each futures position is paired with another in spot in the opposite direction). It is optimal for the dealer to unwind the underlying risk towards this point when there is an unbalanced futures or spot position.





Figure <ref> illustrates the expected inventory relaxation following a relatively large 1000 oz OTC trade for  γ = 3· 10^-4. It was calculated via Monte Carlo simulation (2· 10^4 trajectories) of the model given the initial condition and optimal controls with terminal penalty K = 10^-3. We see that part of the risk is hedged with futures very quickly. The remaining excess spot risk is unwound via skew (attracting the offsetting client flow) and spot execution. Figure <ref> shows that skew can be quite aggressive for this level of risk aversion, with offers better than mid price. Effectively, during this fast relaxation stage, the dealer creates an EFP position which is later unwound very slowly. Figure <ref> shows an inventory probability distribution extracted from a sufficiently long Monte Carlo trajectory (10^7 seconds). As expected, the system spends most of the time along the low-risk EFP diagonal.









EFP mean reversion influences optimal controls. EFP deviation from the expected mean shifts the equilibrium inventory along with the corresponding execution onsets and quote skew, as shown in Figures <ref> and <ref>. Understandably, when the deviation is negative the dealer will tend to accumulate long EFP position, and vice versa. Figure <ref> demonstrates that EFP mean reversion will only lead to rare direct arbitrage opportunities under strong risk aversion. This is related to the cost of opportunistically entering into an EFP position (one would have to cross two spreads). The dealer will instead skew quotes in the required direction (see Figure <ref>) and wait for the opportunity to materialize while making spread. With a lower risk aversion, the appetite to capitalize on EFP mean reversion increases leading to opportunistic execution at extreme deviations (where the upper futures execution onset is below the lower spot execution onset and, similarly, where the lower futures execution onset is above the upper spot execution onset). The skew will be repurposed from EFP risk management to opportunistic skew on EFP deviation, as shown in Figure <ref>.



We introduced nested OU processes in this paper to mitigate the latter repurposing which is mainly due to overconfidence in the OU model. Uncertainty on mean EFP deviation through the introduction of the stochastic process (D_t)_t creates additional risk that is taken into account by risk aversion, resulting in the dealer being less inclined to keep EFP position. Figure <ref> demonstrates the effect of σ_D on the propensity to capitalize on EFP mean reversion. Here k_D  = 0.2 day^-1, γ = 3· 10^-4, and other parameters are as defined earlier. As expected, the larger is σ_D, the smaller is the skew and the higher is the arbitrage onset.
 



The choice of risk aversion is ultimately in the hands of the dealer. The rule of thumb is to decrease γ while the expected benefit in P&L exceeds the expected increase in risk. Figure <ref> demonstrates the effect of risk aversion on volume share of hedging, P&L and risk. In this specific example, it is clear that decreasing γ below 10^-4 is questionable as the expected risk increases much faster than P&L. Similarly, increasing γ above 10^-3 is not efficient.







Figure <ref> illustrates the performance of the optimal strategy over a single trading day on real market data but with simulated client flow (uniform intensity throughout the day). EFP position clearly echoes the mean-reverting nature of EFP – the dealer aims to keep EFP risk against the direction of EFP deviation. Volume share of futures execution significantly exceeds that of spot due to lower cost. Introducing futures hedging into risk management of OTC spot improves Sharpe ratio by at least 30% (not shown).





§ CONCLUDING REMARKS


We have extended a stochastic optimal control framework for OTC market making by incorporating co-integrated liquidity for hedging. Using a computationally efficient approximation technique, our methodology facilitates strategy optimization on demand in near real-time. A specific example of spot gold market is analyzed in detail demonstrating efficient risk management benefiting from access to the significantly more liquid gold futures with reduced transaction costs while capitalizing on EFP mean reversion. EFP spread is modeled by a nested OU process describing the observed multiple modes of relaxation corresponding to the diverse trading horizons of market participants. Interestingly, nested OU processes also appear as a way to robustify pure OU strategies with uncertainty in the mean reversion parameters, a commonly encountered case. They could find application in generalizing most of the optimization problems involving classical OU processes (see for instance the trading problem of <cit.>).




§ STATEMENT AND ACKNOWLEDGEMENT


The results presented in this paper are part of the research works carried out within the HSBC Research Initiative. The views expressed are those of the authors and do not necessarily reflect the views or the practices at HSBC. The authors are grateful to Richard Anthony, James Donaldson and Manuel Abellan-Lopez (HSBC) for helpful discussions and support throughout the project.

plain
10

avellaneda2008high
Marco Avellaneda and Sasha Stoikov.
High-frequency trading in a limit order book.
Quantitative Finance, 8(3):217–224, 2008.

barzykin2022market
Alexander Barzykin, Philippe Bergault, and Olivier Guéant.
Market-making by a foreign exchange dealer.
Risk, September 2022.

barzykin2023dealing
Alexander Barzykin, Philippe Bergault, and Olivier Guéant.
Dealing with multi-currency inventory risk in foreign exchange cash
  markets.
Risk, March 2023.

evangelista2020closed
Philippe Bergault, David Evangelista, Olivier Guéant, and Douglas Vieira.
Closed-form approximations in multi-asset market making.
arXiv preprint arXiv:1810.04383, 2020.

butz2019internalisation
Maximilian Butz and Roel Oomen.
Internalisation by electronic fx spot dealers.
Quantitative Finance, 19(1):35–56, 2019.

cartea2015algorithmic
Álvaro Cartea, Sebastian Jaimungal, and José Penalva.
Algorithmic and high-frequency trading.
Cambridge University Press, 2015.

cartea2014buy
Álvaro Cartea, Sebastian Jaimungal, and Jason Ricci.
Buy low, sell high: A high frequency trading perspective.
SIAM Journal on Financial Mathematics, 5(1):415–444, 2014.

gueant2016financial
Olivier Guéant.
The Financial Mathematics of Market Liquidity: From optimal
  execution to market making, volume 33.
CRC Press, 2016.

guilbaud2013optimal
Fabien Guilbaud and Huyen Pham.
Optimal high-frequency trading with limit and market orders.
Quantitative Finance, 13(1):79–94, 2013.

hey2023cost
Natascha Hey, Jean-Philippe Bouchaud, Iacopo Mastromatteo, Johannes
  Muhle-Karbe, and Kevin Webster.
The cost of misspecifying price impact.
Risk, January 2024.

lipton2020closed
Alexander Lipton and Marcos Lopez de Prado.
A closed-form solution for optimal ornstein-uhlenbeck driven trading
  strategies.
International Journal of Theoretical and Applied Finance,
  23(08):2050056, 2020.

webster2023handbook
Kevin T Webster.
Handbook of Price Impact Modeling.
Chapman and Hall/CRC, 2023.




