# Optimal Liquidation, Acquisition and Market Making Problems in HFT under Hawkes Models for LOB

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

- Market buy/sell order—specifies the number of shares to be bought/sold at the best available price, immediately.
- Limit buy/sell order—specifies a price and a number of shares to be bought/sold at that price, when possible.
- Order cancellation—agents who have submitted a limit order may cancel the order before it is executed.

- Market orders that are executed immediately.
- Limit orders that are queued for later execution, but which may be canceled.
- Thus, the limit-order book is the collection of queued limit orders awaiting execution or cancellation.

## 2. A Brief Introduction to Hawkes Processes

**Definition**

**1**

**.**The one-dimensional Hawkes process is a point process $N\left(t\right)$ which is characterized by its intensity $\lambda \left(t\right)$ with respect to its natural filtration:

**Definition**

**2**

**.**Suppose that ${X}_{k}$ is an ergodic continuous time Markov chain, independent of $N\left(t\right)$, with state space $1,2$. Then, the general compound hawkes process with two states is defined by the following process

- Incorporate a non-exponential distribution of interarrival times of orders in HFT or claims in insurance (hidden in $N\left(t\right)$);
- Incorporate the dependence of orders or claims (via MC ${X}_{i}$);
- Incorporate the clustering of orders in HFT or claims (properties of $N\left(t\right)$); and
- Incorporate order or claim price changes that are different from one single number (in $a\left({X}_{i}\right)$).

- Compound Poisson processes: ${S}_{t}={S}_{0}+{\sum}_{k=1}^{N\left(t\right)}{X}_{k},$ where $N\left(t\right)$ is a Poisson process and $a\left({X}_{k}\right)={X}_{k}$ are i.i.d.r.v.;
- Compound Hawkes processes (Swishchuk et al. 2019): ${S}_{t}={S}_{0}+{\sum}_{k=1}^{N\left(t\right)}{X}_{k},$ where $N\left(t\right)$ is a Hawkes process and $a\left({X}_{k}\right)={X}_{k}$ are i.i.d.r.v.; and
- Compound Markov renewal processes: ${S}_{t}={S}_{0}+{\sum}_{k=1}^{N\left(t\right)}a\left({X}_{k}\right),$ where $N\left(t\right)$ is a renewal process and ${X}_{k}$ is a Markov chain.

**Lemma**

**1.**

**.**Let $\widehat{\mu}:={\int}_{0}^{+\infty}\mu \left(s\right)ds$$<1,$ and assume that the Markov chain ${X}_{i}$ is ergodic with stationary probabilities ${\pi}_{i}^{*}.$ Then, the GCHP ${S}_{nt}$ satisfies the following weak convergence in the Skorokhod topology:

**Theorem**

**1**

**.**Let ${X}_{k}$ be an ergodic Markov chain and with ergodic probabilities $({\pi}_{1}^{*},{\pi}_{2}^{*},\dots ,{\pi}_{n}^{*}).$ Let ${S}_{t}$ be LGCHP, and $0<\widehat{\mu}:={\int}_{0}^{+\infty}\mu \left(s\right)ds<1\phantom{\rule{1.em}{0ex}}and\phantom{\rule{1.em}{0ex}}{\int}_{0}^{+\infty}\mu \left(s\right)sds<+\infty .$ Then

**Remark**

**1.**

**Theorem**

**2**

**.**Let ${X}_{k}$ be an ergodic Markov chain and with ergodic probabilities $({\pi}_{1}^{*},{\pi}_{2}^{*},\dots ,{\pi}_{n}^{*}).$ Let ${S}_{t}$ be LGCHP, and $0<\widehat{\mu}:={\int}_{0}^{+\infty}\mu \left(s\right)ds<1$ and ${\int}_{0}^{+\infty}\mu \left(s\right)sds<+\infty .$ Then

**Remark**

**2.**

**Remark**

**3.**

## 3. Optimal Liquidation Problem

- $\nu ={\left({\nu}_{t}\right)}_{\{0\le t\le T\}}$ is the trading rate, the speed at which the agent is liquidating or acquiring shares;
- ${Q}^{\nu}={\left({Q}_{t}^{\nu}\right)}_{\{0\le t\le T\}}$ is the agent’s inventory, which is affected by the speed of trading;
- ${S}^{\nu}={\left({S}_{t}^{\nu}\right)}_{\{0\le t\le T\}}$ is the midprice process, and is also affected in principle by the speed of trading;
- ${\widehat{S}}^{\nu}={({\widehat{S}}_{t}^{\nu})}_{\{0\le t\le T\}}$ corresponds to the price process at which the agent can sell or purchase the asset, the execution price; and
- ${X}^{\nu}={\left({X}_{t}^{\nu}\right)}_{\{0\le t\le T\}}$ is the agent’s cash process, resulting from the agent’s execution strategy.

**permanent price impact**. The permanent price impact has a negative impact because the agent applies pressure to move the price downward.

**temporary price impact**. The temporary price impact has a negative impact because the agent applies pressure to move the price downward.

## 4. Optimal Acquisition Problem

## 5. Optimal Market-Making Problem

- $S={\left({S}_{t}\right)}_{0\le t\le T}$, denotes the midprice, assumed to satisfy the SDE driven by a GCHP, as seen in Equation (4), with ${S}_{t}^{\pm}={S}_{0}\pm \left[{a}^{*}\frac{\lambda}{1-\mu}\right]t+\sigma {W}_{t}$, $\sigma >0$ and $W={\left({W}_{t}\right)}_{0\le t\le T}$ is a standard Brownian motion, ${S}_{t}^{+}$ is the price for the acquisition side, and ${S}_{t}^{-}$ is the price for the liquidation side;
- ${\delta}^{\pm}={\left({\delta}_{t}^{\pm}\right)}_{0\le t\le T}$ denote the depth at which the agent posts LOs; sell LOs are posted at a price of ${S}_{t}^{-}+{\delta}_{t}^{+}$, and buy LOs at a price of ${S}_{t}^{+}-{\delta}_{t}^{-}$;
- ${M}^{\pm}={\left({M}_{t}^{\pm}\right)}_{0\le t\le T}$ denote the counting processes corresponding to the arrival of other participants’ buy $(+)$ and sell $(-)$ market orders (MOs), which arrive at Poisson times with intensities ${\lambda}^{\pm}$;
- ${N}^{\delta ,\pm}={({N}_{t}^{\delta ,\pm})}_{0\le t\le T}$ denote the controlled counting processes for the agent’s filled sell $(+)$ and buy $(-)$ LOs;
- ${X}^{\delta}={\left({X}_{t}^{\delta}\right)}_{0\le t\le T}$ denote the MM’s cash process and this satisfies the SDE$$d{X}_{t}^{\delta}=({S}_{t}^{-}+{\delta}_{t}^{+})d{N}_{t}^{\delta ,+}-({S}_{t}^{+}-{\delta}_{t}^{-})d{N}_{t}^{\delta ,-};$$
- ${Q}^{\delta}={\left({Q}_{t}^{\delta}\right)}_{0\le t\le T}$ denotes the agent’s inventory process and$${Q}_{t}^{\delta}={N}_{t}^{\delta ,-}-{N}_{t}^{\delta ,+}$$

## 6. Numerical Results with Real Data

#### 6.1. LOBster Data

#### 6.2. Main Findings

- The trading rate for the optimal liquidation was sensitive to the parameters of the GCHP driving the prices through $\zeta $ in Equation (26). In this case, as the calibrated ${a}^{*}$ values were too small, the effect was diminished.
- As mentioned in Section 4, the trading rate for the optimal acquisition was a constant proportion over time, leading us to obtain $\mathfrak{N}$ in the time T.
- The trading rate for the optimal acquisition was sensitive to the parameters of the GCHP driving the prices through the equation of $\u03f5$ in Equation (51). The trading rate was higher according to the structure of the solution and the values of the calibrated parameters; this is in contrast with the results presented in Cartea et al. (2015) using a price model of the general stationary Gauss–Markov process.
- The parameter $\alpha $, the terminal liquidation penalty, in the optimal acquisition model was changed for the three stocks. We were able to visualize the effects of $\alpha $. As this parameter increased, the trading acquisition rate increased and we observed that if $\alpha $ was very small, the agent could not complete the inventory $\mathfrak{N}$ (see Figure 5, Figure 6 and Figure 7).
- The depth in limit orders for the optimal market-making model was sensitive to the parameters of the GCHP, driving the prices from many sides, the matrix $D\left(t\right)$ in the solution, and specifically from the depth to the buy side of LOs, ${\delta}^{*,-}$. In this case, the greater the expected value of the GCHP, the deeper the LO should be placed.
- The parameter $\kappa $, the main factor affecting the probability of filling limit orders in the optimal market-making model, was changed for the three stocks. We were able to visualize the effects of $\kappa $. As this parameter increased, the depth for the LO price on the buy or sell side decreased (see Figure 8, Figure 9 and Figure 10).

#### 6.3. Numerical Results for Optimal Liquidation Problem

#### 6.4. Numerical Results for Optimal Acquisition Problem

#### 6.5. Numerical Results for Optimal Market-Making Problem

## 7. Conclusions

## 8. Discussion and Future Work

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Abbreviations

DPE | Dynamic programming equation |

DPP | Dynamic programming principle |

GCHP | General compound Hawkes process |

HJB | Hamilton–Jacobi–Bellman |

LOB | Limit order book |

ODE | Ordinary differential equation |

SDE | Stochastic differential equation |

## References

- Aldridge, Irene. 2009. High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems. Hoboken: Wiley. [Google Scholar]
- Bacry, Emmanuel, Iacopo Mastromatteo, and Jean-Franccois Muzy. 2015. Hawkes processes in finance. Market Microstructure and Liquidity 1: 1550005. [Google Scholar] [CrossRef]
- Becherer, Dirk, Todor Bilarev, and Peter Frentrup. 2018. Optimal asset liquidation with multiplicative transient price impact. Applied Mathematics & Optimization 78: 643–76. [Google Scholar]
- Boswijk, H. Peter, Roger J. A. Laeven, and Xiye Yang. 2018. Testing for self-excitation in jumps. Journal of Econometrics 203: 256–66. [Google Scholar] [CrossRef]
- Cartea, Álvaro, Sebastian Jaimungal, and José Penalva. 2015. Algorithmic and High-Frequency Trading. Cambridge: Cambridge University Press. [Google Scholar]
- Cont, Rama, and Adrien De Larrard. 2013. Price Dynamics in a Markovian Limit Order Market. SIAM Journal on Financial Mathematics 4: 1–25. [Google Scholar] [CrossRef] [Green Version]
- Fodra, Pietro, and Huyen Pham. 2017. High Frequency Trading and Asymptotics for Small Risk Aversion in a Markov Renewal Model. SIAM Journal on Financial Mathematics 6: 656–84. [Google Scholar] [CrossRef] [Green Version]
- Fruth, A., T. Schöneborn, and M. Urusov. 2019. Optimal trade execution in order books with stochastic liquidity. Mathematical Finance 29: 507–41. [Google Scholar] [CrossRef]
- Guo, Qi, and Anatoliy Swishchuk. 2020. Multivariate general compound Hawkes processes and their applications in limit order books. Wilmott 107: 42–51. [Google Scholar] [CrossRef]
- Guo, Qi, Bruno Remillard, and Anatoliy Swishchuk. 2020. Multivariate General Compound Point Processes in Limit Order Books. Risks 8: 98. [Google Scholar] [CrossRef]
- Hawkes, Alan. 1971. Spectra of Some Self-Exciting and Mutually Exciting Point Processes. Biometrika 58: 83–90. [Google Scholar] [CrossRef]
- Hawkes, Alan, and David Oakes. 1974. A Cluster Process Representation of a Self-Exciting Process. Journal of Applied Probability 11: 493–503. [Google Scholar] [CrossRef]
- Liu, Guo, Zhuo Jin, and Shuanming Li. 2021. Optimal investment, consumption, and life insurance strategies under a mutual-exciting contagious market. Insurance: Mathematics and Economics 101: 508–24. [Google Scholar] [CrossRef]
- Limit Order Book System—The Efficient Reconstructor. 2012. Available online: https://lobsterdata.com/ (accessed on 21 October 2020).
- Lu, Xiaofei, and Fréderic Abergel. 2017. Limit Order Book Modeling with High Dimensional Hawkes Processes. Working Papers hal-01512430, HAL. Available online: https://hal.archives-ouvertes.fr/hal-01512430/document (accessed on 1 April 2022).
- Lu, Xiaofei, and Fréderic Abergel. 2018. High dimensional Hawkes processes for limit order books Modeling, empirical analysis and numerical calibration. Journal Quantitative Finance 18: 249–64. [Google Scholar] [CrossRef] [Green Version]
- Merton, Robert. 1976. Option pricing when underlying stock returns are discontinuous. Journal of Financial Economics 3: 125–44. [Google Scholar] [CrossRef] [Green Version]
- Swishchuk, Anatoliy, and Aiden Huffman. 2020. General Compound Hawkes Processes in Limit Order Books. Risks 8: 28. [Google Scholar] [CrossRef] [Green Version]
- Swishchuk, Anatoliy, and Nelson Vadori. 2017. A Semi-Markovian Modeling of Limit Order Markets. SIAM Journal on Financial Mathematics 8: 240–73. [Google Scholar] [CrossRef] [Green Version]
- Swishchuk, Anatoliy, Bruno Remillard, Robert Elliott, and Jonathan Chavez-Casillas. 2019. Compound Hawkes Processes in Limit Order Books. In Financial Mathematics, Volatility and Covariance Modeling, 1st ed. London: Routledge. [Google Scholar]
- Swishchuk, Anatoliy, Tyler Hofmeister, Katharina Cera, and Julia Schmidt. 2017. General Semi-Markov Model For Limit Order Books. International Journal of Theoretical and Applied Finance (IJTAF) 20: 1750019. [Google Scholar] [CrossRef]
- Yosida, Kosaku. 1980. Functional Analysis, 6th ed. Berlin: Springer, pp. 418–50. [Google Scholar]

**Figure 1.**Apple stock price, Amazon stock price, and Google stock price. The three figure above show the the observed stock price on 21 June 2012, from LOBster data. (

**a**) Apple stock price; (

**b**) Amazon stock price; (

**c**) Google stock price.

**Figure 8.**Agent’s optimal depth for selling LOs and Agent’s optimal depth for buying LOs for Apple stocks. (

**a**) the agent’s optimal depth calculated with Equation (94), using the parameters in Table 8 at time zero. (

**b**) the agent’s optimal depth calculated with Equation (94), using the parameters in Table 8 in 3 dimensions. (

**c**) the agent’s optimal depth calculated with Equation (95), using the parameters in Table 8 at time zero. (

**d**) the agent’s optimal depth calculated with Equation (95), using the parameters in Table 8 in 3 dimensions.

**Figure 9.**Agent’s optimal depth for selling LOs and agent’s optimal depth for buying LOs for Amazon stocks. (

**a**) agent’s optimal depth calculated with Equation (94), using the parameters in Table 9 at time zero. (

**b**) agent’s optimal depth calculated with Equation (94), using the parameters in Table 9 in 3 dimensions. (

**c**) agent’s optimal depth calculated with Equation (95), using the parameters in Table 9 at time zero. (

**d**) agent’s optimal depth calculated with Equation (95), using the parameters in Table 9 in 3 dimensions.

**Figure 10.**Agent’s optimal depth for selling LOs and agent’s optimal depth for buying LOs for Google stocks. (

**a**) agent’s optimal depth calculated with Equation (94), using the parameters in Table 10 at time zero. (

**b**) agent’s optimal depth calculated with Equation (94), using the parameters in Table 10 in 3 dimensions. (

**c**) agent’s optimal depth calculated with Equation (95), using the parameters in Table 10 at time zero. (

**d**) agent’s optimal depth calculated with Equation (95), using the parameters in Table 10 in 3 dimensions.

**Table 1.**Stock liquidity of AAPL (Apple), AMZN (Amazon), and GOOG (Google) for 21 June 2012 (Swishchuk and Huffman 2020).

Ticker | Avg # of Orders per Second | Price Changes in 1 Day |
---|---|---|

AAPL | 51 | 64,350 |

AMZN | 25 | 27,557 |

GOOG | 21 | 24,084 |

Parameter | Value Used | Parameter | Value Used |
---|---|---|---|

T | 1 | k | $0.001$ |

b | $0.001$ | $\mathfrak{N}$ | 1 |

$\alpha $ | 100 | $\frac{\lambda}{1-\mu}$ * | $2.4840$ |

a * | −$1.1463\times {10}^{-5}$ | $\varphi $ | $0.001$ |

Parameter | Value Used | Parameter | Value Used |
---|---|---|---|

T | 1 | k | $0.001$ |

b | $0.001$ | $\mathfrak{N}$ | 1 |

$\alpha $ | 100 | $\frac{\lambda}{1-\mu}$ * | $1.1110$ |

a * | −$2.7373\times {10}^{-5}$ | $\varphi $ | $0.01$ |

Parameter | Value Used | Parameter | Value Used |
---|---|---|---|

T | 1 | k | $0.001$ |

b | $0.001$ | $\mathfrak{N}$ | 1 |

$\alpha $ | 100 | $\frac{\lambda}{1-\mu}$ * | $0.8857$ |

a * | −$1.4301\times {10}^{-4}$ | $\varphi $ | $0.1$ |

Parameter | Value Used | Parameter | Value Used |
---|---|---|---|

T | 1 | k | $0.001$ |

b | 1000 | $\mathfrak{N}$ | 1 |

$\alpha $ | $0.01$ | $\frac{\lambda}{1-\mu}$ * | $2.4840$ |

a * | −$1.1463\times {10}^{-5}$ |

Parameter | Value Used | Parameter | Value Used |
---|---|---|---|

T | 1 | k | $0.001$ |

b | 1000 | $\mathfrak{N}$ | 1 |

$\alpha $ | $0.1$ | $\frac{\lambda}{1-\mu}$ * | $1.1110$ |

${a}^{*}$ | −$2.7373\times {10}^{-5}$ |

Parameter | Value Used | Parameter | Value Used |
---|---|---|---|

T | 1 | k | $0.001$ |

b | 1000 | $\mathfrak{N}$ | 1 |

$\alpha $ | $0.01$ | $\frac{\lambda}{1-\mu}$ * | $0.8857$ |

a * | −$1.4301\times {10}^{-4}$ |

Parameter | Value Used | Parameter | Value Used |
---|---|---|---|

T | 1 | $\kappa $ | 10 |

${\lambda}^{\pm}$ | $0.833$ | $\mathfrak{N}$ | 1 |

$\varphi $ | $0.1$ | $\frac{\lambda}{1-\mu}$ * | $2.4840$ |

a * | −$1.1463\times {10}^{-5}$ | $\alpha $ | 1 |

$\underset{\xaf}{q}$ | $-20$ | $\overline{q}$ | 20 |

Parameter | Value Used | Parameter | Value Used |
---|---|---|---|

T | 1 | $\kappa $ | 20 |

${\lambda}^{\pm}$ | $0.833$ | $\mathfrak{N}$ | 1 |

$\varphi $ | $0.1$ | $\frac{\lambda}{1-\mu}$ * | $1.1110$ |

a * | −$2.7373\times {10}^{-5}$ | $\alpha $ | 1 |

$\underset{\xaf}{q}$ | $-20$ | $\overline{q}$ | 20 |

Parameter | Value Used | Parameter | Value Used |
---|---|---|---|

T | 1 | $\kappa $ | 50 |

${\lambda}^{\pm}$ | $0.833$ | $\mathfrak{N}$ | 1 |

$\varphi $ | $0.1$ | $\frac{\lambda}{1-\mu}$ * | $0.8857$ |

a * | −$1.4301\times {10}^{-4}$ | $\alpha $ | 1 |

$\underset{\xaf}{q}$ | $-20$ | $\overline{q}$ | 20 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Roldan Contreras, A.; Swishchuk, A.
Optimal Liquidation, Acquisition and Market Making Problems in HFT under Hawkes Models for LOB. *Risks* **2022**, *10*, 160.
https://doi.org/10.3390/risks10080160

**AMA Style**

Roldan Contreras A, Swishchuk A.
Optimal Liquidation, Acquisition and Market Making Problems in HFT under Hawkes Models for LOB. *Risks*. 2022; 10(8):160.
https://doi.org/10.3390/risks10080160

**Chicago/Turabian Style**

Roldan Contreras, Ana, and Anatoliy Swishchuk.
2022. "Optimal Liquidation, Acquisition and Market Making Problems in HFT under Hawkes Models for LOB" *Risks* 10, no. 8: 160.
https://doi.org/10.3390/risks10080160