# Optimal Execution under Incomplete Information

Etienne Chevalier, Yadh Hafsi, Vathana Ly Vath

► To cite this version:

Etienne Chevalier, Yadh Hafsi, Vathana Ly Vath. Optimal Execution under Incomplete Information.
2024. hal-04817891

HAL Id: hal-04817891

https://hal.science/hal-04817891v1

Preprint submitted on 4 Dec 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Optimal Execution under Incomplete Information

Etienne CHEVALIER\* Yadh HAFSI † Vathana LY VATH ‡

December 4, 2024

## Abstract

We study optimal liquidation strategies under partial information for a single asset within a finite time horizon. We propose a model tailored for high-frequency trading, capturing price formation driven solely by order flow through mutually stimulating marked Hawkes processes. The model assumes a limit order book framework, accounting for both permanent price impact and transient market impact. Importantly, we incorporate liquidity as a hidden Markov process, influencing the intensities of the point processes governing bid and ask prices. Within this setting, we formulate the optimal liquidation problem as an impulse control problem. We elucidate the dynamics of the hidden Markov chain's filter and determine the related normalized filtering equations. We then express the value function as the limit of a sequence of auxiliary continuous functions, defined recursively. This characterization enables the use of a dynamic programming principle for optimal stopping problems and the determination of an optimal strategy. It also facilitates the development of an implementable algorithm to approximate the original liquidation problem. We enrich our analysis with numerical results and visualizations of candidate optimal strategies.

**Keywords:** Optimal Execution, Impulse Control, Stochastic Filtering, Hawkes Processes, Market Microstructure, Hidden Markov Chain.

**Mathematical subject classifications:** 93E20, 49L25, 91B28.

## 1 Introduction

In modern financial markets, the execution of large orders within short timeframes presents unique challenges. Traders must develop strategies to maximize profits while minimizing risks, navigating a complex landscape influenced by immediate market depth and liquidity constraints. The studies by Bouchaud, Farmer, and Lillo [14], Zhou [50], and Taranto et al. [49], for instance, highlight how large trades impact asset prices by depleting available market liquidity. This depletion occurs because the market's immediate depth is limited, meaning that a single large order can exhaust all current buyers or sellers. Consequently, splitting large orders into smaller blocks often proves advantageous, reducing the price impact and allowing for more efficient execution.

Research in market microstructure has extensively explored the optimal execution problem across various models of market impact and cost functions. For instance, Bertsimas and Lo [12] introduced one of the earliest frameworks for optimal trade execution, focusing on minimizing the total trading cost given a linear price impact. Almgren and Chriss [2] extended this line of research by considering a trade-off between volatility risk and liquidation costs. They incorporated linear permanent and temporary market impact models, providing a more dynamic approach to the execution problem. Their work

<footnote>\*Laboratoire de Mathématiques et Modélisation d'Evry, Université Paris-Saclay, UEVE, UMR 8071 CNRS, France; email: etienne.chevalier@univ-evry.fr</footnote>

<footnote>†Laboratoire de Mathématiques et Modélisation d'Evry, Université Paris-Saclay, UEVE, UMR 8071 CNRS, France; email: yadh.hafsi@universite-paris-saclay.fr</footnote>

<footnote>‡Laboratoire de Mathématiques et Modélisation d'Evry, Université Paris-Saclay, ENSIIE, UEVE, UMR 8071 CNRS, France; email: vathana.lyvath@ensiie.fr</footnote>
laid the groundwork for subsequent studies, including Ly Vath, Mnif, and Pham [36], Gatheral [30] and Obizhaeva and Wang [40], who examined different aspects of market impact and execution costs, proposing models that account for both temporary and permanent price impacts. Different extensions of these models have been introduced since then to include nonlinear impacts, reflecting more realistic trading conditions; see e.g. Bouchard, Dang, and Lehalle [13], Guéant, Lehalle, and Fernandez-Tapia [31], Guilbaud and Pham [32], Kalsi, Lyons, and Arribas [34], Popier and Zhou [43], Becherer, Bilarev, and Frentrup [10], Fu, Horst, and Xia [29], Cartea and Sánchez-Betancourt [20], and Carmona and Zeng [19].

Our study builds on this foundation by proposing a model tailored for high-frequency trading, capturing price formation driven solely by order flow. Our approach incorporates both permanent and transient market impacts, providing a comprehensive model that goes beyond the specific characteristics of a block-shaped limit order book. This framework extends the prior works of Predoiu, Shaikhet, and Shreve [44], Obizhaeva and Wang [40] as well as Chevalier et al. [23]. These earlier studies have examined nonlinear price impact models but considered order arrival processes as Poisson processes. In contrast, our model represents order arrivals through Hawkes processes. The use of mutually stimulating point processes to model order flow, as introduced by Bacry, Mastromatteo, and Muzy [6], allows for a more realistic representation of market dynamics. In fact, similarly to Alfonsi and Blanc [1], this approach recognizes the feedback loops present in high-frequency trading, where the occurrence of trades influences the likelihood of subsequent trades. However, our approach adopts a more general limit order book shape compared to Alfonsi and Blanc [1] as well as fixed transaction costs, broadening the representation of market impact and taking into account the inherent operational costs related to trading infrastructure.

As a subsequent step, our modeling approach incorporates the stochastic behavior of liquidity. In this context, we explore a more realistic approach to modeling market liquidity. Our study acknowledges that liquidity regimes are unobservable, which adds to the challenges presented by Alfonsi and Blanc [1]. These hidden aspects of market microstructure have been shown to substantially influence trading outcomes. For instance, the recent work by Chevalier, Hafsi, and Ly Vath [22], based on real market data, exhibits that the distribution of market liquidity is not directly observable and, furthermore, exhibits substantial intraday variation. Studies like Bayraktar and Ludkovski [9], Colaneri et al. [24] and Dammann and Ferrari [27] have begun addressing this gap by modeling hidden liquidity as a stochastic process. These works emphasize that ignoring hidden liquidity can lead to suboptimal execution strategies, as traders may underestimate the true market depth and the associated risks. We propose an approach that enables the integration of the dynamics of hidden liquidity, which we model as a hidden Markov process. This hidden Markov process influences the intensities of the point processes that govern the bid and ask prices, resulting in prices driven by Markov-modulated Hawkes processes.

Given the non-observable nature of liquidity within the limit order book, market participants must operate under a state of incomplete information. Consequently, they are required to estimate the prevailing liquidity conditions based solely on the observable order flow data. To address this challenge, we use stochastic filtering to derive our state variables under complete information. More precisely, we utilize the innovation approach for point processes described in the work of Brémaud [16] and Ceci and Gerardi [21]. This allows us to derive the Kushner-Stratonovich equations, which characterize the dynamics of our estimates for these hidden liquidity states as new information becomes available. This enables us to make informed trading decisions, ensuring that our strategies adapt to the evolving market conditions.

Once we have a method for estimating liquidity states, we move on to tackle an optimal liquidation problem formulated as an impulse control problem. The impulse control problem involves determining the optimal times and sizes of trades. We apply the separation principle, which simplifies the problem by treating the estimation and control tasks separately. This principle, rooted in control theory, allows us to manage the complexity of partial observation and control, as described by Menaldi [39], Fleming and Pardoux [28], Mazziotto and Szpirglas [38], and Mazliak [37]. This approach has been particularly effective in systems where the underlying state variables cannot be directly observed, requiring robust estimation techniques to guide optimal control actions. Next, we derive an approximating sequence of auxiliary functions defined recursively. This approach has also been utilized in the works of Bayraktar and Ludkovski [8] and Ludkovski and Sezer [35], among others. We prove that this sequence of
functions is continuous and converges locally uniformly to the original value function. This characterization enables the use of a dynamic programming principle for closed loop optimal stopping problems, providing us with a critical argument for the explicit determination of the optimal liquidation strategy. Our model introduces complexities and specific features that make it challenging to adapt the previously established mathematical tools. Overall, our approach to optimal execution incorporates a broad range of market conditions and dynamics, marking a first in taking into account both hidden liquidity states and generalized limit order book shapes with fixed transaction costs, to our knowledge.

The article is structured in the following manner. In Section 2, the primary aim is to develop a model that characterizes the dynamics of a Limit Order Book (LOB) within a framework that accounts for the stochastic nature of market liquidity. In Section 3, we elucidate the dynamics of the filter using the Kushner-Stratonovich equations, which allows to update the estimates of the hidden liquidity states based on new information (see Theorem 3.1). Section 4 formulates the impulse control problem and to transition to a full information setup using the separation principle. It also introduces an approximating sequence of functions to characterize the value function and states the dynamic programming principle in various forms. In Section 5, we investigate the regularity of the value function, which will pave the way for constructing an optimal strategy under the given market conditions through the Verification Theorem 5.1. Finally, in Section 6, we provide numerical illustrations of the shape of the optimal exercise region while assessing the influence of the state variables and the price impact on the candidate optimal liquidation policy.

# 2 Model Setup

In this section, our objective is to characterize the dynamics of a limit order book subject to recurrent buy and sell market orders within a framework of stochastic liquidity. Expanding upon the model proposed by Alfonsi and Blanc [1] for a single asset, we generalize the impact function and move beyond the constraints of a block-shaped LOB. This model is selected due to its suitability for high-frequency trading, as it captures price formation driven by order flow through mutually exciting point processes. We will further extend this framework across various liquidity regimes by employing Markov-modulated processes.

## 2.1 Liquidity Dynamics

Consider a complete filtered probability space $(\Omega, \mathcal{F}, \mathcal{F} = \{\mathcal{F}_t\}_{t \ge 0}, \mathbb{P})$, where $\{\mathcal{F}_t\}_{t \ge 0}$ is a right-continuous filtration. Throughout this paper, any equality between random variables is understood to hold $\mathbb{P}$-almost surely, though this is not always explicitly stated.

**Markov Chain.** Let $\{I_t\}_{t \ge 0}$ be a continuous-time Markov chain with values in a finite state space $E = \{1, \dots, d\} \subset \mathbb{N}$ and with càdlàg sample paths. Let $\mathcal{F}^I = \{\mathcal{F}_t^I\}_{t \ge 0}$ denote the natural filtration generated by $I$, augmented by the $\mathbb{P}$-null sets. The process $I$ represents the liquidity state within the limit order book. This process is driven by a possibly time-dependent transition rate matrix $\psi(t) = (\psi_{jk}(t))_{1 \le j, k \le d}$, such that, for all $t \ge 0$,

$$ \psi_{ij}(t) = \lim_{h \to 0} \frac{\mathbb{P}(I_{t+h} = j | I_t = i)}{h}, \quad \forall i \neq j. $$

The transition rate matrix $\psi(t)$ captures the probabilities of transitioning between different liquidity states over infinitesimally small time intervals. The off-diagonal elements $\psi_{ij}(t)$ for $i \neq j$ represent the instantaneous rate of transitioning from state $i$ to state $j$. We assume that $I$ is stable and conservative, i.e., for all $(j, k) \in E^2$ and $t \ge 0$,

$$ \psi_{jj}(t) = -\sum_{k \neq j} \psi_{jk}(t), \quad \text{and} \quad \psi_{jj}(t) < +\infty. $$

**Order Arrivals.** Let $i \in E$ be a market regime. Consider the sequences $(\tau_k^{i,+})_{k \ge 1}$ and $(\tau_k^{i,-})_{k \ge 1}$ of strictly increasing positive $\mathcal{F}$-measurable stopping times and $(v_k^{i,+})_{k \ge 1}$ and $(v_k^{i,-})_{k \ge 1}$ as a sequence
of i.i.d $\mathbb{R}_+$-valued $\mathcal{F}$-measurable random variables. Here, $(\tau_k^{i,+})_{k \ge 1}$ and $(\tau_k^{i,-})_{k \ge 1}$ represent the arrival times of buy and sell market orders, respectively, while $(v_k^{i,+})_{k \ge 1}$ and $(v_k^{i,-})_{k \ge 1}$ represent the corresponding order volumes. We define $n^{i,+}$ and $n^{i,-}$ as the Poisson counting measures on $\mathbb{R}^+ \times \mathbb{R}^+$ associated with the cadlag symmetric two-dimensional Marked Hawkes process defined on the measurable space $(\mathbb{R}_+ \times \mathbb{R}_+, \mathcal{B} \otimes \mathcal{B})$, where $\mathcal{B}$ denotes the Borel $\sigma$-field on $\mathbb{R}_+$. These processes correspond to the sets of points $\{(\tau_k^{i,+}, v_k^{i,+}); k \ge 1\}$ and $\{(\tau_k^{i,-}, v_k^{i,-}); k \ge 1\}$, respectively. Therefore, for all $C \in \mathcal{B} \otimes \mathcal{B}$,

$$n^{i,+}(C) := \sum_{k \ge 1} \mathbb{1}_C(\tau_k^{i,+}, v_k^{i,+}), \quad \text{and} \quad n^{i,-}(C) := \sum_{k \ge 1} \mathbb{1}_C(\tau_k^{i,-}, v_k^{i,-}).$$

We consider the filtration $\mathcal{F}^{i,N} = \{\mathcal{F}_t^{i,N}\}_{t \ge 0}$, which represents the natural filtration of the processes $(n^{i,+}, n^{i,-})$, specifically defined for all $i \in \mathcal{E}$ and $t \in \mathbb{R}_+$ as

$$\mathcal{F}_t^{i,N} := \bigvee_{k \in \{+, -\}} \sigma(n^{i,k}(s, v); s \in [0, t], v \in \mathbb{R}_+).$$

Additionally, we introduce the filtration $\mathcal{F}^{I,N} = \{\mathcal{F}_t^{I,N}\}_{t \ge 0}$ as the natural filtration of the processes $(n^{i,+})_{i \in \mathcal{E}}$, $(n^{i,-})_{i \in \mathcal{E}}$ and $I$, enlarged by the $\mathbb{P}$-null sets $\mathcal{N}$, such that for all $t \ge 0$,

$$\mathcal{F}_t^{I,N} := \left( \bigvee_{i \in \mathcal{E}} \mathcal{F}_t^{N,i} \vee \mathcal{F}_t^I \right) \vee \mathcal{N}.$$

**Intensity Dynamics and Combined Measures.** In this Markovian framework, we define the volume distributions $\nu_i$ along with the $\mathcal{F}^{i,N}$-intensities $\lambda_t^{i,+}$ and $\lambda_t^{i,-}$. The order intensities $\lambda^{i,+}$ and $\lambda^{i,-}$ return to their baseline intensity levels $\lambda_\infty^i$ at a rate of $\beta_i$ and are influenced by previous order arrivals through the functions $\varphi_s^i$ and $\varphi_c^i$, for each liquidity regime $i \in \mathcal{E}$. In other words,

$$\left\{
\begin{array}{l}
\mathrm{d}\lambda_t^{i,+} = -\beta_i (\lambda_t^{i,+} - \lambda_\infty^i) \mathrm{d}t + \int_{\mathbb{R}_+} \varphi_s^i(v/m_1) n^{i,+}(\mathrm{d}t, \mathrm{d}v) + \int_{\mathbb{R}_+} \varphi_c^i(v/m_1) n^{i,-}(\mathrm{d}t, \mathrm{d}v), \\
\mathrm{d}\lambda_t^{i,-} = -\beta_i (\lambda_t^{i,-} - \lambda_\infty^i) \mathrm{d}t + \int_{\mathbb{R}_+} \varphi_c^i(v/m_1) n^{i,+}(\mathrm{d}t, \mathrm{d}v) + \int_{\mathbb{R}_+} \varphi_s^i(v/m_1) n^{i,-}(\mathrm{d}t, \mathrm{d}v), \\
\lambda_0^{i,+} = \kappa^{i,+}, \lambda_0^{i,-} = \kappa^{i,-},
\end{array}
\right.
\quad (1)$$

where $\varphi_c^i, \varphi_s^i: \mathbb{R}^+ \times \mathbb{N} \to \mathbb{R}^+$ are measurable positive functions, $(\beta_i)_{1 \le i \le d}$, and $\lambda_\infty^i$ are positive reals, $m_1 := \int_{\mathbb{R}_+} v\nu_i(\mathrm{d}v) < +\infty$, for $t \ge 0$.

Next, we introduce the $(\mathbb{P}, \mathcal{F}^{I,N})$-intensities

$$\lambda_t^+ := \sum_{i=1}^d \mathbb{1}_{\{I_t=i\}} \lambda_t^{i,+}, \quad \text{and} \quad \lambda_t^- := \sum_{i=1}^d \mathbb{1}_{\{I_t=i\}} \lambda_t^{i,-}. \qquad (2)$$

These intensities reflect the aggregated effect of the individual intensities $\lambda^{i,+}$ and $\lambda^{i,-}$, weighted by the current liquidity state $I_t$. This aligns with the conclusions drawn by Chevalier, Hafsi, and Ly Vath [22], where it is shown that the order arrival intensities fluctuate with the order book's liquidity. Consequently, the corresponding counting measures $n^+$ and $n^-$ for the buy and sell orders satisfy, for all $C \in \mathcal{B} \otimes \mathcal{B}$,

$$n^+(C) := \sum_{i=1}^d \sum_{k \ge 1} \mathbb{1}_{\{I_{\tau_k^{i,+}=i} = i\}} \cdot \mathbb{1}_C(\tau_k^{i,+}, v_k^{i,+}), \quad \text{and} \quad n^-(C) := \sum_{i=1}^d \sum_{k \ge 1} \mathbb{1}_{\{I_{\tau_k^{i,-}=i} = i\}} \cdot \mathbb{1}_C(\tau_k^{i,-}, v_k^{i,-}).$$

We denote $\mathcal{F}^N = \{\mathcal{F}_t^N\}_{t \ge 0}$ as the natural filtration associated to $(n^+, n^-)$ and define the marginal processes $N_t^{i,\pm} := \int_0^t \int_{\mathbb{R}_+} n^{i,\pm}(\mathrm{d}u, \mathrm{d}v)$, counting the number of incoming buy and sell orders, respectively, up to time $t$ within each liquidity regime $i \in \mathcal{E}$. Following the definition of the intensities $\lambda^+$ and $\lambda^-$, the associated processes $N^+$ and $N^-$ can be expressed as

$$N_t^+ := N_0^+ + \int_0^t \sum_{i=1}^d \mathbb{1}_{\{I_s=i\}} \mathrm{d}N_s^{i,+}, \quad \text{and} \quad N_t^- := N_0^- + \int_0^t \sum_{i=1}^d \mathbb{1}_{\{I_s=i\}} \mathrm{d}N_s^{i,-}, \quad t \ge 0.$$
We focus on the scenario where the marks are identically and independently distributed according to a common law $\nu_i$ on $\mathbb{R}^+$ on each regime $i \in E$, i.e. for any $A \in \mathcal{B}(\mathbb{R}^+)$ and $t \ge 0$ (See Definition 6.4.III and Section 7.3 in Daley and Vere-Jones [26]),

$$ \lambda_t^{i, \pm} \nu_i(A) = \lim_{h \to 0^+} \frac{1}{h} \mathbb{E} \left[ \int_t^{t+h} \int_A n^{i, \pm}(du, dv) \mid \mathcal{F}_t^N \right]. $$

To ensure the well-definedness of the subsequent processes and to guarantee the non-explosiveness of $N^+$ and $N^-$, we introduce the following assumptions:

**Assumptions 2.1.** The following conditions must hold for all $i \in E$:

(A1) The first and second moments are finite:

$$ m_1 := \int_{\mathbb{R}^+} v \nu_i(dv) < +\infty, \quad m_2 := \int_{\mathbb{R}^+} v^2 \nu_i(dv) < +\infty. $$

(A2) The following integrals are finite:

$$ \int_{\mathbb{R}^+} (\varphi_s^i)^2 \left( \frac{v}{m_1} \right) \nu_i(dv) < +\infty, \quad \int_{\mathbb{R}^+} (\varphi_c^i)^2 \left( \frac{v}{m_1} \right) \nu_i(dv) < +\infty. $$

(A3) The spectral radius of the branching matrix satisfies:

$$ \sup_{\lambda \in \rho(\|\Gamma\|)} |\lambda| < 1, $$

where $\|\Gamma\| = \{\|\gamma^{jk}\|\}_{(j,k) \in \{+, -\} \times \{s, c\}}$ and $\rho(\|\Gamma\|)$ is the set of all eigenvalues of $\|\Gamma(t)\|$.

(A4) The decay functions $\gamma^{jk}(t) := \int_0^{+\infty} e^{-\beta_j t} \varphi_k^j(v) dv$ satisfy:

$$ \int_0^{+\infty} t \gamma^{jk}(t) dt < +\infty, \quad \forall (j, k) \in \{+, -\} \times \{s, c\}. $$

These assumptions establish the necessary conditions for the existence and uniqueness of the associated point processes.

**Proposition 2.1** (Theorem 8 of Brémaud and Massoulié [17]). Suppose that Assumptions 2.1 are satisfied, then there exists a unique point process $N^{i,k}$ with associated intensity process $\lambda^{i,k}$, for all $i \in E$ and $k \in \{+, -\}$.

<figure><img src="image_2.png" /><figcaption>Figure 1: Representation of a Markov-Modulated Hawkes Process (MMHP) featuring an exponential Hawkes process intertwined with a two-state Markov chain.</figcaption></figure>
## 2.2 Price Modelling

Empirical evidence suggests that an order's price impact is non-linear (see Brokmann et al. [18]). Given our interest in short-term liquidity, we derive the market impact function by directly integrating the density of the limit order book. We choose a general "shape function" of the LOB (see Predoiu, Shaikhet, and Shreve [44], Obizhaeva and Wang [40] and Aurélien Alfonsi and Schied [3] for example) that is represented by a depth density function $f: \mathbb{R}^+ \to \mathbb{R}^+$. The density function measures the frequency of orders per unit price in the LOB. In this order book configuration, the quantity available at a distance $\Delta p \ge 0$ from the mid-price $p$ is expressed as $V(\Delta p) := \int_0^{\Delta p} f(x)dx$. The price impact $Q: \mathbb{R}_+ \to \mathbb{R}_+$ of an order executed with a size $v$ is continuous on $\mathbb{R}_+^*$ and is determined by the inverse function of $V$, denoted as $Q(v) := V^{-1}(v)$. Here, $p - Q(v)$ represents the post-trade price resulting from a large investor trading a position of $v$ shares of stock, where $p$ represents the pre-trade mid-price. Generally, $Q(0)$ equals zero, signifying that no trading activity leads to no impact on the price.

**Example 2.1 (Block-Shape).** In the work by Obizhaeva and Wang [40], the authors introduce an example of a block-shaped limit order book, where the density functions are represented as $x \mapsto f(x) = q$, with $q$ being a positive constant.

**Example 2.2 (Power-Shape).** An illustrative instance that aligns with the concave price impact and similar findings by Brokmann et al. [18] and Avellaneda and Stoikov [4] is the power density function $x \mapsto f(x) = cx^{-1+e}$, where $c$ and $e$ are positive constants.

We define the price process $P$ based on the order flow $(n^+, n^-)$ and suppose that it is $\mathcal{F}^N$-measurable. This means we rely exclusively on the filtration $\mathcal{F}^N$, without observing the filtration $\mathcal{F}^I$ generated by the liquidity process $I$. Consequently, the liquidity status of the traded asset might not be directly observable. As per convention, a buy order contributes positively to $P$, whereas a sell order results in a decrease in $P$. It is assumed that the price $P$ is a càdlàg process. We depict it as a composition of a fundamental price component $S$ and a price deviation process $D$, i.e.,

$$P_t := S_t + D_t, \quad \forall t \ge 0.$$

We propose to maintain the framework of the impact model introduced by Obizhaeva and Wang [40] and to assess it under different liquidity regimes in the order book in order to account for these variations when evaluating transaction costs. We consider the following price dynamics:

$$\left\{ \begin{array}{l} dS_t = \nu \int_{\mathbb{R}_+} Q(v)n(dt, dv), \\ dD_t = -\rho D_t - dt + (1 - \nu) \int_{\mathbb{R}_+} Q(v)n(dt, dv), \quad \forall t \ge 0, \\ S_0 = s, D_0 = d, \end{array} \right. \quad (3)$$

where $n := n^+ - n^-$. This means that a fraction $v$ of the price impact persists permanently, while the complementary fraction $1 - v$ exhibits transient behavior, decaying exponentially with a rate parameter $\rho > 0$. Finally, the asset bankruptcy time is defined as the $\mathcal{F}^N$-stopping time

$$\tau_S := \inf \{u \in [t, T] : P_u < 0\} \wedge T, \quad (4)$$

$$\text{with } \inf\{\emptyset\} = +\infty.$$

**Remark 2.1.** Adapting Corollary 1 from Bacry et al. [5], we obtain similar results to Alfonsi and Blanc [1] regarding the convergence in law of $S_{\mu t}/\sqrt{m}$ to a non-standard Brownian motion with zero drift when $m$ goes to infinity. This is significant because it implies that the price dynamics are governed by a diffusion process in low-frequency asymptotic, aligning with the classical literature on the topic.

## 3 The Filtering Equations

In the subsequent discussion, we define $\mathcal{F}^I$ as a sub-$\sigma$-field generated by the process $I$, where $\mathcal{F}_t^I$ is defined as $\sigma(I_s; s \in [0, t])$ for all $t \in [0, T]$. We also consider $\mathbb{G} = \{G_t\}_{t \ge 0}$ as the initial enlargement of $\mathcal{F}^N$, with $G_t := \sigma(\mathcal{F}_t^N, \sigma(\{I_t\}_{t \ge 0}))$ for all $t \ge 0$. The filtration $\mathbb{G}$ encapsulates the information available to a hypothetical observer who knows the entire path of $I$ from the outset at time $t = 0$.
Given that the liquidity status of the limit order book is not directly observable, there exists inherent information incompleteness. Consequently, market participants must estimate it using the data they have gathered. Here, we present a scenario where they must rely solely on observed order flow $\mathcal{F}^N$ to make such estimations.

**Assumptions 3.1.** We assume, without loss of generality, that the Markov chain $I$ and the jump processes $N^+$ and $N^-$ have no mutual covariation.

**Remark 3.1.** The proofs in Appendix A cover mutual covariations, but we omit them here to simplify notation, as they add little value to the model.

Since the process $I$ is not observable, we need to rigorously construct the model introduced in Section 2. Our aim is to properly define the probability measure $\mathbb{P}$ under which $N^+$ and $N^-$ have intensities $\lambda^+$ and $\lambda^-$, respectively, as described in (2). To achieve this, we use a change of measure technique, constructing $\mathbb{P}$ from an auxiliary probability measure $\mathbb{Q}$. Under this measure $\mathbb{Q}$, the observations $(N^+, N^-)$ transform into a Lévy process, corresponding to a unit rate Poisson process. We define the Doléans-Dade exponential process $Z = (Z_t)_{t \in [0,T]}$,

$$Z_t := \prod_{k \in \{+, -\}} \exp \left\{ - \int_0^t \log (\lambda_{s-}^k) \, dN_s^k - \int_0^t (1 - \lambda_s^k) \, ds \right\}, \quad \mathbb{P}-a.s.$$

**Proposition 3.1.** Assume that the conditions for existence and uniqueness outlined in Proposition 2.1 are satisfied. Then, $\mathbb{E}^\mathbb{Q}(Z_t) = 1$. Additionally, $Z$ is a positive $(\mathbb{P}, \mathcal{G})$-martingale satisfying

$$dZ_t = Z_{t-} \sum_{k \in \{+, -\}} ((\lambda_{t-}^k)^{-1} - 1) \left[ dN_t^k - \lambda_t^k dt \right], \quad \mathbb{P}-a.s. \qquad (5)$$

*Proof.* The conditions specified in Proposition 2.1 imply the uniform integrability of the process $Z$. The rest of the proof follows directly from Sokol and Hansen [48]. □

Proposition 3.1 enables the application of the Girsanov theorem, using the Radon-Nikodym density $Z^{-1}$ to establish the probability measure $\mathbb{P}$ on $(\Omega, \mathcal{G})$. Specifically, the relationship between $\mathbb{P}$ and $\mathbb{Q}$ is given by $\frac{d\mathbb{P}}{d\mathbb{Q}}|_{g_t} = Z_t^{-1}$, for all $t \in [0, T]$. As described in Brachetta et al. [15], $N^+$ and $N^-$ are Lévy Poisson processes under $\mathbb{Q}$. Foremost, it's essential to highlight that their intensities are independent of $I$ under $\mathbb{Q}$.

**Notation 3.1.** To improve the clarity of our findings, we define $\hat{Y}$ as the optional projection of an $\mathcal{F}^N$-progressively measurable process $Y$ in what follows.

As the process $I$ is partially observable, deriving an estimate based on the available information $\mathcal{F}^N$ becomes essential to address the control problem (12). This estimation is defined as the projection of $I$ within the domain of stochastic processes, denoted as $L = \{Y_t \in L^2(\mathbb{P}), \forall t \ge 0 : Y$ is $\mathcal{F}^N$-measurable\}$. We define the optional projection of $(\varphi(I_t))_{t \ge 0}$ as

$$\begin{aligned} \pi_{\tau}(\varphi) &:= \widehat{\varphi(I_{\tau})} \mathbb{1}_{\{\tau < +\infty\}} \\ &= \mathbb{E} \left[ \varphi(I_{\tau}) \mathbb{1}_{\{\tau < +\infty\}} \mid \mathcal{F}_{\tau}^{N} \right], \quad \mathbb{P}-a.s., \end{aligned} \qquad (6)$$

where $\tau$ is an $\mathcal{F}^N$-predictable stopping time and $\varphi$ are bounded measurable functions from $\mathbb{R}$ to $\mathbb{R}$.

**Remark 3.2.** As specified in Section II of Bain and Crisan [7], it is crucial to correctly construct an $\mathcal{F}$-adapted process when dealing with a process that is not adapted to the filtration $\mathcal{F}$. Unlike discrete time scenarios, directly using the process defined by the conditional expectation $\mathbb{E}[Y_t \mid \mathcal{F}_t]$, for all $t \in [0, T]$, is not viable due to its potential lack of uniqueness in null sets dependent on $t$. This means that the process $t \mapsto \pi_t(\varphi)$ would only be defined up to modification. Such a definition could lead to an unspecified process over a set of strictly positive measure, which is undesirable. As specified in Rao [46], a proper way to uniquely characterize the optional projection up to indistinguishability for a bounded measurable process is through (6).
Now let $(\pi(1), \dots, \pi(d))$ describe the conditional probabilities varying on the unit simplex $\mathcal{S} := \{(\pi(1), \dots, \pi(d)) \in \mathbb{R}_+^d; \pi(1) \ge 0, \dots, \pi(d) \ge 0, \sum_{i=1}^d \pi(i) = 1\}$, such that

$$ \pi_{\tau}(i) = \mathbb{P}(\{I_{\tau} = i\} | \mathcal{F}_{\tau}^{N}), \qquad (7) $$

where $\tau$ is an $\mathcal{F}^N$-predictable stopping time bounded by $[0, T]$. Since the filter (6) can be fully described by the conditional probability processes $(\pi_t(i))_{t \in [0, T]}$, we intend to state the filtering equations for $(\pi_t(i))_{t \in [0, T]}$ only in the following, with $i \in E$. However, complete proofs of these equations are provided in the appendix for the case of a filtering problem where the observed processes and unobserved variables are marked point processes and taking into account the covariances between.

**Theorem 3.1** (Kushner-Stratonovich equations). Let $t \in [0, T]$ and $i \in E$. The filter (7) is the unique $\mathcal{F}^N$-adapted càdlàg solution of the stochastic differential equation

$$ d\pi_t(i) = \sum_{l=1}^{d} \psi_{li}(t)\pi_{t-}(l)dt + \sum_{k \in \{+, -\}} \pi_{t-}(i) \left( \frac{\lambda_{t-}^{i,k}}{\sum_{j=1}^{d} \pi_{t-}(j)\lambda_{t-}^{j,k}} - 1 \right) \times \left[ dN_t^k - \sum_{j=1}^{d} \pi_{t-}(j)\lambda_{t-}^{j,k}dt \right], \quad (8) $$

with $\pi_0 = \mu \in \mathcal{S}$. Additionally, the processes $(\pi(1), \dots, \pi(d))$ are piecewise-deterministic Markov processes (PDMP).

*Proof.* Let $i \in E$, and $(\tau_k^0)_{k \ge 0}$ be the jump times of the counting process $N^+ + N^-$. The fact that $\pi(i)$ is a strong solution to the Kushner-Stratonovich equations follows directly from Proposition A.2. The uniqueness of this solution is established by the results presented in Ceci and Gerardi [21] and Brachetta et al. [15]. Moreover, this implies that the trajectories of $(\pi(1), \dots, \pi(d))$ are guided by a system of ordinary differential equations (ODEs) during the intervals between the jump times of $N^+$ and $N^-$. In fact, based on the definition of the dynamics of the intensities (1), we have that, for all $\tau_k^0 \le t \le u < \tau_{k+1}^0$,

$$ d\lambda_u^{i,+} = -\beta_i (\lambda_u^{i,+} - \lambda_\infty^i) du, \quad \text{and} \quad d\lambda_u^{i,-} = -\beta_i (\lambda_u^{i,-} - \lambda_\infty^i) du, $$

Hence, for all $\tau_k^0 \le t \le u < \tau_{k+1}^0$,

$$ \lambda_u^{i,+} = (\lambda_t^{i,+} - \lambda_\infty^i)e^{-\beta_i(u-t)} + \lambda_\infty^i, \quad \text{and} \quad \lambda_u^{i,-} = (\lambda_t^{i,-} - \lambda_\infty^i)e^{-\beta_i(u-t)} + \lambda_\infty^i. $$

Additionally, we know that $\pi(i)$ is governed by the following differential equation between two jumps and that, for all $\tau_k^0 \le t \le u < \tau_{k+1}^0$,

$$ d\pi_u(i) = \sum_{l=1}^{d} \psi_{li}(u)\pi_{u-}(l)du - \sum_{k \in \{+, -\}} \pi_{u-}(i) \left( \lambda_{u-}^{i,k} - \sum_{j=1}^{d} \pi_{u-}(j)\lambda_{u-}^{j,k} \right) du, \quad (9) $$

with $\pi_t = \mu \in \mathcal{S}$. Consequently, the processes $(\pi(1), \dots, \pi(d))$ are characterized as piecewise-deterministic Markov processes (PDMPs). $\square$

# 4 Optimal Liquidation Problem

## 4.1 Control Problem Formulation

Our objective is to address an optimal liquidation problem within a finite time horizon $T$. Given the structure of the limit order book under consideration (see Subsection 2.2), the transaction price for a trade of volume $v$ is expressed as

$$ \begin{aligned} C(p, v) &:= \int_{0}^{Q(v)} (p - y) f(y) dy - c_0 \\ &= pv - \int_{0}^{Q(v)} yf(y)dy - c_0, \end{aligned} \qquad (10) $$
with $(p, v) \in \mathbb{R}_+ \times \mathbb{R}_+$, and $c_0 > 0$ a fixed constant. Since we explore a scenario where an agent engages with financial markets on a high-frequency timescale, observations are made at discrete intervals. In this context, employing impulse controls appears to be a logical choice. Furthermore, the fixed transaction cost $c_0$ deters small-sized orders by enforcing a minimum order size, it disallows continuous trading.

**Definition 4.1** (Admissible strategies). Define $\mathcal{A}_t(x)$ as the set of admissible controls for an agent with a position $x \in \mathbb{R}_+$ at time $t \in [0, T]$. An admissible liquidation strategy $\alpha \in \mathcal{A}_t(x)$ consists of a sequence $\alpha = (\tau_k, \xi_k)_{k \ge 1}$, where $(\tau_k)_{k \ge 1}$ is an increasing sequence of $\mathcal{F}^N$-stopping times and $(\xi_k)_{k \ge 1}$ a sequence of $\mathcal{F}^N$-measurable, $\mathbb{R}_+$-valued random variables such that $\sum_{t \le \tau_k \le T} \xi_k = x$.

The agent's holdings $X^\alpha$ form an $\mathcal{F}^N$-progressively measurable process. We define the controlled dynamics of the processes $S^\alpha$, $D^\alpha$, and $X^\alpha$ as

$$ 
\left\{ 
\begin{aligned}
dS_u^\alpha &= \nu \int_{\mathbb{R}_+} Q(v)n(du, dv), \quad \text{for } \tau_k < u \le \tau_{k+1} \\
S_{\tau_k^+}^\alpha &= S_{\tau_k}^\alpha - \nu Q(\xi_k), \\
dD_u^\alpha &= -\rho D_{u-}^\alpha du + (1-\nu) \int_{\mathbb{R}_+} Q(v)n(du, dv), \quad \text{for } \tau_k < u \le \tau_{k+1} \\
D_{\tau_k^+}^\alpha &= D_{\tau_k}^\alpha - (1-\nu)Q(\xi_k), \\
X_{\tau_k^+}^\alpha &= X_{\tau_k}^\alpha + \xi_k, \\
S_t^\alpha &= s, D_t^\alpha = d, X_t^\alpha = x,
\end{aligned}
\right. 
\quad (11) 
$$

with $u \in [t, \tau_S]$, $k \in \mathbb{N}^*$, $v \in [0, 1]$, and $\alpha = (\tau_k, \xi_k)_{k \ge 1}$ an admissible strategy (see Definition 4.1). By applying classical theory (see Brémaud [16]), we can readily conclude that the aforementioned system of stochastic differential equations has a unique strong solution. Note that the dynamics of $P$, $S$ and $D$ are partially observable while $P$, $S$ and $D$ themselves are observable. The fact that $P$, $S$ and $D$ are $\mathcal{F}^N$-adapted implies that there are no additional terms driving the filter (6).

**Notation 4.1.** We denote the domain $\mathbb{R}_+ \times \mathbb{R}^2 \times (\mathbb{R}_+^d)^2 \times S$ by $\mathcal{D}$. The conditional expectation given $(X_t^\alpha, S_t^\alpha, D_t^\alpha, \bar{\lambda}_t^+, \bar{\lambda}_t^-, \pi_t)$ under the probability measure $P$ is denoted by

$$ \mathbb{E}_{t,y}[\cdot] = \mathbb{E}^P \left[ \cdot \mid X_t^\alpha, S_t^\alpha, D_t^\alpha, \bar{\lambda}_t^+, \bar{\lambda}_t^-, \pi_t = x, d, s, \kappa^+, \kappa^-, \mu \right], $$

$$ \text{where } y = (x, s, d, \kappa^+, \kappa^-, \mu) \in \mathcal{D}, \alpha \in \mathcal{A}(x), \bar{\lambda}^+ = (\lambda^{i,+})_{i \in E}, \bar{\lambda}^- = (\lambda^{i,-})_{i \in E}, \text{ and } \pi = (\pi(i))_{i \in E}. $$

We aim to solve an optimal execution problem in feedback form from the perspective of a market participant seeking to liquidate a position $X_t = x$ within a finite time horizon on a single stock, ensuring a zero terminal inventory at time $\tau_S$. The optimization involves minimizing costs while adhering to execution constraints. We will examine $\mathcal{F}^N$-adapted execution strategies involving a series of discrete trades. We aim to maximize the revenue $J$ over the set of admissible strategies, such that

$$ J(t, y, \alpha) := \mathbb{E}_{t,y} \left[ \sum_k \mathbb{1}_{\{t \le \tau_k \le \tau_S\}} C(S_{\tau_k}^\alpha + D_{\tau_k}^\alpha, |\Delta X_{\tau_k}|) + C(S_{\tau_S}^\alpha + D_{\tau_S}^\alpha, X_{\tau_S}^\alpha) \right]. \quad (12) $$

with $t \in [0, T]$, $y \in \mathcal{D}$, $\alpha \in \mathcal{A}(x)$, and $\tau_S$ the bankruptcy time defined in (4). The corresponding value function $V: [0, T] \times \mathcal{D} \to \mathbb{R}$ is equal to

$$ V(t, y) := \sup_{\alpha \in \mathcal{A}_t(x)} J(t, y, \alpha). \quad (13) $$

The problem at hand is equivalent to one with partial observation, as the separation principle (see Fleming and Pardoux [28] and Mazziotto and Szpirglas [38]) enables control and filtering to be disentangled, allowing them to be handled as separate tasks.

We conclude this section with a standard result regarding the finiteness of the value function.

**Proposition 4.1.** The value function $V$ described in (13) is finite.
Proof. Let $t \in [0, T]$, $y = (x, s, d, \kappa^+, \kappa^-, \mu) \in \mathcal{D}$ and $\alpha \in \mathcal{A}_t(x)$. Based on (10),

$$ 
\begin{aligned}
C(P_t, x) & \le P_t \int_0^{Q(x)} f(y)dy - c_0 \\
& \le P_t x.
\end{aligned}
$$

Using Assumptions 2.1, we get that $\sup_{i \in E} \mathbb{E}_{t,y} \left[ \sup_{s \in [0,t]} \left( \int_0^s Q(v) n^{i,\pm}(dv, du) \right)^2 \right] < +\infty$. This leads to $\mathbb{E}_{t,y} \left[ \sup_{s \in [0,t]} S_s^2 \right] < +\infty$ and $\mathbb{E}_{t,y} \left[ \sup_{s \in [0,t]} D_s^2 \right] < +\infty$, for all $t \in [0, T]$. Conversely, given that $p \mapsto C(p, x)$ is non-decreasing on $\mathbb{R}_+$, we have that

$$ 
\begin{aligned}
J(t, y, \alpha) & \le \mathbb{E}_{t,y} \left[ \sum_{\tau_k \in [t, \tau_S]} C \left( \sup_{s \in [t, T]} S_s + D_s, \xi_{\tau_k} \right) + S_{\tau_S} + D_{\tau_S} \right] \\
& \le \mathbb{E}_{t,y} \left[ \sup_{s \in [t, T]} (S_s + D_s) \left( 1 + \sum_{\tau_k \in [t, \tau_S]} \xi_{\tau_k} \right) \right] \\
& \le (1 + x) \mathbb{E}_{t,y} \left[ \sup_{s \in [t, T]} (S_s + D_s) \right] < +\infty.
\end{aligned}
$$

Since $\alpha$ is arbitrary, we conclude that $V$ is finite. $\square$

## 4.2 Dynamic Programming Principle

When addressing the impulse control problem, it is standard practice to start by defining the value function as the solution to its corresponding Hamilton-Jacobi-Bellman Quasi-Variational Inequality (HJBQVI) using the dynamic programming principle. The expected approach is to solve the equation

$$ \min \{-\mathcal{L}V, V - \mathcal{M}V\} = 0, \text{ on } [0, T[ \times \mathbb{R}_+ \times \mathbb{R}_+^2 \times (\mathbb{R}_+^d)^2 \times \mathcal{S}. $$

The boundary/terminal conditions here are

$$ 
\begin{aligned}
V(t, 0, s, d, \kappa^+, \kappa^-, \mu) &= 0, \\
V(T, x, s, d, \kappa^+, \kappa^-, \mu) &= C(s+d, x), \\
V(t, x, s, d, \kappa^+, \kappa^-, \mu) &= C(s+d, x).
\end{aligned}
$$

The partial integro-differential operator $\mathcal{L}$ is defined as

$$ 
\begin{aligned}
\mathcal{L}\varphi(t, x, s, d, \kappa^+, \kappa^-, \mu) := & \partial_t\varphi - \rho d\partial_d\varphi - \sum_{i=1}^d \mu_i\beta_i \left[ (\kappa^{i,+} - \lambda_\infty^i)\partial_{\kappa^+}\varphi + (\kappa^{i,-} - \lambda_\infty^i)\partial_{\kappa^-}\varphi \right] \\
& + \sum_{i=1}^d \left( \sum_{j=1}^d \psi_{ji}\mu_j - \mu_i \sum_{k \in \{+, -\}} (\kappa^{i,k} - \sum_{j=1}^d \mu_j\kappa^{j,k}) \right) \partial_{\mu_i}\varphi + \mathcal{I}\varphi,
\end{aligned}
$$

with,

$$ 
\begin{aligned}
\mathcal{I}\varphi := & \int_{\mathbb{R}_+} \left[ \varphi(t, x, s + \nu Q(z), d + (1 - \nu)Q(z), (\kappa^{i,+} + \varphi_s^i(z/m_1))_i, (\kappa^{i,-} + \varphi_c^i(z/m_1))_i, (\mu_i + \Delta\mu_i)_i \right. \\
& \left. - \varphi(t, x, s, d, \kappa^+, \kappa^-, \mu) \right] \sum_{k=1}^d \kappa^{k,+} \nu_k(dz) \\
& + \int_{\mathbb{R}_+} \left[ \varphi(t, x, s - \nu Q(z), d - (1 - \nu)Q(z), (\kappa^{i,+} + \varphi_c^i(z/m_1))_i, (\kappa^{i,-} + \varphi_s^i(z/m_1))_i, (\mu_i + \Delta\mu_i)_i \right. \\
& \left. - \varphi(t, x, s, d, \kappa^+, \kappa^-, \mu) \right] \sum_{k=1}^d \kappa^{k,-} \nu_k(dz),
\end{aligned}
$$
and the intervention operator $\mathcal{M}$ is given by

$$ \mathcal{M}\varphi(t, x, s, d, \kappa^+, \kappa^-, \mu) := \begin{cases} \sup_{\xi \in a(x)} C(s+d, \xi) + \varphi(\Gamma(t, x, s, d, \kappa^+, \kappa^-, \mu, \xi)), & \text{if } a(x) \neq \emptyset, \\ +\infty, & \text{otherwise,} \end{cases} \quad (14) $$

$$ \text{with } a(x) = \{\xi \in \mathbb{R}_+ : \xi \le x\}, $$

$$ \text{and } \Gamma(t, x, s, d, \kappa^+, \kappa^-, \mu, \xi) = (t, x - \xi, s - \nu Q(\xi), d - (1 - \nu)Q(\xi), \kappa^+, \kappa^-, \mu). $$

We call $\mathcal{C}$ the continuation region

$$ \mathcal{C} := \{(t, y) \in \mathcal{D} \times [0, T] : \mathcal{M}V < V\}, $$

and, $\mathcal{T}$ the trade region

$$ \mathcal{T} := \{(t, y) \in \mathcal{D} \times [0, T] : \mathcal{M}V = V\}. $$

In a non-degenerate multidimensional setting like ours, obtaining explicit solutions to the system of HJBQVIs described above is rare, as it typically occurs only in trivial cases. This arises from the necessity to solve the related HJBQVI. Moreover, the existence and uniqueness of this system often require consideration of viscosity solutions. The lack of regularity of the value function could represent an additional challenge. To circumvent these difficulties, we opt to employ a methodology similar to that utilized in Costa and Davis [25] and Øksendal and Sulem [41], where the authors demonstrated that the value function of their control problem resolves a related optimal stopping problem, enabling them to directly characterize an optimal strategy.

Here, we define the value function as the limit of auxiliary functions. These functions will be used to study the original value function and to develop an implementable numerical algorithm, detailed in the next section. Define the subsets $\mathcal{A}_t^N(x)$ within $\mathcal{A}_t(x)$, for all $N \in \mathbb{N}$, as

$$ \mathcal{A}_t^N(x) := \{ (\tau_k, \xi_k)_{k \ge 1} \in \mathcal{A}_t(x) : \tau_k = +\infty \text{ a.s. for all } k \ge N+1 \}, \quad \forall (t, x) \in [0, T] \times \mathbb{R}_+. $$

The associated value function $V_N$, which represents the value function when the investor can make a maximum of $N$ interventions, as

$$ V_N(t, x, s, d, \kappa^+, \kappa^-, \mu) := \sup_{\alpha \in \mathcal{A}_t^N(x)} J(t, x, s, d, \kappa^+, \kappa^-, \mu, \alpha), \quad (15) $$

with $(t, x, s, d, \kappa^+, \kappa^-, \mu, N) \in [0, T] \times \mathcal{D} \times \mathbb{N}$. We also introduce the set $\Theta$ of $\mathcal{F}^N$-stopping times in $[0, T]$, i.e.,

$$ \Theta_t := \{t \le \tau \le T : \tau \text{ is an } \mathcal{F}^N \text{-stopping time}\}. $$

**Proposition 4.2.** Let $N \in \mathbb{N}^*$. For all $t \in [0, T]$ and $y = (x, d, s, \kappa^+, \kappa^-, \mu) \in \mathcal{D}$, we have that

$$ V_N(t, y) = \sup_{\tau \in \Theta_t} \mathbb{E}_{t,y} \left[ \mathcal{M}V_{N-1}(\tau, x, S_\tau, D_\tau, \bar{\lambda}_\tau^+, \bar{\lambda}_\tau^-, \pi_\tau) \right], $$

$$ \text{where } V_0(t, y) = \mathbb{E}_{t,y} \left[ C(S_{\tau_S} + D_{\tau_S}, x) \right]. $$

*Proof.* Refer to the Appendix B. $\square$

**Proposition 4.3 (Compact convergence).** Let $K \subset \mathcal{D}$ be a compact set. For every $\varepsilon > 0$, there exists $N_0 \in \mathbb{N}$ such that for all $N \ge N_0$,

$$ \sup_{(t,y) \in [0,T] \times K} |V_N(t,y) - V(t,y)| < \varepsilon. $$

*Proof.* Let $N \in \mathbb{N}$. For all $t \in [0, T]$ and $y = (x, s, d, \kappa^+, \kappa^-, \mu) \in K$. Since $\mathcal{A}^N \subseteq \mathcal{A}_t^{N+1}(x) \subseteq \mathcal{A}_t(x)$ for all $N \in \mathbb{N}$, then $V_N \le V_{N+1} \le V$. Hence, using the monotone convergence theorem, $\lim_{N \to +\infty} V_N$ exists and $\lim_{N \to +\infty} V_N \le V < +\infty$. Consider $\alpha = (\tau_k, \xi_k)_{k \ge 1} \in \mathcal{A}_t(x)$. Recall that the bankruptcy time $\tau_S$ is defined as $\tau_S = \inf \{u \in [t, T] : P_u < 0\} \wedge T$. The price is influenced by the same exogenous
order flow $(n^+, n^-)$, in addition to the impulse controls, which always drive the price down. The impulse controls in the strategy $\alpha$ are more frequent than those in the strategy $\alpha_N$. Hence, $\tau_S \le \tau_S^N$. Let $\alpha_N = (\tilde{\tau}_k, \tilde{\xi}_k)_{1 \le k \le N} \in \mathcal{A}_t^N(x)$ define the strategy

$$ (\tilde{\tau}_k, \tilde{\xi}_k) = \begin{cases} (\tau_k, \xi_k) & , \text{ if } 1 \le k \le N-1 \text{ and } \tau_k < \tau_S \\ (\tau_S, X_{\tau_S}^\alpha - \sum_{1 \le k \le N-1} \xi_k) & , \text{ else} \end{cases} $$

Using the definition (12) of the reward function $J$, we obtain that

$$ \begin{aligned} & |J(t, y, \alpha) - J(t, y, \alpha_N)| \\ & \le \mathbb{E}_{t,y} \left[ \sum_{\tau_N \le \tau_k < \tau_S} C(S_{\tau_k}^\alpha + D_{\tau_k}^\alpha, \xi_{\tau_k}) + |C(S_{\tau_S}^\alpha + D_{\tau_S}^\alpha, X_{\tau_S}^\alpha) - C(S_{\tau_S}^{\alpha_N} + D_{\tau_S}^{\alpha_N}, X_{\tau_S}^\alpha - \sum_{1 \le k \le N-1} \xi_k)| \right]. \end{aligned} \quad (16) $$

Considering there are almost surely a finite number of switches for any given path, we get that $\lim_{N \to +\infty} \sum_{\tau_N \le \tau_k < \tau_S} \xi_k = 0$ uniformly. Based on the proof of Proposition 4.1, we know that $C(p, x) \le px$, for all $(p, x) \in \mathbb{R} \times \mathbb{R}_+$. Hence,

$$ \begin{aligned} \mathbb{E}_{t,y} \left[ \sum_{\tau_N \le \tau_k < \tau_S} C(S_{\tau_k}^\alpha + D_{\tau_k}^\alpha, \xi_{\tau_k}) \right] & \le \mathbb{E}_{t,y} \left[ \sup_{u \in [t,T]} (S_u^\alpha + D_u^\alpha) \sum_{\tau_N \le \tau_k < \tau_S} \xi_{\tau_k} \right] \\ & \le \sqrt{\mathbb{E}_{t,y} \left[ \sup_{u \in [t,T]} (S_u + D_u)^2 \right] \mathbb{E}_{t,y} \left[ \left( \sum_{\tau_N \le \tau_k < \tau_S} \xi_{\tau_k} \right)^2 \right]}, \end{aligned} $$

where the second inequality is obtained using the Cauchy-Schwarz inequality. This proves the uniform convergence of the first term to zero since $\mathbb{E}_{t,y} \left[ \sup_{u \in [t,T]} (S_u + D_u)^2 \right]$ is uniformly bounded on the compact set on $[0, T] \times K$ based on Assumptions 2.1, the price $P^\alpha$ being linearly dependent on the variables $(t, y)$. Therefore, for any $\varepsilon > 0$ and $N$ large enough,

$$ \mathbb{E}_{t,y} \left[ \sum_{\tau_N \le \tau_k < \tau_S} C(S_{\tau_k}^\alpha + D_{\tau_k}^\alpha, \xi_{\tau_k}) \right] \le \frac{\varepsilon}{3}. \quad (17) $$

Next, we will prove the uniform convergence of the second term in inequality (16) to zero using the expressions of $S_{\tau_S}^{\alpha_N}$ and $D_{\tau_S}^{\alpha_N}$. Based on (11),

$$ \begin{aligned} D_{\tau_S}^{\alpha} = & e^{-\rho(\tau_S - \tau_{N-1})} D_{\tau_{N-1}}^{\alpha} \\ & + (1-\nu) \sum_{\tau_N \le \tau_k < \tau_S} e^{-\rho(\tau_S - \tau_k)} Q(\xi_k) \\ & + (1-\nu) \int_{\tau_S \wedge \tau_N}^{\tau_S} \int_{\mathbb{R}_+} e^{-\rho(\tau_S - t)} Q(v) n(dt, dv). \end{aligned} $$

Since $D_{u \wedge \tau_{N-1}}^\alpha = D_{u \wedge \tau_{N-1}}^{\alpha_N}$, $\forall u \in [t, \tau_S]$, we obtain that $D_{\tau_S}^\alpha = D_{\tau_S}^{\alpha_N} + (1-\nu) \sum_{\tau_N \le \tau_k < \tau_S} e^{-\rho(\tau_S - \tau_k)} Q(\xi_k)$. We proceed in the same way to prove that, $S_{\tau_S}^\alpha = S_{\tau_S}^{\alpha_N} + \nu \sum_{\tau_N \le \tau_k < \tau_S} Q(\xi_k)$. Therefore,

$$ \mathbb{E}_{t,y} \left[ |C(S_{\tau_S}^\alpha + D_{\tau_S}^\alpha, X_{\tau_S}^\alpha) - C(S_{\tau_S}^{\alpha_N} + D_{\tau_S}^{\alpha_N}, X_{\tau_S}^\alpha)| \right] \le x \mathbb{E}_{t,y} \left[ \sum_{\tau_N \le \tau_k < \tau_S} Q(\xi_k) \right]. $$

As a result, for any $\varepsilon > 0$ and $N$ large enough,

$$ \mathbb{E}_{t,y} \left[ |C(S_{\tau_S}^\alpha + D_{\tau_S}^\alpha, X_{\tau_S}^\alpha) - C(S_{\tau_S}^{\alpha_N} + D_{\tau_S}^{\alpha_N}, X_{\tau_S}^\alpha)| \right] \le \frac{\varepsilon}{3}. \quad (18) $$

Finally, knowing that the cost function satisfies,

$$ C(S_{\tau_S}^{\alpha_N} + D_{\tau_S}^{\alpha_N}, X_{\tau_S}^\alpha) - C(S_{\tau_S}^{\alpha_N} + D_{\tau_S}^{\alpha_N}, X_{\tau_S}^\alpha - \sum_{1 \le k \le N-1} \xi_k) = \int_{Q(X_{\tau_S}^\alpha - \sum_{1 \le k \le N-1} \xi_k)}^{Q(X_{\tau_S}^\alpha)} (S_{\tau_S}^{\alpha_N} + D_{\tau_S}^{\alpha_N} - y) f(y) dy, $$
we can apply the Cauchy-Schwarz inequality again to bound it,

$$ \mathbb{E}_{t,y} \left[ |C(S_{\tau_S}^{\alpha_N} + D_{\tau_S}^{\alpha_N}, X_{\tau_S}^{\alpha}) - C(S_{\tau_S}^{\alpha_N} + D_{\tau_S}^{\alpha_N}, X_{\tau_S}^{\alpha} - \sum_{1 \le k \le N-1} \xi_k)| \right] \\ \le \sqrt{\mathbb{E}_{t,y} \left[ \sup_{u \in [t,T]} (S_u + D_u)^2 \right] \mathbb{E}_{t,y} \left[ (Q(X_{\tau_S}^{\alpha}) - Q(X_{\tau_S}^{\alpha} - \sum_{1 \le k \le N-1} \xi_k))^2 \right]} $$

Since $Q$ is continuous on $\mathbb{R}_+^*$, and applying similar reasoning as before, the following inequality holds, for any $\varepsilon > 0$ and $N$ large enough,

$$ \mathbb{E}_{t,y} \left[ |C(S_{\tau_S}^{\alpha_N} + D_{\tau_S}^{\alpha_N}, X_{\tau_S}^{\alpha}) - C(S_{\tau_S}^{\alpha_N} + D_{\tau_S}^{\alpha_N}, X_{\tau_S}^{\alpha} - \sum_{1 \le k \le N-1} \xi_k)| \right] \le \frac{\varepsilon}{3}. \quad (19) $$

As a result of inequalities (17), (18), and (19),

$$ |J(t, y, \alpha) - J(t, y, \alpha_N)| \le \varepsilon. $$

Therefore,

$$ V(t, y) \ge J(t, y, \alpha_N) \ge J(t, y, \alpha) - \varepsilon, $$

Since $\alpha$ and $\varepsilon$ are arbitrary, $V_N$ converges uniformly to $V$ on $[0, T] \times K$ which concludes the proof. $\square$

Next, we present two formulations of the dynamic programming principle. The proof of each result directly follows from Proposition 3.3 and Proposition 3.4 in Bayraktar and Ludkovski [8]. This will be key for characterizing the value function in (13) and formulating a verification theorem to obtain the optimal execution strategy in Section 5.

**Proposition 4.4 (Dynamic Programming Principle).** Let $t \in [0, T]$ and $y = (x, s, d, \kappa^+, \kappa^-, \mu) \in \mathcal{D}$. The value function $V$ is the smallest solution of the dynamic programming equation

$$ V(t, y) = \sup_{\tau \in \Theta_t} \mathbb{E}_{t,y} \left[ \mathcal{M}V(\tau, x, S_{\tau}, D_{\tau}, \bar{\lambda}_{\tau}^{+}, \bar{\lambda}_{\tau}^{-}, \pi_{\tau}) \right], \quad (20) $$

such that, $V \ge V_0$.

**Proposition 4.5.** Let $N \in \mathbb{N}$, $t \in [0, T]$, and $y = (x, s, d, \kappa^+, \kappa^-, \mu) \in \mathcal{D}$. Let $\tau_1^+ := \{s \ge t : N_t^+ < N_s^+\}$, $\tau_1^- := \{s \ge t : N_t^- < N_s^-\}$, $\sigma_1 := \tau_1^+ \wedge \tau_1^-$, and $W_0 = V_0$. Then, the value function $V$ is the pointwise limit of the sequence

$$ W_N(t, y) := \sup_{s \in [t, T]} \mathbb{E}_{t,y} \left[ \begin{aligned} & 1_{\{s \ge \sigma_1\}} W_{N-1}(\sigma_1, x, S_{\sigma_1}, D_{\sigma_1}, \bar{\lambda}_{\sigma_1}^{+}, \bar{\lambda}_{\sigma_1}^{-}, \pi_{\sigma_1}) \\ & + 1_{\{s < \sigma_1\}} \mathcal{M}W_{N-1}(s, x, S_s, D_s, \bar{\lambda}_s^{+}, \bar{\lambda}_s^{-}, \pi_s) \end{aligned} \right]. $$

Furthermore, $V$ is the smallest solution of the dynamic programming equation

$$ V(t, y) = \sup_{s \in [t, T]} \mathbb{E}_{t,y} \left[ \begin{aligned} & 1_{\{s \ge \sigma_1\}} V(\sigma_1, x, S_{\sigma_1}, D_{\sigma_1}, \bar{\lambda}_{\sigma_1}^{+}, \bar{\lambda}_{\sigma_1}^{-}, \pi_{\sigma_1}) \\ & + 1_{\{s < \sigma_1\}} \mathcal{M}V(s, x, S_s, D_s, \bar{\lambda}_s^{+}, \bar{\lambda}_s^{-}, \pi_s) \end{aligned} \right], $$

such that, $V \ge V_0$.

**Remark 4.1.** It is important to note that in Proposition 4.5, the supremum is taken over deterministic times in $[t, T]$ rather than over the stopping times in $\Theta_t$. This distinction arises from the characterization of the stopping times for piecewise deterministic Markov processes (refer to Theorem 33 in Brémaud [16]).
# 5 Characterization of the Value Function

In this section, we will investigate the regularity of the value function $V$, which will pave the way for constructing an optimal strategy.

**Lemma 1.** Let $t \in [0, T]$, $i \in E$ and $(x, s, d, \kappa^+, \kappa^-, \mu) \in \mathcal{D}$. The following results hold:

1. $x_0 \mapsto V(t, x_0, s, d, \kappa^+, \kappa^-, \mu)$ is a non-decreasing function on $\mathbb{R}_+$.

2. $\kappa_0^{i,+} \mapsto V(t, x, s, d, \kappa^{+,1}, \dots, \kappa_0^{+,i}, \dots, \kappa^{+,d}, \kappa^-, \mu)$ is a non-decreasing function on $\mathbb{R}_+$

3. $\kappa_0^{i,-} \mapsto V(t, x, s, d, \kappa^+, \kappa^{+,1}, \dots, \kappa_0^{-,i}, \dots, \kappa^{-,d}, \mu)$ is a non-increasing function on $\mathbb{R}_+$.

4. $s_0 \mapsto V(t, x, s_0, d, \kappa^+, \kappa^-, \mu)$ and $d_0 \mapsto V(t, x, s, d_0, \kappa^+, \kappa^-, \mu)$ are a non-decreasing functions on $\mathbb{R}$. Additionally, $\frac{\partial V}{\partial s}(t, y) = x$, for all $(t, y) \in [0, T] \times \mathcal{D}$.

*Proof.* Refer to the Appendix C. □

**Lemma 2.** Let $t_0 \in [0, T]$ and $y_0 = (x, s, d, \kappa^+, \kappa^-, \mu) \in \mathcal{D}$. Then,

$$ \lim_{(t_1, y_1) \to (t_0, y_0)} \mathbb{P}(\tau_S^1 = \tau_S^0) = 1, $$

and $(t, y) \mapsto \mathbb{E}_{t,y}[e^{-\rho \tau_S}]$ is continuous on $[0, T] \times \mathcal{D}$.

*Proof.* Let $(t_0, t_1) \in [0, T]^2$, $y_0 = (x_0, s_0, d_0, \kappa_0^+, \kappa_0^-, \mu_0) \in \mathcal{D}$, and $y_1 = (x_1, s_1, d_1, \kappa_1^+, \kappa_1^-, \mu_1) \in \mathcal{D}$. We suppose, without loss of generality, that $t_1 \ge t_0$. Using the dynamics (3) of the uncontrolled price process $P$, we have that, for all $u \in [t_0, T]$,

$$ \begin{aligned} P_u^1 - P_u^0 &= s_1 - s_0 + d_1 e^{-\rho(u-t_1)} - d_0 e^{-\rho(u-t_0)} \\ &\quad + \nu \int_{t_1}^u \int_{\mathbb{R}_+} Q(v)n^1(ds, dv) - \nu \int_{t_0}^u \int_{\mathbb{R}_+} Q(v)n^0(ds, dv) \\ &\quad + (1-\nu) \int_{t_1}^u \int_{\mathbb{R}_+} e^{-\rho(u-s)} Q(v)n^1(ds, dv) - (1-\nu) \int_{t_0}^u \int_{\mathbb{R}_+} e^{-\rho(u-s)} Q(v)n^0(ds, dv) \\ &= \mathcal{R}(u, t_0, t_1, y_0, y_1), \quad \mathbb{P}-a.s, \end{aligned} $$

with $P_t^1 = S_t^1 + D_t^1 = s_1 + d_1$, and $P_t^0 = S_t^0 + D_t^0 = s_0 + d_0$. Hence,

$$ \begin{aligned} \mathbb{P}(\tau_S^1 = \tau_S^0) &= \mathbb{P} \left( \inf_{u \in [t_0, \tau_S^0]} P_u^1 \ge 0, P_{\tau_S^0}^1 < 0 \right) \\ &= \mathbb{P} \left( \inf_{u \in [t_0, \tau_S^0]} P_u^0 + \mathcal{R}(u, t_0, t_1, y_0, y_1) \ge 0, P_{\tau_S^0}^1 < 0 \right) \\ &\ge \mathbb{P} \left( \inf_{u \in [t_0, \tau_S^0]} P_u^0 \ge \sup_{u \in [t_0, T]} |\mathcal{R}(u, t_0, t_1, y_0, y_1)|, P_{\tau_S^0}^0 + \mathcal{R}(\tau_S^0, t_0, t_1, y_0, y_1) < 0 \right). \end{aligned} $$

Standard calculations show that $\sup_{u \in [t_0, T]} |\mathcal{R}(u, t_0, t_1, y_0, y_1)|$ converges in probability to zero when $(t_1, y_1) \to (t_0, y_0)$. Additionally, $\inf_{u \in [t_0, \tau_S^0]} P_u^0 \ge 0$ and $P_{\tau_S^0}^0 < 0$ hold P-almost surely. Hence,

$$ \lim_{(t_1, y_1) \to (t_0, y_0)} \mathbb{P} \left( \inf_{u \in [t_0, \tau_S^0]} P_u^0 \ge \sup_{u \in [t_0, T]} |\mathcal{R}(u, t_0, t_1, y_0, y_1)|, P_{\tau_S^0}^0 + \mathcal{R}(\tau_S^0, t_0, t_1, y_0, y_1) < 0 \right) = 1, $$

and,

$$ \lim_{(t_1, y_1) \to (t_0, y_0)} \mathbb{P}(\tau_S^1 = \tau_S^0) = 1. $$

Therefore,

$$ \lim_{(t_1, y_1) \to (t_0, y_0)} \mathbb{E}_{t_1, y_1}[e^{-\rho \tau_S^1}] = \mathbb{E}_{t_0, y_0}[e^{-\rho \tau_S^0}]. $$

In conclusion, $(t, y) \mapsto \mathbb{E}_{t,y}[e^{-\rho \tau_S}]$ is continuous on $[0, T] \times \mathcal{D}$. □
**Lemma 3.** Let $t \in [0, T]$ and $y = (x, s, d, \kappa^+, \kappa^-, \mu) \in \mathcal{D}$. The value function without interventions, $V_0(t, y) = \mathbb{E}_{t,y}[C(S_{\tau_S} + D_{\tau_S}, x)]$, is continuous on $[t, T] \times \mathcal{D}$.

*Proof.* Let $t \in [0, T]$, and $y = (x, s, d, \kappa^+, \kappa^-, \mu) \in \mathbb{R}_+ \times \mathbb{R}^2 \times (\mathbb{R}_+^d)^2 \times \mathcal{S}$.
We know that

$$ 
\begin{aligned}
V_0(t, y) &= x\mathbb{E}_{t,y}[S_{\tau_S} + D_{\tau_S}] - \int_0^{Q(x)} v f(v) dv - c_0 \\
&= x(s + d\mathbb{E}_{t,y}[e^{-\rho(\tau_S - t)}]) + x\nu\mathbb{E}_{t,y}\left[\int_t^{\tau_S} \int_{\mathbb{R}_+} Q(v)n(du, dv)\right] \\
&\quad + x(1 - \nu)\mathbb{E}_{t,y}\left[\int_t^{\tau_S} \int_{\mathbb{R}_+} e^{-\rho(\tau_S - u)}Q(v)n(du, dv)\right] - \int_0^{Q(x)} v f(v) dv - c_0.
\end{aligned}
$$

Hence, given that $Q$ is continuous on $\mathbb{R}_+$ and that $(t, y) \mapsto \mathbb{E}_{t,y}[e^{-\rho\tau_S}]$ is continuous on $[0, T] \times \mathcal{D}$, the continuity of $V_0$ on $[0, T] \times (\mathbb{R}_+^d)^2 \times \mathcal{S}$ will depend on the continuity of the function

$$ (t, \kappa^+, \kappa^-, \mu) \mapsto k(t, \kappa^+, \kappa^-, \mu) = \mathbb{E}_{t,y}\left[\int_t^{\tau_S} \int_{\mathbb{R}_+} e^{-\rho(\tau_S - u)}Q(v)n(du, dv)\right]. $$

This is because the proof of the continuity of the mapping

$$ (t, \kappa^+, \kappa^-, \mu) \mapsto \mathbb{E}_{t,y}\left[\int_t^{\tau_S} \int_{\mathbb{R}_+} Q(v) n(du, dv)\right] $$

is analogous. We define a functional operator $I_0$ by its action on a test function $w$ as

$$ I_0 w(t, \kappa^+, \kappa^-, \mu) = \sum_{i=1}^{d} \mathbb{E}_{t,y} \left[ \int_t^{\sigma_1 \wedge \tau_S} \int_{\mathbb{R}_+} \pi_u(i) e^{-\rho(\tau_S - u)} Q(v) (\lambda_u^{i,+} - \lambda_u^{i,-}) \nu_i(dv) du \right] \\ + \mathbb{E}_{t,y} \left[ \mathbb{1}_{\{\sigma_1 \le \tau_S\}} w(\sigma_1, \lambda_{\sigma_1}^+, \lambda_{\sigma_1}^-, \pi_{\sigma_1}) \right], $$

with $u \in [t, T]$. Let us define $\sigma_n$ as the n-th jump time of $N = N^+ + N^-$ after time $t$. We then introduce $k_{n+1}(t, \kappa^+, \kappa^-, \mu)$ recursively as $k_{n+1}(t, \kappa^+, \kappa^-, \mu) = I_0 k_n(t, \kappa^+, \kappa^-, \mu)$, starting with $k_0(t, \kappa^+, \kappa^-, \mu) = 0$, for $n \in \mathbb{N}$. As a result,

$$ 
\begin{aligned}
k_n(t, \kappa^+, \kappa^-, \mu) &= \sum_{i=1}^{d} \mathbb{E}_{t,y} \left[ \int_t^{\sigma_n \wedge \tau_S} \int_{\mathbb{R}_+} \pi_u(i) e^{-\rho(\tau_S - u)} Q(v) (\lambda_u^{i,+} - \lambda_u^{i,-}) \nu_i(dv) du \right] \\
&= \sum_{i=1}^{d} \mathbb{E}_{t,y} \left[ \int_t^{\sigma_n \wedge \tau_S} \int_{\mathbb{R}_+} e^{-\rho(\tau_S - u)} Q(v) n(dv, du) \right].
\end{aligned}
$$

Additionally, we have that, for all $n \in \mathbb{N}$,

$$ 
\begin{aligned}
&|k(t, \kappa^+, \kappa^-, \mu) - k_n(t, \kappa^+, \kappa^-, \mu)| \\
&= \sum_{i=1}^{d} \mathbb{E}_{t,y} \left[ \int_{\sigma_n \wedge \tau_S}^{\tau_S} \int_{\mathbb{R}_+} \pi_u(i) e^{-\rho(\tau_S - u)} Q(v) \left| \lambda_u^{i,+} - \lambda_u^{i,-} \right| \nu_i(dv) du \right] \\
&\le 2d \sup_{i \in E} \mathbb{E}_i(Q) \mathbb{E}_{t,y} \left[ (\tau_S - \sigma_n \wedge \tau_S) \sup_{s \in [0, T]} \lambda_s^{i, \pm} \right] \\
&\le 2d \sup_{i \in E} \mathbb{E}_i(Q) \sqrt{\mathbb{E}_{t,y} \left[ \sup_{s \in [0, T]} (\lambda_s^{i, \pm})^2 \right] \mathbb{E}_{t,y} \left[ (\tau_S - \sigma_n \wedge \tau_S)^2 \right]}.
\end{aligned}
$$

with $\mathbb{E}_i(Q) := \int_{\mathbb{R}_+} Q(v) \nu_i(dv)$. An implication of Doob's inequality, along with the stability conditions outlined in Assumptions 2.1, is that $\mathbb{E}[\sup_{u \in [0, T]} (\lambda_u^{i, \pm})^2]$ is bounded. Consequently, $k_n$ converges uniformly to $k$. It remains to demonstrate that the operator $I_0$ preserves continuity, thereby establishing
the continuity of $k$ and, consequently, $V_0$.

**If $s+d \le 0$:**

The price instantaneously falls to zero, thus $\tau_S = t$ since $P$ is càdlàg in the scenario without interventions and no jumps occur at time $t^+$. Therefore,

$$V_0(t, y) = x(s+d) - \int_0^{Q(x)} v f(v) \, dv - c_0.$$

Hence, $V_0$ is continuous on $\{y \in \mathcal{D} : s+d \le 0\}$. For the rest of the proof, we will examine the continuity of $V_0$ on $\{y \in \mathcal{D} : s+d > 0\}$.

**If $s \ge 0$ and $s+d > 0$:**

Since the price $P$ can decrease only after a downward jump of $N$, we have $\inf\{u \in [t, T] : P_u \le 0\} \ge \sigma_1$, P-a.s. Hence, $\sigma_1 \wedge \tau_S = \sigma_1 \wedge T$, P-a.s. Now let $\mathcal{H}_i^{0,k}$ denote the functional operator on a test function $w$, such that, for all $i \in E$ and $k \in \{+, -\}$,

$$\mathcal{H}_i^{0,k} w(u, \kappa^+, \kappa^-, \mu) = \int_{\mathbb{R}_+} w(u, (\kappa^{l,+} + \varphi_c^l(v/m_1))_{l \in E}, (\kappa^{l,-} + \varphi_s^l(v/m_1))_{l \in E}, \left( \frac{\mu_l \kappa^{l,k}}{\sum_{j=1}^d \mu_j \kappa^{j,k}} \right)_{l \in E}) \nu_i(dv).$$

Utilizing the piecewise-deterministic Markov property of the processes $(\lambda^{i,+})_{i \in E}$, $(\lambda^{i,-})_{i \in E}$, and $(\pi(i))_{i \in E}$, we can express $I_0$ as

$$I_0 w(t, \kappa^+, \kappa^-, \mu) = \sum_{i=1}^{d} \mathbb{E}_{t,y} \left[ \int_{t}^{\sigma_1 \wedge T} \int_{\mathbb{R}_+} \pi_u(i) e^{-\rho(\tau_S-u)} Q(v) (\lambda_u^{i,+} - \lambda_u^{i,-}) \nu_i(dv) du \right] \\ + \mathbb{E}_{t,y} \left[ \mathbb{1}_{\{\sigma_1 \le T\}} w(\sigma_1, \lambda_{\sigma_1}^+, \lambda_{\sigma_1}^-, \pi_{\sigma_1}) \right] \\ = \sum_{i=1}^{d} \int_{t}^{T} \pi_u^0(i) e^{\rho u} (\lambda_u^{0,i,+} - \lambda_u^{0,i,-}) \times \mathbb{E}_{t,y} \left[ \mathbb{1}_{\{u < \sigma_1\}} e^{-\rho \tau_S} \right] du \times \mathbb{E}_i(Q(V)) \\ + \sum_{k\{+, -\}} \sum_{i=1}^{d} \int_{t}^{T} \mathcal{H}_i^{0,k} w(u, \lambda_u^{0,+}, \lambda_u^{0,-}, \pi_u^0) \mathbb{P}_{t,y} (I_u = i, \sigma_1 = \tau_1^k, \sigma_1 \in du),$$

with $\lambda_u^{0,i,+} = (\kappa^{i,+} - \lambda_\infty^i)e^{-\beta_i(u-t)} + \lambda_\infty^i$, $\lambda_u^{0,i,-} = (\kappa^{i,-} - \lambda_\infty^i)e^{-\beta_i(u-t)} + \lambda_\infty^i$ and $\pi_u^0$ is the unique solution to the ordinary differential equation (9).

Let us introduce the functions $m_i^\pm: [0, T]^2 \times (\mathbb{R}_+^d)^2 \times \mathcal{S}$, and $u \in [t, T]$ such that, for all $i \in E$,

$$\begin{aligned} m_i^+(t, u, \kappa^+, \kappa^-, \mu) &= \mathbb{P}_{t,y} (u < \sigma_1, I_u = i, \sigma_1 = \tau_1^+) , \\ m_i^-(t, u, \kappa^+, \kappa^-, \mu) &= \mathbb{P}_{t,y} (u < \sigma_1, I_u = i, \sigma_1 = \tau_1^-) . \end{aligned} \qquad (21)$$

Next, we will determine the forms of $m_i^\pm$ in order to demonstrate their continuity. We know that

$$\mathbb{P}_{t,y} (u < \sigma_1, I_u = i, \tau_1^+ < \tau_1^-) = \mathbb{E}_{t,y} (\mathbb{1}_{\{I_u=i\}} \cdot \mathbb{P} (u < \tau_1^+ < \tau_1^- | (I_s)_{s \in [t,u]})) \quad (22)$$

Utilizing the definition of a non-homogeneous Poisson process (see Snyder and Miller [47]) and recognizing that the intensities of $(\lambda^{i,+})_{i \in E}$ and $(\lambda^{i,-})_{i \in E}$ are deterministic prior to the first jump time $\sigma_1$ due to their nature as PDMPs (see Proposition 3.1), we get that

$$\begin{aligned} \mathbb{P} (u < \tau_1^+ < \tau_1^- | (I_s)_{s \in [t,u]}) &= \mathbb{E} \left[ \int_u^{+\infty} \sum_{j=1}^d \mathbb{1}_{\{I_s=j\}} \lambda_s^{0,j,+} e^{-\int_t^s \sum_{i=1}^d \mathbb{1}_{\{I_r=i\}} (\lambda_r^{0,i,-} + \lambda_r^{0,i,+}) dr} ds \mid (I_s)_{s \in [t,u]} \right] \\ &= e^{-\int_t^u \sum_{i=1}^d \mathbb{1}_{\{I_r=i\}} (\lambda_r^{0,i,-} + \lambda_r^{0,i,+}) dr} \\ & \quad \times \int_u^{+\infty} \sum_{j=1}^d \lambda_s^{0,j,+} \mathbb{E} \left[ \mathbb{1}_{\{I_s=j\}} e^{-\int_t^s \sum_{i=1}^d \mathbb{1}_{\{I_r=i\}} (\lambda_r^{0,i,-} + \lambda_r^{0,i,+}) dr} ds \mid (I_s)_{s \in [t,u]} \right]. \end{aligned}$$
The transition from the first to the second line is justified by the Fubini-Tonelli theorem. As described in Brémaud [16], the dynamics of I can also be understood through the Poisson measure $n_{ij}^I$, which counts the transitions from state i to state j. This process has an $\mathcal{F}^I$-intensity given by $t \mapsto 1_{\{I_{t-}=i\}}\psi_{ij}(t)$, where i and j are elements of the set E. This means that

$$d(1_{\{I_u=i\}}) = \sum_{j \in E} (1_{\{I_{u-}=j\}} - 1_{\{I_{u-}=i\}}) \times n_{ji}^I(du), \quad \forall u \in [0, T].$$

By applying Itô's formula, we obtain that

$$dL_u^i = d(1_{\{I_u=i\}}e^{-\sum_{j=1}^d \int_t^u 1_{\{I_s=j\}}(\lambda_s^{0,i,-} + \lambda_s^{0,i,+})ds}) \\ = [-1_{\{I_{u-}=i\}}(\lambda_{u-}^{0,i,-} + \lambda_{u-}^{0,i,+})du + d(1_{\{I_u=i\}})]e^{-\sum_{j=1}^d \int_t^u 1_{\{I_s=j\}}(\lambda_s^{0,j,-} + \lambda_s^{0,j,+})ds}.$$

This results in

$$d\mathbb{E}_{t,y}(L_u^i) = \mathbb{E}_{t,y}\left(\sum_{j \neq i} L_{u-}^j \psi_{ji}(u) - L_{u-}^i \psi_{ii}(u)\right) du - \mathbb{E}_{t,y}(L_u^i) (\lambda_{u-}^{0,i,-} + \lambda_{u-}^{0,i,+}) du \\ = \sum_{j=1}^d \mathbb{E}_{t,y}(L_{u-}^j) \psi_{ji}(u) du - \mathbb{E}_{t,y}(L_u^i) (\lambda_{u-}^{0,i,-} + \lambda_{u-}^{0,i,+}) du.$$

Therefore,

$$\mathbb{E}_{t,y}(L_u^i) = (\mu \cdot e^{\int_t^u \psi(s) - \Lambda_s^{0,-} - \Lambda_s^{0,+} ds})_i. \quad (23)$$

where $\Lambda^{0,+}$ is a $d \times d$ diagonal matrix with $(\Lambda^{0,+})_{ii} = \lambda^{0,i,+}$. Hence, we get that

$$\mathbb{P}_{t,y} (u < \tau_1^+ < \tau_1^- | (I_s)_{s \in [t,u]}) = e^{-\int_t^u \sum_{i=1}^d 1_{\{I_r=i\}} (\lambda_r^{0,i,-} + \lambda_r^{0,i,+}) dr} \\ \times \int_u^{+\infty} \sum_{j=1}^d \lambda_s^{0,j,+} \sum_{k=1}^d 1_{\{I_u=k\}} \cdot (e^{\int_u^s \psi(r) - \Lambda_r^{0,-} - \Lambda_r^{0,+} dr})_{kj} ds,$$

and, based on (22), that

$$\mathbb{P}_{t,y} (u < \sigma_1, I_u = i, \tau_1^+ < \tau_1^-) = \mathbb{E}_{t,y} \left( 1_{\{I_u=i\}} \cdot e^{-\int_t^u \sum_{i=1}^d 1_{\{I_r=i\}} (\lambda_r^{0,i,-} + \lambda_r^{0,i,+}) dr} \right) \\ \times \int_u^{+\infty} \sum_{j=1}^d \lambda_s^{0,j,+} \left( e^{\int_u^s \psi(r) - \Lambda_r^{0,-} - \Lambda_r^{0,+} dr} \right)_{ij} ds$$

Therefore, for all $i \in E$ and $u \in [t, T]$,

$$m_i^+(t, u, \kappa^+, \kappa^-, \mu) = (\mu \cdot e^{\int_t^u \psi(s) - \Lambda_s^{0,-} - \Lambda_s^{0,+} ds})_i \int_u^{+\infty} \sum_{j=1}^d \lambda_s^{0,j,+} \left( e^{\int_u^s \psi(r) - \Lambda_r^{0,-} - \Lambda_r^{0,+} dr} \right)_{ij} ds.$$

Similarly, we get that

$$m_i^-(t, u, \kappa^+, \kappa^-, \mu) = (\mu \cdot e^{\int_t^u \psi(s) - \Lambda_s^{0,-} - \Lambda_s^{0,+} ds})_i \int_u^{+\infty} \sum_{j=1}^d \lambda_s^{0,j,-} \left( e^{\int_u^s \psi(r) - \Lambda_r^{0,-} - \Lambda_r^{0,+} dr} \right)_{ij} ds.$$

Since $\lambda_u^{0,i,+} = (\kappa^{i,+} - \lambda_\infty^i)e^{-\beta_i(u-t)} + \lambda_\infty^i$ and $\lambda_u^{0,i,-} = (\kappa^{i,-} - \lambda_\infty^i)e^{-\beta_i(u-t)} + \lambda_\infty^i$, we get a continuous dependence of $\lambda^{0,i,+}$ and $\lambda^{0,i,-}$ with respect to their initial parameters. Hence, $(t, \kappa^+, \kappa^-, \mu) \to m_i^+(t, u, \kappa^+, \kappa^-, \mu)$ and $(t, \kappa^+, \kappa^-, \mu) \to m_i^-(t, u, \kappa^+, \kappa^-, \mu)$ are continuous on $[0, T] \times (\mathbb{R}_+^d)^2 \times S$, for all $i \in E$ and $u \in [0, T]$. Additionally, we know that $(t, y) \mapsto \mathbb{E}_{t,y}[1_{\{u<\sigma_1\}}e^{-\rho\tau_S}]$ is continuous on
$[0, T] \times \mathcal{D}$, based on the results of Lemma 2 and the fact that $(t, y) \mapsto \sigma_1$ is continuous in probability on $[0, T] \times \mathcal{D}$. Hence, since

$$ \mathbb{P}_{t,y}(I_u = i, \sigma_1 = \tau_1^k, \sigma_1 \in \mathrm{d}u) = -\frac{\partial}{\partial u} m_i^k(t, u, \kappa^+, \kappa^-, \mu) \mathrm{d}u, \quad (24) $$

and $\frac{\partial}{\partial u}m_i^k$ is continuous on $[0, T] \times \mathcal{D}$, we conclude that $I_0$ preserves the continuity. This concludes this part of the proof.

If $s < 0$ and $s + d > 0$:

The bankruptcy time in case of no prior jumps $\tau_S^0$ satisfies the equation

$$ de^{-\rho(\tau_S^0 - t)} + s = 0 $$

before time $T$, which implies that

$$ \tau_S^0 = \left( t + \frac{1}{\rho} \ln \left( \frac{-d}{s} \right) \right) \wedge T. $$

Hence, $\sigma_1 \wedge \tau_S = \sigma_1 \wedge \tau_S^0$. The rest of the proof is based on similar arguments as those presented in the previous case. One can just replace $T$ by $\tau_S$. $\square$

**Proposition 5.1.** The approximating sequence of value functions $(W_N)_{N \in \mathbb{N}}$ is continuous on $[t, T] \times \mathcal{D}$.

*Proof.* Let $t \in [0, T]$, $N \in \mathbb{N}$, and $y = (x, s, d, \kappa^+, \kappa^-, \mu) \in \mathcal{D}$. Define a functional operator $I_1$ by its action on a test function $w$ as

$$ I_1 w(t, u, y) := \mathbb{E}_{t,y} \left[ \mathbb{1}_{\{u \ge \sigma_1\}} w(\sigma_1, x, S_{\sigma_1}, D_{\sigma_1}, \bar{\lambda}_{\sigma_1}^+, \bar{\lambda}_{\sigma_1}^-, \pi_{\sigma_1}) \right. \\ \left. \qquad + \mathbb{1}_{\{u < \sigma_1\}} \mathcal{M}w \left( u, x, s, e^{-\rho(u-t)}d, \lambda_u^{0,+}, \lambda_u^{0,-}, \pi_u^0 \right) \right], \quad (25) $$

with $u \in [t, T]$, $\lambda_u^{0,i,+} = (\kappa_i^{i,+} - \lambda_\infty^i)e^{-\beta_i(u-t)} + \lambda_\infty^i, \lambda_u^{0,i,-} = (\kappa_i^{i,-} - \lambda_\infty^i)e^{-\beta_i(u-t)} + \lambda_\infty^i$, and $\pi_u^0 = \mathbb{P}_{t,y}(I_u = i | \sigma_1 > u)$ is the unique solution to the ordinary differential equation (9).

Now let $\mathcal{H}_i^{1,k}$ denote the functional operator on a test function $w : [0, T] \times \mathcal{D} \mapsto \mathbb{R}$, for all $i \in E$ and $k \in \{+, -\}$, such that,

$$ \mathcal{H}_i^{1,k} w(u, y) := \int_{\mathbb{R}_+} w \left( u, x, s + k\nu Q(v), d + k(1 - \nu)Q(v), (\kappa^{l,+} + \mathbb{1}_{\{k=-,l=i\}}\varphi_s^l(v/m_1) + \mathbb{1}_{\{k=+,l=i\}}\varphi_c^l(v/m_1))_{l \in E}, \right. \\ \left. (\kappa^{l,-} + \mathbb{1}_{\{k=+,l=i\}}\varphi_s^l(v/m_1) + \mathbb{1}_{\{k=-,l=i\}}\varphi_c^l(v/m_1))_{l \in E}, \left( \frac{\mu_l \kappa^{l,k}}{\sum_{j=1}^d \mu_j \kappa^{j,k}} \right)_{l \in E} \right) \nu_i(dv). $$

By means of the strong Markov property,

$$ I_1 w(t, u, y) = \sum_{i=1}^{d} \mathbb{P}_{t,y} (I_u = i, \sigma_1 > u) \mathcal{M}w \left( u, x, s, e^{-\rho(u-t)}d, \lambda_u^{0,+}, \lambda_u^{0,-}, \pi_u^0 \right) \\ + \sum_{k \in \{+, -\}} \sum_{i=1}^{d} \int_t^u \mathcal{H}_i^{1,k} w \left( r, x, s, e^{-\rho(r-t)}d, \lambda_r^{0,+}, \lambda_r^{0,-}, \pi_r^0 \right) \mathbb{P}_{t,y} (I_r = i, \sigma_1 = \tau_1^k, \sigma_1 \in dr), $$

Using (21), (24), we can express $I_1$ as

$$ I_1 w(t, u, y) = \sum_{i=1}^{d} m_i(t, u, \kappa^+, \kappa^-, \mu) \mathcal{M}w \left( u, x, s, e^{-\rho(u-t)}d, \lambda_u^{0,+}, \lambda_u^{0,-}, \pi_u^0 \right) \\ - \sum_{k \in \{+, -\}} \sum_{i=1}^{d} \int_t^u \mathcal{H}_i^{1,k} w \left( r, x, s, e^{-\rho(r-t)}d, \lambda_r^{0,+}, \lambda_r^{0,-}, \pi_r^0 \right) \frac{\partial}{\partial u} m_i^k(t, r, \kappa^+, \kappa^-, \mu) dr, $$
with $m_i(t, u, \kappa^+, \kappa^-, \mu) := m_i^+(t, u, \kappa^+, \kappa^-, \mu) + m_i^-(t, u, \kappa^+, \kappa^-, \mu) = (\mu \cdot e^{\int_t^u \psi(s) - \Lambda_s^{0,+} - \Lambda_s^{0,-} ds})_i$.

The lifting function $\Gamma$, defined in (14), maintains continuity due to its linearity. Since $x \mapsto a(x) = [0, x]$ defines a hemicontinuous, compact-valued correspondence with $a(x) \neq \emptyset$, a consequence of the Maximum theorem (see Section 3 in Berge [11]) is that the operator $M$ preserves continuity. We apply the arguments presented in Lemma 3 to prove that the first jump operator $I_1$ preserves continuity. Using the Maximum Theorem again, since $t \mapsto [t, T]$ also maps to a non-empty set and defines a hemicontinuous compact-valued correspondence, we find that the operator $\sup_{u \in [t, T]} I_1 w(t, u, y)$ associated to the test function $w$ preserves continuity. Therefore, given that the dynamic programming principle in Proposition 4.5 states $W_{N+1}(t, y) = \sup_{u \in [t, T]} I_1 W_N(t, u, y)$ and $W_0 = V_0$ is continuous (see Lemma 3), we conclude that $W_N$ is continuous for all $N \in \mathbb{N}$, which completes the proof. $\square$

**Corollary 5.1.** The value function $V$ is continuous on $[0, T] \times \mathcal{D}$.

*Proof.* Based on Proposition 3.2 in Ludkovski and Sezer [35], we have that $W_N = V_N$, for all $N \in \mathbb{N}$. Moreover, $[0, T] \times \mathcal{D}$, endowed with the Euclidean metric, is a locally compact space. Since $W_N$ has been proven to be continuous on $[0, T] \times \mathcal{D}$ in Proposition 5.1 and that $V_N$ converges locally uniformly to $V$ based on Proposition 4.3, we conclude that $V$ is continuous on $[0, T] \times \mathcal{D}$. $\square$

We conclude this section by presenting a verification theorem, which follows from the continuity of $V$ established in Corollary 5.1, along with Proposition 4.1 in Bayraktar and Ludkovski [8].

**Theorem 5.1** (Verification Theorem). Let $t \in [0, T]$, and $y = (x, d, s, \kappa^+, \kappa^-, \mu) \in \mathcal{D}$. A strategy $\alpha^* = (\tau_k, \xi_k)_{k \ge 1}$ is defined recursively as

* Set $\xi_1 = 0$ and $\tau_1 = 0$.

* For $k \ge 1$,

$$ \left\{ \begin{array}{l} \tau_{k+1} = \inf \{s \in [\tau_k, T] : V(s, Y_s^*) = MV(s, Y_s^*)\}, \\ \xi_{k+1} = \arg \min_{\xi} \{MV(\tau_{k+1}, Y_{\tau_{k+1}}^*) = C(D_{\tau_{k+1}}^{\alpha^*} + S_{\tau_{k+1}}^{\alpha^*}, \xi) + V(\Gamma(\tau_{k+1}, Y_{\tau_{k+1}}^*, \xi))\}, \end{array} \right. $$

where $Y_s^* := (X_s^{\alpha^*}, S_s^{\alpha^*}, D_s^{\alpha^*}, \bar{\lambda}_s^+, \bar{\lambda}_s^-, \pi_s)$, for all $s \in [0, T]$.

With the convention that $\inf\{\emptyset\} = 0$, the strategy $\alpha^*$ is optimal for Problem 12, i.e.,

$$ V(t, y) = \mathbb{E}_{t,y} \left[ \sum_{\tau_k \in [t, \tau_S]} C(S_{\tau_k}^{\alpha^*} + D_{\tau_k}^{\alpha^*}, |\Delta X_{\tau_k}^{\alpha^*}|) + C(S_{\tau_S}^{\alpha^*} + D_{\tau_S}^{\alpha^*}, X_{\tau_S}^{\alpha^*}) \right]. $$

# 6 Numerical Results

Below, we present numerical examples to demonstrate the shape of the optimal exercise and continuation regions. We will also evaluate the impact of the stochastic filtering procedure on the optimal policy and exercise regions. Now, we will specify the forms of the limit order book density and intensities used in our illustrations.

* **Market impact:** Drawing from the research of Bouchaud, Farmer, and Lillo [14] and Gatheral [30], we propose a price impact model in which the trading size influences the price $Q$ in a concave manner, meaning that $v \mapsto V^{-1}(v)$ forms a continuous concave function from $\mathbb{R}^+$ to $\mathbb{R}^+$. This is particularly relevant when the trade size is small, which is often the case in high-frequency trading. As empirical observations suggest that the price impact function often approximates a square-root function, we will employ a power-shaped density function $x \mapsto f(x) = c \times x^{-1+e}$, where $c$ and $e$ are positive constants. This results in a concave market impact function $v \mapsto Q(v) = (\frac{ev}{c})^{1/e}$ and a transaction price equal to $C(p, v) = pv - \frac{e^{\frac{e+1}{e}}}{e+1} c(\frac{v}{c})^{\frac{e+1}{e}} - c_0 = pv - c'v^{\frac{e+1}{e}} - c_0$, with $c' = \frac{c}{e+1} (\frac{e}{c})^{\frac{e+1}{e}}$.
* **Hidden liquidity:** To ensure clarity in our results, we will focus on two possible regimes $i \in \{1, 2\}$ throughout the remainder of our study. Based on the findings of Chevalier, Hafsi, and Ly Vath [22] and Pomponio and Abergel [42], we select an exponential distribution for the order volumes, given by $\nu_i(v) = \zeta e^{-\zeta v}$. We aim to illustrate the behavior of the liquidating agent when market trends reverse. This is achieved through the following dynamics of the intensities $\lambda_t^{i,+}$ and $\lambda_t^{i,-}$, defined as

$$ \varphi_s^i \left( \frac{v}{m_1} \right) = \varphi_c^i \left( \frac{v}{m_1} \right) = \frac{\zeta^\eta}{\Gamma(1+\eta)} v^\eta, $$

where $\chi > 1$ is a parameter linking the regimes, and $\zeta$ and $\eta$ are positive parameters. Additionally, we define $\kappa^{2,+} = \kappa^{1,-}$ and $\kappa^{2,-} = \kappa^{1,+}$, leading to $\lambda^{2,+} = \lambda^{1,-}$ and $\lambda^{2,-} = \lambda^{1,+}$. This allows us to reduce the dimensional complexity impacting the numerical scheme.

We propose this set of parameters for the upcoming numerical results to ensure consistency and clarity in our analysis. Whenever a variable is not explicitly mentioned as changing within a graph, or if it is not varying across different scenarios, it takes the default values specified in this set. These default values will be maintained throughout the computations unless stated otherwise.

<table><caption>Table 1: Default parameter values used for numerical results.</caption><thead><tr><th>Parameters</th><th>ρ</th><th>c</th><th>e</th><th>c<sub>0</sub></th><th>ν</th><th>λ<sub>∞</sub><sup>1</sup></th><th>β</th><th>η</th></tr></thead><tbody><tr><th>Values</th><td>0.1</td><td>1.0</td><td>3.0</td><td>0.1</td><td>0.8</td><td>1.0</td><td>0.5</td><td>0.05</td></tr></tbody></table>

## 6.1 Filter Sample Paths

We analyze a two-state homogeneous Markov chain through sample path analysis. When fully observed, the chain exhibits a clear sequence of transitions between states, providing a detailed view of its temporal evolution. Each transition is directly observable, facilitating straightforward interpretation of the chain's dynamics. We choose the scenario where the transition rate matrix $\Psi(t)$ at time $t \in [0, T]$ is

$$ \Psi(t) = \begin{pmatrix} -0.2 & 0.2 \\ 0.2 & -0.2 \end{pmatrix}. $$

In the context of our Markov chain with discrete states, the accuracy of our state estimation is illustrated using the Maximum A Posteriori (MAP) estimator, which selects the state with the highest posterior probability $\hat{\pi}_t = \arg\max_{i \in \{0,1\}} \pi_t(i)$, where $\pi_t(i)$ refers to the filter (6). This approach ensures that the estimate remains within the discrete state space, providing practical and computational advantages for illustration purposes. However, going forward, we will rely on the Least Squares Estimator (LSE) for its theoretical optimality in minimizing the expected squared error, despite it yielding a weighted average that may not correspond to an actual discrete state. This ensures a more precise and theoretically sound estimation in our subsequent analyses.

<figure><img src="image_3.png" /><figcaption>Figure 2: Illustration of the filter's PDMP system trajectory.</figcaption></figure>
## 6.2 Optimal Liquidation Strategy

The numerical implementation involves discretizing the domain $\mathcal{D}$ and the time horizon $[t, T]$. Subsequently, we compute the deterministic supremum in $W_{N+1}(t, y) = \sup_{u \in [t, T]} I_1 W_N(t, u, y)$ for all $(t, y) \in [0, T] \times \mathcal{D}$ as described in Appendix D. Note that the results presented here use $N = 20$. However, we observed that the value function typically converges after approximately 13 iterations. In the following section, we will primarily discuss the exercise and continuation regions of the approximated optimal liquidation strategy.

**Market Risk.** Figure 3 below shows the behavior of the optimal strategy with respect to the buy and sell intensities. Under the configuration introduced in the beginning of this section, the buy and sell intensities in Regime 2 are reversed compared to Regime 1. Specifically, $(\lambda^{2,+}, \lambda^{2,-}) = (\lambda^{1,-}, \lambda^{1,+})$, meaning the roles of the buy and sell intensities are swapped between the two regimes.

<figure><img src="image_4.png" /><figcaption>Figure 3: Contour plot of the its exercise/continuation region of $W_N$ as a function of buy intensity $\kappa^{1,+}$ and sell intensity $\kappa^{1,-}$. The prior probability $\pi_t(0) = \mu_0$ is set to 0.9 in the left figure, 0.5 in the central figure, and 0.1 in the right figure.</figcaption></figure>

The continuation and exercise regions, as depicted in Figure 3, are influenced by the agent's beliefs $\pi = (\pi(0), \pi(1))$ regarding the prevailing market regime.

* **Left-hand side figure:** Here, the probability filter is fixed at 0.9, signaling a high likelihood of being in regime 1. A higher $\kappa^{1,+}$ (buy intensity in regime 1) corresponds to an upward price trend. In this case, no sell orders take place. Conversely, the higher $\kappa^{1,-}$ (sell intensity in regime 1), the more likely the agent is to place a sell order (blue region).

* **Right-side figure:** On the right-hand side plot, the probability filter is fixed at 0.1, signaling a high likelihood of being in regime 2, where buy and sell intensities have likely switched from regime 1 to 2. In this case, a higher $\kappa^{1,+}$ (or lower $\kappa^{2,-}$) corresponds to a downward price trend, leading the agent to post sell orders (blue region). We observe a clear symmetry with the right-hand side plot. The optimal strategy involves liquidating when the price is going downward in regime 2 and upward in regime 1. This reflects the agent's adaptive strategy to hedge against market risks and to exit positions when a downward price trend is expected.

* **Middle figure:** This is further confirmed by the middle plot, where the agent has no prior belief about the market state. In this case, the agent liquidates when both buy and sell intensities in regime 1 (and consequently in regime 2) increase. This behavior is justified by the fact that the likelihood of an imbalance in intensities is higher when both are elevated, compared to when both are low, allowing the agent to hedge against market risk.

We continue our analysis by examining the dependence of the approximated optimal strategy on the remaining inventory and the agent's prior beliefs regarding the market liquidity state, as depicted in Figure 4.
<figure><img src="image_5.png" /><figcaption>Figure 4: Contour plot of the its exercise/continuation region of $W_N$ as a function of the filter's probability to be in regime 1 and the inventory. The buy and sell intensities $(\kappa^{1,+}, \kappa^{1,-})$ are set to (5, 1) in the left figure, (3, 3) in the central figure, and (1, 5) in the right figure.</figcaption></figure>

Note that as the prior probability of a downward price movement increases (low $\pi_t(0)$ in the left-hand side figure), the agent's incentive to liquidate intensifies, driven by the need to mitigate potential losses. Moreover, the agent exhibits sensitivity to inventory levels, with larger inventories prompting liquidation regardless of market liquidity conditions. This is reflected in the expansion of the selling region as the remaining inventory $x$ increases, highlighting the agent's tendency to execute trades more aggressively when managing larger positions.

**Liquidity Risk.** We now examine the market impact of the trading agent in relation to the trade sizes. Figure 5 illustrates the power-law shape of the price impact function $Q$, highlighting its concave nature. In this analysis, we vary the parameter $c$ to investigate its influence on the optimal order sizes.

<figure><img src="image_6.png" /><figcaption>Figure 5: Representation of the market impact $Q$ as a function of the order size for two price impact parameters: $c = 0.7$ and $c = 1.0$.</figcaption></figure>

Figure 6 illustrates the order sizes that maximize the intervention operator $M$ and reveals that an increased price impact leads to a decrease in the average order size. More interestingly, its analysis shows that the order sizes are initially proportional to the inventory, after which they stabilize. This behavior confirms the effect of the concavity of the impact function $Q$, indicating that as price sensitivity increases, the relationship between order sizes and inventory adjusts in a manner consistent with the underlying market dynamics. This effect is more pronounced when the price impact is higher, as depicted in the upper plots for $c = 0.7$.
<figure><img src="image_7.png" /><figcaption>Figure 6: Contour plot of the order sizes as a function of the filter's probability of being in regime 1 and the inventory. The buy and sell intensities ($\kappa^{1,+}$, $\kappa^{1,-}$) are set to (5, 1) in the left figure, (3, 3) in the central figure, and (1, 5) in the right figure. The upper plots correspond to a price impact parameter $c = 0.7$, while the lower plots correspond to $c = 1$.</figcaption></figure>

**Remark 6.1.** As shown in Lemma 1, the dimensions of our problem reduce by one since the fundamental price variable $S$ can be separated from the other variables. Thus, our problem is equivalent to finding the exercise and continuation regions of the function $g$ introduced in the proof of the aforementioned Lemma as:

$$V(t, y) = xs + \sup_{\alpha \in A_t(x)} g(t, x, d, \kappa^+, \kappa^-, \mu, \alpha), \quad \forall (t, y) \in [0, T] \times \mathcal{D}.$$

The corresponding intervention operator $\tilde{\mathcal{M}}$ is defined as

$$\tilde{\mathcal{M}}\varphi(t, x, d, \kappa^+, \kappa^-, \mu) := \begin{cases} \sup_{\xi \in a(x)} C(d, \xi) - \nu Q(\xi)(x - \xi) + \varphi(\tilde{\Gamma}(t, x, d, \kappa^+, \kappa^-, \mu, \xi)), & \text{if } a(x) \neq \emptyset, \\ +\infty, & \text{otherwise,} \end{cases}$$

$$\text{with } \tilde{\Gamma}(t, x, d, \kappa^+, \kappa^-, \mu, \xi) = (t, x - \xi, d - (1 - \nu)Q(\xi), \kappa^+, \kappa^-, \mu).$$

Thus, the continuation region $C$ and the trade region $T$ are equivalent to

$$C = \{(t, y) \in \mathcal{D} \times [0, T] : \tilde{\mathcal{M}}g < g\}, \quad \text{and} \quad T = \{(t, y) \in \mathcal{D} \times [0, T] : \tilde{\mathcal{M}}g = g\}.$$

As a result, the fixed point operator $I_1$, defined in (25), is influenced accordingly and can be expressed as

$$\begin{aligned} I_1 V(t, u, y) &= I_1 g(t, u, y) + \mathbb{E}_{t,y} \left[ \mathbb{1}_{\{u < \sigma_1\}} xs + \mathbb{1}_{\{u \ge \sigma_1\}} xS_{\sigma_1} \right] \\ &= xs + \tilde{I}_1 g(t, u, y), \end{aligned}$$
where,

$$
\begin{align*}
\tilde{I}_1 g(t, u, y) &:= I_1 g(t, u, y) + x \mathbb{E}_{t,y} \left[ 1_{\{u \ge \sigma_1\}} (S_{\sigma_1} - s) \right] \\
&= \sum_{i=1}^{d} m_i(t, u, \kappa^+, \kappa^-, \mu) \tilde{\mathcal{M}} V \left( u, x, e^{-\rho(u-t)} d, \lambda_u^{0,+}, \lambda_u^{0,-}, \pi_u^0 \right) \\
&\quad - \sum_{k \in \{+, -\}} \sum_{i=1}^{d} \int_t^u \left[ \mathcal{H}_i^{1,k} V \left( r, x, e^{-\rho(r-t)} d, \lambda_r^{0,+}, \lambda_r^{0,-}, \pi_r^0 \right) + k \nu \mathbb{E}_i(Q) x \right] \frac{\partial}{\partial u} m_i^k(t, r, \kappa^+, \kappa^-, \mu) \mathrm{d}r.
\end{align*}
$$

Taking all this into account, the numerical implementation boils down to computing the optimal strategy that maximizes g.

7 Conclusion and discussions

This paper presents a detailed framework tailored for high-frequency trading, capturing price formation driven solely by order flow. Our model effectively captures the key features of order flow and price dynamics with mutually stimulating Hawkes processes. By incorporating both permanent and transient market impact functions in a general LOB form, we achieve a realistic depiction of market conditions.

A notable aspect of our approach is the treatment of liquidity as a stochastic and hidden factor.
We address hidden liquidity with advanced non-linear stochastic filtering techniques, allowing for
more accurate estimates of market states and better trading decisions. This is particularly important
in high-frequency trading where rapid and precise adjustments to market conditions are crucial.

We formulate an optimal execution problem and tackle it as an impulse control problem under
incomplete observations. Through comprehensive numerical illustrations, we demonstrate the accuracy
of our filtering approach and provide a reliable approximation of the optimal value function and its
related optimal liquidation strategy.

References

[1] Alfonsi, A. and Blanc, P.: “Dynamic optimal execution in a mixed-market-impact Hawkes price model”. In: Finance and Stochastics 20 (Jan. 2016). doi: 10.1007/s00780-015-0282-y.

[2] Almgren, R. and Chriss, N. A.: “Optimal execution of portfolio transactions”. In: 2001, pp. 5–39. doi: 10.21314/JOR.2001.041.

[3] Aurélien Alfonsi, A. F. and Schied, A.: “Optimal execution strategies in limit order books with general shape functions”. In: Quantitative Finance 10.2 (2010), pp. 143–157. doi: 10.1080/14697680802595700.

[4] Avellaneda, M. and Stoikov, S.: “High Frequency Trading in a Limit Order Book”. In: Quantitative Finance 8 (Apr. 2008), pp. 217–224. doi: 10.1080/14697680701381228.

[5] Bacry, E., Delattre, S., Hoffmann, M., and Muzy, J.: “Scaling limits for Hawkes processes and application to financial statistics”. In: Stochastic Processes and their Applications 123 (Feb. 2012). doi: 10.1016/j.spa.2013.04.007.

[6] Bacry, E., Mastromatteo, I., and Muzy, J.: “Hawkes Processes in Finance”. In: Market Microstructure and Liquidity 01 (Feb. 2015). doi: 10.1142/S2382626615500057.

[7] Bain, A. and Crisan, D.: “Fundamentals of Stochastic Filtering”. In: Stochastic Modelling and Applied Probability. Springer New York, 2008. ISBN: 9780387768960.

[8] Bayraktar, E. and Ludkovski, M.: “Sequential tracking of a hidden Markov chain using point process observations”. In: Stochastic Processes and their Applications 119.6 (2009), pp. 1792–1822. ISSN: 0304-4149. DOI: https://doi.org/10.1016/j.spa.2008.09.003.

[9] Bayraktar, E. and Ludkovski, M.: “Optimal Trade Execution in Illiquid Markets”. In: Mathematical Finance 21.4 (2011), pp. 681–701. DOI: https://doi.org/10.1111/j.1467-9965.2010.00446.x.
[10] Becherer, D., Bilarev, T., and Frentrup, P.: "Optimal liquidation under stochastic liquidity". In: Finance and Stochastics 22.1 (Jan. 2018), pp. 39–68. ISSN: 1432-1122. DOI: 10.1007/s00780-017-0346-2.

[11] Berge, C.: "Topological Spaces: Including a Treatment of Multi-valued Functions, Vector Spaces and Convexity". In: 1963.

[12] Bertsimas, D. and Lo, A. W.: "Optimal control of execution costs". In: Journal of Financial Markets 1.1 (1998), pp. 1–50. ISSN: 1386-4181. DOI: https://doi.org/10.1016/S1386-4181(97)00012-8.

[13] Bouchard, B., Dang, N.-M., and Lehalle, C.-A.: "Optimal Control of Trading Algorithms: A General Impulse Control Approach". In: SIAM Journal on Financial Mathematics 2.1 (2011), pp. 404–438. DOI: 10.1137/090777293.

[14] Bouchaud, J.-P., Farmer, J. D., and Lillo, F.: "How Markets Slowly Digest Changes in Supply and Demand". In: Handbook of Financial Markets: Dynamics and Evolution. North-Holland, 2009, pp. 57–160. DOI: https://doi.org/10.1016/B978-012374258-2.50006-3.

[15] Brachetta, M., Callegaro, G., Ceci, C., and Sgarra, C.: "Optimal reinsurance via BSDEs in a partially observable model with jump clusters". In: Finance and Stochastics (2023). ISSN: 1432-1122. DOI: 10.1007/s00780-023-00523-z.

[16] Brémaud, P.: "Point Processes and Queues. Martingale Dynamics. Springer-Verlag, Berlin – Heidelberg – New York 1981, 373 S., 31 Abb., DM 88,–". In: Biometrical Journal 30.2 (1988), pp. 248–249. DOI: https://doi.org/10.1002/bimj.4710300220.

[17] Brémaud, P. and Massoulié, L.: "Stability of nonlinear Hawkes processes". In: The Annals of Probability 24.3 (1996), pp. 1563–1588. DOI: 10.1214/aop/1065725193.

[18] Brokmann, X., Sérié, E., Kockelkoren, J., and Bouchaud, J.-P.: "Slow Decay of Impact in Equity Markets". In: Market Microstructure and Liquidity 01.02 (2015), p. 1550007. DOI: 10.1142/S2382626615500070.

[19] Carmona, R. and Zeng, C.: "Optimal Execution with Identity Optionality". In: Applied Mathematical Finance 29.4 (2022), pp. 261–287. DOI: 10.1080/1350486X.2023.2193343.

[20] Cartea, Á. and Sánchez-Betancourt, L.: "Optimal execution with stochastic delay". In: Finance and Stochastics 27.1 (Jan. 2023), pp. 1–47. ISSN: 1432-1122. DOI: 10.1007/s00780-022-00491-w.

[21] Ceci, C. and Gerardi, A.: "Filtering of a Markov Jump Process with Counting Observations". In: Applied Mathematics & Optimization 42.1 (Jan. 2000), pp. 1–18. ISSN: 1432-0606. DOI: 10.1007/s002450010005.

[22] Chevalier, E., Hafsi, Y., and Ly Vath, V.: "Uncovering Market Disorder and Liquidity Trends Detection". In: (2023). DOI: 10.48550/arXiv.2310.09273.

[23] Chevalier, E., Ly Vath, V., Roch, A., and Scotti, S.: "Optimal Execution Cost for Liquidation Through a Limit Order Market". In: International Journal of Theoretical and Applied Finance 19 (Jan. 2013). DOI: 10.2139/ssrn.2361110.

[24] Colaneri, K., Eksi, Z., Frey, R., and Szölgyenyi, M.: "Optimal liquidation under partial information with price impact". In: Stochastic Processes and their Applications 130.4 (2020), pp. 1913–1946. ISSN: 0304-4149. DOI: https://doi.org/10.1016/j.spa.2019.06.004.

[25] Costa, O. L. V. and Davis, M. H. A.: "Impulse control of piecewise-deterministic processes". In: Mathematics of Control, Signals and Systems 2.3 (Sept. 1989), pp. 187–206. ISSN: 1435-568X. DOI: 10.1007/BF02551384.

[26] Daley, D. and Vere-Jones, D.: An Introduction to the Theory of Point Processes. Vol. 2. Probability and Its Applications. Springer New York, 2007. ISBN: 9780387213378.

[27] Dammann, F. and Ferrari, G.: "Optimal execution with multiplicative price impact and incomplete information on the return". In: Finance and Stochastics 27.3 (July 2023), pp. 713–768. ISSN: 1432-1122. DOI: 10.1007/s00780-023-00508-y.
[28] Fleming, W. H. and Pardoux, E.: “Optimal Control for Partially Observed Diffusions”. In: SIAM Journal on Control and Optimization 20.2 (1982), pp. 261–285. DOI: 10.1137/0320021.

[29] Fu, G., Horst, U., and Xia, X.: “Portfolio liquidation games with self-exciting order flow”. In: Mathematical Finance 32.4 (2022), pp. 1020–1065. DOI: https://doi.org/10.1111/mafi.12359.

[30] Gatheral, J.: “No-dynamic-arbitrage and market impact”. In: Quantitative Finance 10.7 (2010), pp. 749–759. DOI: 10.1080/14697680903373692.

[31] Guéant, O., Lehalle, C.-A., and Fernandez-Tapia, J.: “Optimal Portfolio Liquidation with Limit Orders”. In: SIAM Journal on Financial Mathematics 3.1 (2012), pp. 740–764. DOI: 10.1137/110850475.

[32] Guilbaud, F. and Pham, H.: “Optimal High-Frequency Trading in a Pro Rata Microstructure with Predictive Information”. In: Mathematical Finance 25.3 (2015), pp. 545–575. DOI: https://doi.org/10.1111/mafi.12042.

[33] Hornik, K., Stinchcombe, M., and White, H.: “Multilayer feedforward networks are universal approximators”. In: Neural Networks 2.5 (1989), pp. 359–366. ISSN: 0893-6080. DOI: https://doi.org/10.1016/0893-6080(89)90020-8.

[34] Kalsi, J., Lyons, T., and Arribas, I. P.: “Optimal Execution with Rough Path Signatures”. In: SIAM Journal on Financial Mathematics 11.2 (2020), pp. 470–493. DOI: 10.1137/19M1259778.

[35] Ludkovski, M. and Sezer, S. O.: “Finite Horizon Decision Timing with Partially Observable Poisson Processes”. In: Stochastic Models 28.2 (2012), pp. 207–247. DOI: 10.1080/15326349.2012.672143.

[36] Ly Vath, V., Mnif, M., and Pham, H.: “A model of optimal portfolio selection under liquidity risk and price impact”. In: Finance and Stochastics 11.1 (Jan. 2007), pp. 51–90. ISSN: 1432-1122. DOI: 10.1007/s00780-006-0025-1.

[37] Mazliak, L.: “Mixed control problem under partial observation”. In: Applied Mathematics and Optimization 27.1 (Jan. 1993), pp. 57–84. ISSN: 1432-0606. DOI: 10.1007/BF01182598.

[38] Mazziotto, G. and Szpirglas, J.: “Separation principle for impulse control with partial information”. In: Stochastics 10.1 (1983), pp. 47–73. DOI: 10.1080/17442508308833262.

[39] Menaldi, J.-L.: “The Separation Principle for Impulse Control Problems”. In: Proceedings of the American Mathematical Society 82.3 (1981), pp. 439–445. ISSN: 00029939, 10886826.

[40] Obizhaeva, A. A. and Wang, J.: “Optimal trading strategy and supply/demand dynamics”. In: Journal of Financial Markets 16.1 (2013), pp. 1–32. ISSN: 1386-4181. DOI: https://doi.org/10.1016/j.finmar.2012.09.001.

[41] Øksendal, B. and Sulem, A.: Applied Stochastic Control of Jump Diffusions. Jan. 2007. ISBN: 978-3-540-69825-8. DOI: 10.1007/978-3-540-69826-5.

[42] Pomponio, F. and Abergel, F.: “Trade-throughs: Empirical Facts and Application to Lead-lag Measures”. In: Econophysics of Order-driven Markets: Proceedings of Econophys-Kolkata V. Milano: Springer Milan, 2011, pp. 3–16. DOI: 10.1007/978-88-470-1766-5_1.

[43] Popier, A. and Zhou, C.: “Second order BSDE under monotonicity condition and liquidation problem under uncertainty *”. In: Annals of Applied Probability 29 (Dec. 2017). DOI: 10.1214/18-AAP1435.

[44] Predoiu, S., Shaikhet, G., and Shreve, S.: “Optimal Execution in a General One-Sided Limit-Order Book”. In: SIAM J. Financial Math. 2 (Jan. 2011), pp. 183–212. DOI: 10.1137/10078534X.

[45] Protter, P.: Stochastic Integration and Differential Equations. Stochastic Modelling and Applied Probability. Springer Berlin Heidelberg, 2005. ISBN: 9783540003137.

[46] Rao, M.: “On modification theorems”. In: Transactions of the American Mathematical Society 167 (1972), pp. 443–450.
[47] Snyder, D. L. and Miller, M. I.: “Doubly Stochastic Poisson-Processes”. In: Random Point Processes in Time and Space. New York, NY: Springer New York, 1991, pp. 341–465. ISBN: 978-1-4612-3166-0. DOI: 10.1007/978-1-4612-3166-0_7.

[48] Sokol, A. and Hansen, N. R.: “Exponential Martingales and Changes of Measure for Counting Processes”. In: Stochastic Analysis and Applications 33.5 (2015), pp. 823–843. DOI: 10.1080/07362994.2015.1040890.

[49] Taranto, E. D., Bormetti, G., Bouchaud, J.-P., Lillo, F., and Toth, B.: “Linear models for the impact of order flow on prices. I. History dependent impact models”. In: Quantitative Finance 18.6 (2018), pp. 903–915. DOI: 10.1080/14697688.2017.1395903.

[50] Zhou, W.-X.: “Universal price impact functions of individual trades in an order-driven market”. In: Quantitative Finance 12.8 (2012), pp. 1253–1263. DOI: 10.1080/14697688.2010.504733.

A Proofs of the Results in Section 3

Firstly, we introduce new definitions and notations that will be helpful in formulating our results.

**Notation A.1.** Let's assume that for each $i \in \{+, -\}$, $N^i$ has the $\mathcal{F}^N$-predictable intensity $\lambda^i$. We also establish the $\mathcal{F}^I$-predictable intensity $\lambda^I$ of $N^I$. Now, consider $d\tilde{N} = dN^+dN^-$ with $\tilde{N}_0 = 0$, and let $\tilde{\lambda}$ be its $\mathcal{F}^N$-predictable intensity. We define $N_t^I = \sum_{l=1, l \neq I}^d n_{Itl}^I(t)$ and $\lambda_t^I = \sum_{k,l=1, k \neq l}^d \psi_{lk}(t)1_{\{I_t=l\}}$ as its $\mathcal{F}_{t+}^I$-predictable intensity, for all $t \in [0, T]$. Additionally, we define

$$d\tilde{N}_t^I = dN_t^+ dN_t^I + dN_t^- dN_t^I - dN_t^+ dN_t^- dN_t^I,$$

and $\tilde{\lambda}^I$ as the $\mathcal{F}$-intensity of $\tilde{N}^I$, for all $t \in [0, T]$.

In the subsequent discussion, we define $\mathcal{F}^I$ as a sub-$\sigma$-field generated by the process $I$, where $\mathcal{F}_t^I$ is defined as $\sigma(I_s; s \in [0, t])$ for all $t \in [0, T]$. We also consider $\mathcal{F}^N$'s initial enlargement $\mathbb{G} = \{\mathcal{G}_t\}_{t \ge 0}$ with $\mathcal{G}_t = \sigma(\mathcal{F}_t^N, \sigma(\{I_t\}_{t \ge 0}))$ for all $t \ge 0$. The filtration $\mathbb{G}$ encapsulates the information available to a hypothetical observer who knows the entire path of $I$ from the outset at time $t = 0$. Since the process $I$ is not observable, we need to rigorously construct the model introduced in Section 2 in the case of co-jumps. We achieve this by employing the change of measure technique, which involves constructing a new probability measure. Under this new measure, the observations $N$ transform into a Lévy process, specifically corresponding to a unit rate Poisson process. To achieve this, we define the Doléans-Dade exponentials $Z = (Z_t)_{t \in [0,T]}$ as

$$Z_t := \prod_{i \in \{+, -\}} \exp \left\{ - \int_0^t \log(\lambda_{s-}^i - \tilde{\lambda}_{s-}) d(N_s^i - \tilde{N}_s) - \int_0^t (1 - \lambda_s^i + \tilde{\lambda}_s) ds \right\} \\ \times \exp \left\{ - \int_0^t \log(\tilde{\lambda}_{s-}) d\tilde{N}_s - \int_0^t (1 - \tilde{\lambda}_s) ds \right\}, \quad \mathbb{P}-a.s.$$

**Proposition A.1.** Let us assume that $Z$ is uniformly integrable. Then, $E^Q(Z_t) = 1$. Additionally, $Z$ is a positive $(\mathbb{P}, \mathcal{G})$-martingale satisfying

$$dZ_t = Z_{t-} \sum_{\{+, -\}} ((\lambda_{t-}^i - \tilde{\lambda}_{t-})^{-1} - 1) [d(N_t^i - \tilde{N}_t) - (\lambda_t^i - \tilde{\lambda}_t)dt] \\ + Z_{t-} ((\tilde{\lambda}_{t-})^{-1} - 1) [d\tilde{N}_t - \tilde{\lambda}_t dt].$$

*Proof.* Refer to Sokol and Hansen [48]. □

The previous proposition allows us to utilize the Girsanov theorem, incorporating the Radon-Nikodym density $Z$ to establish a new probability measure $\mathbb{Q}$ on $(\Omega, \mathcal{G})$ given by $\frac{d\mathbb{Q}}{d\mathbb{P}}|_{\mathcal{G}} = Z_t$,
for all $t \in [0, T]$. Note that the dynamics of $I$ can alternatively be represented using the Poisson measure $n_{lm}^I$, which counts transitions from state $l$ to state $m$. This process has an $\mathcal{F}^I$-intensity given by $t \mapsto \mathbf{1}_{\{I_t=l\}} \psi_{lm}(t)$, where $l, m \in E$. Thus, $I$ has the following semi-martingale decomposition: $dI_t = \sum_{m=1}^d (m - I_{t-}) n_{I_{t-m}}^I(dt)$, $t \ge 0$. This will help us derive the Kushner-Stratonovich equation.

We determine the dynamics of $\mathbb{E}[\varphi(I_t) | \mathcal{F}_t^N]$ for a general $m$-variate point process $(N_t^1, \dots, N_t^m)$ with no common jumps through the use of the innovation method as described in Brémaud [16].

**Proposition A.2.** Let $\varphi \in C^2(\mathbb{R})$ and $t \in [0, T]$. Let $(N_t^1, \dots, N_t^m)$ be a $m$-variate point process, $\mathbb{P}$-non explosive, and let $\mathcal{F}^N$ be its internal history. Suppose that for each $1 \le i \le m$, $N^i$ admits the $\mathcal{F}^N$-predictable intensity $\lambda^i$ and that $[N^i, N^j] = 0, \forall 1 \le j \ne i \le m$. The filter's equation can be expressed as

$$d\pi_t(\varphi) = \sum_{\substack{k,l=1 \\ k \ne l}}^{d} (\varphi(k) - \varphi(l)) \psi_{lk}(t) \widehat{\mathbb{I}_{\{I_t=l\}}} dt + \sum_{i=1}^{m} \frac{1}{\pi_{t-}(\lambda^i)} (\pi_{t-}(\varphi(I)\lambda^i) + \pi_{t-}(D^i) - \pi_{t-}(\varphi)\pi_{t-}(\lambda^i)) \times [dN_t^i - \pi_{t-}(\lambda^i)dt],$$

where $D^i$ are determined by

$$\mathbb{E}[\Delta M_t^I dN_t^i | \mathcal{F}_{t-}] = D_t^i dt,$$

and the stochastic process $(M_t^I)_{t \in [0, T]}$ is given by

$$M_t^I = \int_0^t \sum_{\substack{k=1 \\ k \ne I_s}}^d (\varphi(k) - \varphi(I_s)) \left[ n_{I_s k}(ds) - \psi_{I_s k} ds \right], \quad t \in [0, T].$$

*Proof.* Let $\varphi \in C^2(\mathbb{R})$. We can derive a semi-martingale representation for $\varphi(I_t)$ by applying Dynkin's formula. We get that

$$\varphi(I_t) = \varphi(I_0) + \int_0^t \mathcal{L}_s^I \varphi(I_s) ds + M_t^I, \quad t \in [0, T], \qquad (26)$$

where $\mathcal{L}^I$ denotes the infinitesimal generator associated to $I$, such that

$$\mathcal{L}_t^I \varphi(l) = \sum_{\substack{k=1 \\ k \ne l}}^d (\varphi(k) - \varphi(l)) \psi_{lk}(t), \quad \forall t, l \in [0, T] \times E,$$

and, the stochastic process $(M_t^I)_{t \in [0, T]}$ is given by

$$M_t^I = \int_0^t \sum_{\substack{k=1 \\ k \ne I_s}}^d (\varphi(k) - \varphi(I_s)) \left[ n_{I_s k}(ds) - \psi_{I_s k} ds \right], \quad t \in [0, T].$$

Observing that the process $(\varphi(I_t))_{t \in [0, T]}$ is bounded, it follows that $M^I$ is an integrable $\mathcal{F}^I$-martingale, and that

$$\mathbb{E} \left[ \int_0^t | \mathcal{L}^I \varphi(I_s) | ds \right] < +\infty.$$

We can easily demonstrate, using the tower property of conditional expectations, that the process $\tilde{M}^I$ defined by the martingale problem

$$d\tilde{M}_t^I = d\tilde{\varphi}(I_t) - \mathcal{L}^I \varphi(I_t)dt, \quad t \in [0, T] \qquad (27)$$
is an optional $\mathcal{F}^N$-martingale. Following the martingale representation theorem (see Theorem T9 of Section III and Theorem T8 of Section VIII in Brémaud [16]), we can express $\tilde{M}^I$ as

$$d\tilde{M}_t^I = \sum_{i=1}^{m} K_t^i \left[ dN_t^i - \pi_{t-}(\lambda^i)dt \right],$$

where $K^i$ is $F^\delta$-predictable, for each $1 \le i \le m$, and

$$\int_0^t K_s^i \pi_{s-}(\lambda^i) ds < +\infty. \qquad (28)$$

Let $(\tau_n^i)_{n \ge 0}$ define $\mathcal{F}^N$-predictable stopping times such that, for each $1 \le i \le m$,

$$\tau_n^i = \begin{cases} \inf \{ t \ge 0 \mid \int_0^t (1 + |K_s^i|) \pi_{s-}(\lambda^i) ds \ge n \}, & \text{if } \{ t \mid \int_0^t (1 + |K_s^i|) \pi_{s-}(\lambda^i) ds \ge n \} \ne \emptyset, \\ +\infty, & \text{otherwise.} \end{cases}$$

We deduce, through integration by parts, that

$$\begin{aligned} d(N_t^i \varphi(I_t)) &= N_{t-}^i d\varphi(I_t) + \varphi(I_{t-}) dN_t^i + d[M_t^I, N_t^I] \qquad (29) \\ &= (N_{t-}^i \mathcal{L}^I \varphi(I_t) - D_t^i + D_t^i + \varphi(I_{t-}) \lambda_t^i) dt + N_{t-}^i dM_t^I + \varphi(I_{t-}) (dN_t^i - \lambda_t^i dt) + \Delta M_t^I dN_t^i. \end{aligned}$$

Since $(\varphi(I_t))_{t \in [0,T]}$ and $(N_{t \wedge \tau_n^i}^i)_{t \in [0,T]}$ are bounded on $[0,T]$, then $t \mapsto \int_0^{t \wedge \tau_n^i} \varphi(I_{u-}) (dN_u^i - \lambda_u^i du)$, $t \mapsto \int_0^{t \wedge \tau_n^i} N_{u-}^i dM_u^I$ and $t \mapsto \int_0^{t \wedge \tau_n^i} \Delta M_u^I dN_u^i - D_u^i du$ are $\mathcal{F}$-martingales. Using the Stieltjes-Lebesgue formula and equation (26), we derive that

$$\begin{aligned} d(N_t^i \widehat{\varphi(I_t)}) &= N_{t-}^i d\widehat{\varphi(I_t)} + \widehat{\varphi(I_{t-})} dN_t^i + d[N_t^i, \widehat{\varphi(I_t)}] \qquad (30) \\ &= N_{t-}^i \pi_t(\mathcal{L}^I \varphi) dt + N_{t-}^i d\tilde{M}_t^I + (\widehat{\varphi(I_{t-})} + K_t^i) \left[ dN_t^i - \pi_{t-}(\lambda^i) dt \right] + (\widehat{\varphi(I_{t-})} + K_t^i) \pi_{t-}(\lambda^i) dt. \end{aligned}$$

Let us observe that $(\pi_{t-}(\lambda^i))_{t \in [0,T]}$ is the unique $\mathcal{F}^N$-predictable modification of the intensity $\lambda^i$.

Since the process $(\widehat{\varphi(I_{t-})})_{t \in [0,T]}$ is bounded and $\mathcal{F}^N$-predictable and from the definition of $(\tau_n^i)_{n \ge 0}$, it follows that

$$\begin{aligned} \mathbb{E} \left[ \int_0^{t \wedge \tau_n^i} (\widehat{\varphi(I_{u-})} + K_u^i) dN_u^i \right] &= \mathbb{E} \left[ \int_0^{t \wedge \tau_n^i} (\widehat{\varphi(I_{u-})} + K_u^i) \lambda_u^i du \right] \\ &= \mathbb{E} \left[ \int_0^{t \wedge \tau_n^i} (\widehat{\varphi(I_{u-})} + K_u^i) \pi_{u-}(\lambda^i) du \right] \\ &\le C \mathbb{E} \left[ \int_0^{t \wedge \tau_n^i} (1 + K_u^i) \pi_{u-}(\lambda^i) du \right] \\ &< +\infty, \end{aligned}$$

with $C > 0$. Hence, $t \mapsto \int_0^{t \wedge \tau_n^i} N_{u-}^i d\tilde{M}_u^I$ and $t \mapsto \int_0^{t \wedge \tau_n^i} (\widehat{\varphi(I_{u-})} + K_u^i) [dN_u^i - \pi_{u-}(\lambda^i) du]$ are $\mathcal{F}^N$-martingales. Knowing that $\mathbb{E}[N_{t \wedge \tau_n^i}^i] < +\infty$, we obtain that, for $i \in \{+, -\}$,

$$\begin{aligned} N_{t \wedge \tau_n^i}^i \widehat{\varphi(I_{t \wedge \tau_n^i})} &= \widehat{N_{t \wedge \tau_n^i}^i} \varphi(\widehat{I_{t \wedge \tau_n^i}}) \\ &= N_{t \wedge \tau_n^i}^i \widehat{\varphi(I_{t \wedge \tau_n^i})}. \end{aligned} \qquad (31)$$
By means of the uniqueness of the Doob-Meyer decomposition for semi-martingales (refer to Section III.3 in Protter [45]) with reference to (31), we establish that the finite variations in (29) and (30) are identical. Thus, we conclude that

$$ (\widehat{\varphi(I_{t-})} + K_t^i) \pi_{t-}(\lambda^i)dt = \varphi(I_{t-})\lambda_t^i dt + \widehat{D_t^i}dt, \quad \forall 0 \le t \le \tau_n^i \wedge T. $$

Recall that $\int_0^t \pi_{s-}(\lambda^-)ds < +\infty$. Based on (28), we get that $\lim_{\epsilon \to 0^+} \tau_n^i = +\infty$ with $1 \le i \le m$. Therefore, $\lim_{\epsilon \to 0^+} \tau_n^i \wedge t = t$, for all $t \in [0, T]$, and

$$ K_t^i = \frac{1}{\pi_{t-}(\lambda^i)} (\varphi(\widehat{I_{t-}})\lambda_t^i + \widehat{D_t^i} - \varphi(\widehat{I_{t-}})\pi_{t-}(\lambda^i)). $$

Based on the predictability of $K^i$, we have that, for all $t \in [0, T]$,

$$ K_t^i = \frac{1}{\pi_{t-}(\lambda^i)} (\pi_{t-}(\varphi(I)\lambda^i) + \pi_{t-}(D^i) - \pi_{t-}(\varphi)\pi_{t-}(\lambda^i)). $$

We conclude from (27) that the filter's dynamics are driven by

$$ d\pi_t(\varphi) = \pi_t(\mathcal{L}^I(\varphi))dt + \sum_{i=1}^{m} \frac{1}{\pi_{t-}(\lambda^i)} (\pi_{t-}(\varphi(I)\lambda^i) + \pi_{t-}(D^i) - \pi_{t-}(\varphi)\pi_{t-}(\lambda^i)) \times \left[ dN_t^i - \pi_{t-}(\lambda^i)dt \right]. $$

□

Next, we present the main results of this section.

**Theorem A.1 (Kushner-Stratonovich equation).** Let $\varphi \in C^2(\mathbb{R})$, and $t \in [0, T]$. The filter (6) equation can be expressed as

$$ d\pi_t(\varphi) = \sum_{\substack{k,l=1 \\ k \neq l}}^{d} (\varphi(k) - \varphi(l))\psi_{lk}(t)\widehat{1}_{\{I_t=l\}}dt + \frac{1}{\pi_{t-}(\tilde{\lambda})} (\pi_{t-}(\varphi(I)\tilde{\lambda}) + \pi_{t-}(\tilde{D}) - \pi_{t-}(\varphi)\pi_{t-}(\tilde{\lambda})) \times \left[ d\tilde{N}_t - \pi_{t-}(\tilde{\lambda})dt \right] + \sum_{i \in \{+, -\}} \frac{1}{\pi_{t-}(\lambda^i - \tilde{\lambda})} (\pi_{t-}(\varphi(I)(\lambda^i - \tilde{\lambda})) + \pi_{t-}(D^i - \tilde{D}) - \pi_{t-}(\varphi)\pi_{t-}(\lambda^i - \tilde{\lambda})) \times \left[ d(N_t^i - \tilde{N}_t) - \pi_{t-}(\lambda^i - \tilde{\lambda})dt \right], $$

where $D^+$, $D^-$, and $\tilde{D}$ are determined by

$$ \mathbb{E}[\Delta M_t^I \Delta N_t^+ | \mathcal{F}_{t-}] = D_t^+ dt, \quad \mathbb{E}[\Delta M_t^I \Delta N_t^- | \mathcal{F}_{t-}] = D_t^- dt, \quad \text{and} \quad \mathbb{E}[\Delta M_t^I \Delta \tilde{N}_t | \mathcal{F}_{t-}] = \tilde{D}_t dt, $$

and the stochastic process $(M_t^I)_{t \in [0, T]}$ is given by

$$ M_t^I = \int_0^t \sum_{\substack{j=1 \\ j \neq I_s}}^d (\varphi(j) - \varphi(I_s)) \left[ n_{I_s j}^I(ds) - \psi_{I_s j}(ds) \right], \quad t \in [0, T]. $$

*Proof.* The result follows directly from Theorem A.2 and the fact that the following covariances vanish for all $t \in [0, T]$:

$$ \begin{aligned} [N_t^+ - \tilde{N}_t, \tilde{N}_t] &= [N_t^- - \tilde{N}_t, \tilde{N}_t] = [N_t^+ - \tilde{N}_t, N_t^- - \tilde{N}_t] = 0, \\ [N_t^I - \tilde{N}_t^I, \tilde{N}_t^I] &= [N_t^I - \tilde{N}_t^I, \tilde{N}_t^I] = [N_t^I - \tilde{N}_t^I, N_t^+] = [N_t^I - \tilde{N}_t^I, N_t^-] = 0. \end{aligned} $$

□
For completeness, we conclude this paragraph by outlining the derivation of the Zakai and Duncan-Mortensen-Zakai equations. It's important to note that although presented, these equations won't be employed in our approach. Using the Kallianpur-Striebel formula (see Bain and Crisan [7]), we obtain that, for all $\varphi \in C^2(\mathbb{R})$,

$$ \pi_t(\varphi) = \frac{\mathbb{E}^{\mathbb{Q}}[Z_t^{-1}\varphi(I_t) | \mathcal{F}_t^N]}{\mathbb{E}^{\mathbb{Q}}[Z_t^{-1} | \mathcal{F}_t^N]} = \frac{\sigma_t(\varphi)}{\sigma_t(1)}, \quad t \ge 0. \quad (32) $$

**Proposition A.3 (Zakai equation).** The process $(\sigma_t(\varphi), t \ge 0)$ satisfies the stochastic differential equation

$$ \begin{aligned} d\sigma_t(\varphi) = \sigma_{t-}(\mathcal{L}^I(\varphi))dt &+ \sum_{i \in \{+, -\}} \left( \sigma_{t-}(\varphi(I)(\lambda^i - \tilde{\lambda})) + \sigma_{t-}(D^i - \tilde{D}) - \sigma_{t-}(\varphi) \right) \times \left[ d(N_t^i - \tilde{N}_t) - dt \right] \\ &+ \left( \sigma_{t-}(\varphi(I)\tilde{\lambda}) + \sigma_{t-}(\tilde{D}) - \sigma_{t-}(\varphi) \right) \times \left[ d\tilde{N}_t - dt \right], \end{aligned} \quad (33) $$

with $\varphi \in C^2(\mathbb{R})$ and $\mathcal{L}_t^I \varphi(l) = \sum_{\substack{k=1 \\ k \ne l}}^d (\varphi(k) - \varphi(l))\psi_{lk}(t)$, $\forall t, l \in [0, T] \times E$.

*Proof.* Since $\sigma_t(\varphi) = \pi_t(\varphi)\sigma_t(\mathbf{1}) = \mathbb{E}^{\mathbb{Q}}[Z_t^{-1} | \mathcal{F}_t^N]\pi_t(\varphi)$, we get through the Stieltjes-Lesbesgue formula that

$$ d\sigma_t(\varphi) = d\pi_t(\varphi)\sigma_{t-}(\mathbf{1}) + \pi_{t-}(\varphi)d\sigma_t(\mathbf{1}) + d[\pi_t(\varphi), \sigma_t(\mathbf{1})]. \quad (34) $$

Applying the itô formula, we get the $(\mathbb{Q}, \mathcal{F}^N)$-martingale

$$ \begin{aligned} dZ_t^{-1} = Z_{t-}^{-1} \sum_{\{+, -\}} (\lambda_{t-}^i - \tilde{\lambda}_{t-} - 1) \left[ d(N_t^i - \tilde{N}_t) - dt \right] \\ + Z_{t-}^{-1} (\tilde{\lambda}_{t-} - 1) \left[ d\tilde{N}_t - dt \right]. \end{aligned} $$

Hence, the dynamic of the $\mathcal{F}^N$-optional process $\sigma_t(\mathbf{1})$, under the probability measure $\mathbb{Q}$, is

$$ \begin{aligned} d\sigma_t(\mathbf{1}) = \sigma_{t-}(1) \sum_{\{+, -\}} (\pi_{t-}(\lambda^i) - \pi_{t-}(\tilde{\lambda}) - 1) \left[ d(N_t^i - \tilde{N}_t) - dt \right] \\ + \sigma_{t-}(\mathbf{1}) (\pi_{t-}(\tilde{\lambda}) - 1) \left[ d\tilde{N}_t - dt \right]. \end{aligned} $$

Following the results of Theorem 3.1, we derive the covariation between $\pi_t(\varphi)$ and $\sigma_t(\mathbf{1})$ as

$$ \begin{aligned} d[\pi_t(\varphi), \sigma_t(\mathbf{1})] = & \sum_{i \in \{+, -\}} \frac{1}{\pi_{t-}(\lambda^i - \tilde{\lambda})} \left( \pi_{t-}(\varphi(I)(\lambda^i - \tilde{\lambda})) + \pi_{t-}(D^i) - \pi_{t-}(\tilde{D}) - \pi_{t-}(\varphi)\pi_{t-}(\lambda^i - \tilde{\lambda}) \right) \\ & \times \sigma_{t-}(\mathbf{1}) (\pi_{t-}(\lambda^i) - \pi_{t-}(\tilde{\lambda}) - 1) d[N_t^i - \tilde{N}_t] \\ & + \frac{1}{\pi_{t-}(\tilde{\lambda})} \left( \pi_{t-}(\varphi(I)\tilde{\lambda}) + \pi_{t-}(\tilde{D}) - \pi_{t-}(\varphi)\pi_{t-}(\tilde{\lambda}) \right) \times \sigma_{t-}(\mathbf{1}) (\pi_{t-}(\tilde{\lambda}) - 1) d\tilde{N}_t. \end{aligned} $$
We conclude this proof by plugging the previous equations into (34), which yields

$$d\sigma_{t-}(\varphi) = \sigma_{t-}(\mathcal{L}^I(\varphi))dt + \sum_{i \in \{+, -\}} \left( \sigma_{t-}(\varphi(I)(\lambda^i - \tilde{\lambda})) + \sigma_{t-}(D^i) - \sigma_{t-}(\tilde{D}) - \sigma_{t-}(\varphi) \right) \times \left[ d(N_t^i - \tilde{N}_t) - dt \right] + \left( \sigma_{t-}(\varphi(I)\tilde{\lambda}) + \sigma_{t-}(\tilde{D}) - \sigma_{t-}(\varphi) \right) \times \left[ d\tilde{N}_t - dt \right].$$

□

Theorem A.3 enables us to describe the dynamics of the unnormalized filter $(\sigma_t(\varphi))_{t \in [0,T]}$ by defining it as the unique strong solution to the Zakai equation (33). This equation exhibits linearity and is driven by $n^+$ and $n^-$ instead of the innovation processes $\int_{\mathbb{R}^+} n^+(., dv) - \int_0^1 \pi_{s-}(\lambda^+)ds$ and $\int_{\mathbb{R}^+} n^-(., dv) - \int_0^1 \pi_{s-}(\lambda^-)ds$, as seen in the Kushner-Stratonovic equation. This results from the expression of our filter under the previously constructed probability measure $\mathcal{Q}$. An alternative method to derive the Zakai equation would be through the change of probability technique. This involves analyzing the dynamics of the process $(\varphi(I_t)\tilde{Z}_t^\varepsilon)_{t \in [0,T]}$ using Itô calculus to obtain the stochastic differential equation governing $t \mapsto \sigma_t(\varphi) = \mathbb{E}^{\mathcal{Q}}[Z_t^{-1}\varphi(I_t) | \mathcal{F}_t^N]$, where $\tilde{Z}_t^\varepsilon = \frac{Z_t^{-1}}{1+\varepsilon Z_t^{-1}}$ for all $t \in [0,T]$ and $\varepsilon > 0$. The introduction of the transformed process $\tilde{Z}^\varepsilon$ is primarily motivated by its boundedness, which facilitates the derivation of martingales that are easy to manipulate. The desired outcome is obtained by letting $\varepsilon$ approach 0 (see Bain and Crisan [7]). Nevertheless, given that we have previously established the Kushner-Stratonovic equation, it is more straightforward to derive the Zakai equation via the Kallianpur-Striebel formula, as $\sigma_t(\varphi) = \pi_t(\varphi)\sigma_t(1)$ holds for all $t \in [0,T]$.

## B Proofs of the Results in Section 4

*Proof of Proposition 4.2.* Let $t \in [0, T]$, $N \in \mathbb{N}^*$ and $y = (x, \kappa^+, \kappa^-, d, s, \mu) \in \mathcal{D}$. We define $U_0$ and $U_N$, such that

$$\begin{aligned} U_0(t, y) &= \mathbb{E}_{t,y} \left[ C(S_{\tau_S} + D_{\tau_S}, x) \right] \\ U_N(t, y) &= \sup_{\tau \in \Theta_t} \mathbb{E}_{t,y} \left[ \mathcal{M}V_{N-1}(\tau, x, S_{\tau}, \bar{\lambda}_{\tau}^{+}, D_{\tau}, \bar{\lambda}_{\tau}^{-}, \pi_{\tau}) \right]. \end{aligned}$$

For $\alpha = (\tau_k, \xi_k)_{k \ge 1} \in \mathcal{A}_t^N(x)$, we have that

$$\begin{aligned} J(t, y, \alpha) &= \mathbb{E}_{t,y} \left[ \mathbb{1}_{\{\tau_1 < \tau_S^N\}} C(S_{\tau_1}^{\alpha} + D_{\tau_1}^{\alpha}, |\Delta X_{\tau_1}|) \right] \\ &\quad + \mathbb{E}_{t,y} \left[ \mathbb{E} \left[ \sum_{\tau \in [\tau_1, \tau_S^N]} C(S_{\tau}^{\alpha} + D_{\tau}^{\alpha}, |\Delta X_{\tau}|) + C(S_{\tau_S}^{\alpha} + D_{\tau_S}^{\alpha}, X_{\tau_S}^N) \mid \mathcal{F}_{\tau_1}^N \right] \right] \end{aligned}$$

As a result of Definition 15 of the value function approximation $V_{N-1}$ and Definition 14 of the intervention operator $\mathcal{M}$,

$$\begin{aligned} J(t, y, \alpha) &\le \mathbb{E}_{t,y} \left[ C(S_{\tau_1}^{\alpha} + D_{\tau_1}^{\alpha}, \mathbb{1}_{\{\tau_1 < \tau_S^N\}} | \Delta X_{\tau_1}|) + V_{N-1}(\tau_1^+, x - \mathbb{1}_{\{\tau_1 < \tau_S^N\}} | \Delta X_{\tau_1}|, S_{\tau_1}^{\alpha}, D_{\tau_1}^{\alpha}, \bar{\lambda}_{\tau_1}^{+}, \bar{\lambda}_{\tau_1}^{-}, \pi_{\tau_1}^{+}) \right] \\ &\le \mathbb{E}_{t,y} \left[ C(S_{\tau_1}^{\alpha} + D_{\tau_1}^{\alpha}, \mathbb{1}_{\{\tau_1 < \tau_S^N\}} | \Delta X_{\tau_1}|) + V_{N-1}(\Gamma(\tau_1, x, S_{\tau_1}^{\alpha}, D_{\tau_1}^{\alpha}, \bar{\lambda}_{\tau_1}^{+}, \bar{\lambda}_{\tau_1}^{-}, \pi_{\tau_1}, \mathbb{1}_{\{\tau_1 < \tau_S^N\}} | \Delta X_{\tau_1}|) \right] \\ &\le \mathbb{E}_{t,y} \left[ \mathcal{M}V_{N-1}(\tau_1, x, S_{\tau_1}^{\alpha}, D_{\tau_1}^{\alpha}, \bar{\lambda}_{\tau_1}^{+}, \bar{\lambda}_{\tau_1}^{-}, \pi_{\tau_1}) \right] \\ &\le U_N(t, y). \end{aligned}$$
It follows that $V_N \le U_N$.

Let $\varepsilon > 0$. There exists an $\varepsilon$-optimal $\tau^* \in \Theta_t$, such that

$$U_N(t, y) \le \frac{\varepsilon}{2} + \mathbb{E}_{t,y} \left[ \mathcal{M}V_{N-1}(\tau^*, x, S_{\tau^*}^\alpha, D_{\tau^*}^\alpha, \bar{\lambda}_{\tau^*}^+, \bar{\lambda}_{\tau^*}^-, \pi_{\tau^*}) \right].$$

Additionally, there exists an $\mathcal{F}_{\tau^*}^N$-measurable $\xi^*$ taking values in $a(X_{\tau^*})$, such that

$$\mathcal{M}V_{N-1}(\tau^*, x, S_{\tau^*}^\alpha, D_{\tau^*}^\alpha, \bar{\lambda}_{\tau^*}^+, \bar{\lambda}_{\tau^*}^-, \pi_{\tau^*}) \le \frac{\varepsilon}{2} + C(S_{\tau^*}^\alpha + D_{\tau^*}^\alpha, \xi^*) + V_{N-1}(\Gamma(\tau^*, x, S_{\tau^*}^\alpha, D_{\tau^*}^\alpha, \bar{\lambda}_{\tau^*}^+, \bar{\lambda}_{\tau^*}^-, \pi_{\tau^*}, \xi^*)).$$

Hence,

$$U_N(t, y) \le \varepsilon + \mathbb{E}_{t,y} \left[ C(S_{\tau^*}^\alpha + D_{\tau^*}^\alpha, \xi^*) + V_{N-1}(\Gamma(\tau^*, x, S_{\tau^*}^\alpha, D_{\tau^*}^\alpha, \bar{\lambda}_{\tau^*}^+, \bar{\lambda}_{\tau^*}^-, \pi_{\tau^*}, \xi^*)) \right]. \quad (35)$$

Finally, we introduce $\bar{\alpha}$, such that

$$\bar{\alpha} = \begin{cases} (\xi^*, \tau^*) & , \text{ if } k=1 \\ \hat{\alpha} = (\tau_k, \xi_k) & , \text{ else} \end{cases}$$

where $\hat{\alpha} \in \mathcal{A}_{\tau^*}^N(X_{\tau^*})$. We obtain that

$$V_N(t, y) \ge \mathbb{E}_{t,y} \left[ C(S_{\tau^*} + D_{\tau^*}, \xi^*) + J^{\bar{\alpha}}(\tau^{*+}, x - \xi^*, S_{\tau^{*+}}, D_{\tau^{*+}}, \bar{\lambda}_{\tau^{*+}}^+, \bar{\lambda}_{\tau^{*+}}^-, \pi_{\tau^{*+}}) \right].$$

Using inequality (35) and the fact that $\hat{\alpha}$ is arbitrary, we get that

$$\begin{aligned} V_N(t, y) & \ge \mathbb{E}_{t,y} \left[ V_{N-1} \left( \Gamma(\tau^*, x, S_{\tau^*}, D_{\tau^*}, \bar{\lambda}_{\tau^*}^+, \bar{\lambda}_{\tau^*}^-, \pi_{\tau^*}, \xi^*) \right) + C(S_{\tau^*} + D_{\tau^*}, \xi^*) \right] \\ & \ge U_N(t, y) - \varepsilon. \end{aligned}$$

As $\varepsilon$ approaches zero, we conclude the proof. $\square$

# C Proofs of the Results in Section 5

*Proof of Lemma 1. Proof of result 1:*

We fix $t \in [0, T]$ and $(d, s, \kappa^+, \kappa^-, \mu) \in \mathbb{R}^2 \times (\mathbb{R}_+^d)^2 \times \mathcal{S}$. For $0 \le x_1 \le x_2$, we define $\alpha = (\tau_k, \xi_k)_{k \ge 1} \in \mathcal{A}_t(x_1)$ and $\bar{\alpha} = (\tilde{\tau}_k, \tilde{\xi}_k)_{k \ge 1} \in \mathcal{A}_t(x_2)$ such that

$$(\tilde{\tau}_k, \tilde{\xi}_k) = \begin{cases} (\tau_k, \xi_k) & , \text{ if } \tau_k < \tau_S \\ (\tau_S, \xi_k + x_2 - x_1) & , \text{ if } \tau_k = \tau_S \end{cases}$$

where $\xi_k$ can be equal to zero in case there is no action at time $\tau_S$ using the strategy $\alpha$. Hence, $X_{\tau_S}^{\bar{\alpha}} = X_{\tau_S}^{\alpha} + x_2 - x_1$ and $X_t^{\bar{\alpha}} = X_t^{\alpha}$, for all $0 \le t < \tau_S$. Since, $Q$ in non-decreasing on $\mathbb{R}_+$, we have that

$$\begin{aligned} C(S_{\tau_S}^{\bar{\alpha}} + D_{\tau_S}^{\bar{\alpha}}, X_{\tau_S}^{\bar{\alpha}}) &= C(S_{\tau_S}^{\alpha} + D_{\tau_S}^{\alpha}, X_{\tau_S}^{\alpha} + x_2 - x_1) \\ &\ge C(S_{\tau_S}^{\alpha} + D_{\tau_S}^{\alpha}, X_{\tau_S}^{\alpha}). \end{aligned}$$

Hence,

$$\begin{aligned} V(t, x_2, s, d, \kappa^+, \kappa^-, \mu) &\ge J(t, x_2, s, d, \kappa^+, \kappa^-, \mu, \bar{\alpha}) \\ &\ge \mathbb{E}_{t,y_2} \left[ \sum_{\tau \in [t, \tau_S]} C(S_{\tau}^{\bar{\alpha}} + D_{\tau}^{\bar{\alpha}}, |\Delta X_{\tau}^{\bar{\alpha}}|) + C(S_{\tau_S}^{\bar{\alpha}} + D_{\tau_S}^{\bar{\alpha}}, X_{\tau_S}^{\bar{\alpha}}) \right] \\ &\ge \mathbb{E}_{t,y_1} \left[ \sum_{\tau \in [t, \tau_S]} C(S_{\tau}^{\alpha} + D_{\tau}^{\alpha}, |\Delta X_{\tau}^{\alpha}|) + C(S_{\tau_S}^{\alpha} + D_{\tau_S}^{\alpha}, X_{\tau_S}^{\alpha}) \right]. \end{aligned}$$
Knowing that $\alpha$ is arbitrary, we conclude that

$$V(t, x_1, s, d, \kappa^+, \kappa^-, \mu) \leq V(t, x_2, s, d, \kappa^+, \kappa^-, \mu) \quad , \quad 0 \leq x_1 \leq x_2.$$

**Proof of results 2 and 3:**

Let $t \in [0, T]$, $\epsilon > 0$, $(x, s, \kappa^+, \kappa^-, \mu) \in \mathbb{R}^+ \times \mathbb{R} \times (\mathbb{R}_+^d)^2 \times \mathcal{S}$ and $d_1 \leq d_2$. We define
$$\alpha = (\tau_k, \xi_k)_{k \geq 1} \in \mathcal{A}_t(x) \text{ as an } \epsilon\text{-optimal strategy for } V(t, x, s, d_1, \kappa^+, \kappa^-, \mu) = V(t, y_1), \text{ i.e.,}$$

$$V(t, x, s, d, \kappa_1^+, \kappa^-, \mu) \leq J(t, x, s, d, \kappa_1^+, \kappa^-, \mu, \alpha) - \epsilon \\ \leq \mathbb{E}_{t, y_1} \left[ \sum_{\tau \in [t, \tau_S]} C(S_{\tau}^{\alpha} + D_{\tau}^{\alpha}, |\Delta X_{\tau}^{\alpha}|) + C(S_{\tau_S}^{\alpha} + D_{\tau_S}^{\alpha}, X_{\tau_S}^{\alpha}) \right] + \epsilon.$$

We know that, for all $\tau \in \Theta_t$,

$$D_{\tau}^{\alpha} = e^{-\rho(\tau-t)} D_t - (1-\nu) \sum_{t \le \tau_k < \tau} e^{-\rho(\tau-\tau_k)} Q(\xi_k) + (1-\nu) \int_t^{\tau} \int_{\mathbb{R}_+} e^{-\rho(\tau-u)} Q(v) n(du, dv).$$

Additionally, we know that the term

$$\mathbb{E}_{t,y} \left[ \int_t^\tau \int_{\mathbb{R}_+} e^{-\rho(\tau-u)} Q(v) n(du, dv) \right] = \sum_{i=1}^d \mathbb{E}_{t,y} \left[ \int_t^\tau \int_{\mathbb{R}_+} \pi_i(u) e^{-\rho(\tau-u)} Q(v) (\lambda_u^{i,+} - \lambda_u^{i,-}) \nu_i(dv) \, du \right]$$

is non-decreasing in $\kappa^{i,+}$ and decreasing in $\kappa^{i,-}$ on $\mathbb{R}_+$, for all $t \in [t, T]$, $\tau \in \Theta_t$ and $y \in \mathcal{D}$.

Consequently, $\mathbb{E}_{t,y_2}[D_{\tau}^{\alpha}] \geq \mathbb{E}_{t,y_1}[D_{\tau}^{\alpha}]$. Since $p \mapsto C(p, x)$ is non-decreasing on $\mathbb{R}$, we get that

$$\begin{aligned} \mathbb{E}_{t,y_2} [C(S_{\tau}^{\alpha} + D_{\tau}^{\alpha}, a)] &= \mathbb{E}_{t,y_2} [C(\mathbb{E}_{t,y_2}[S_{\tau}^{\alpha} + D_{\tau}^{\alpha}], a)] \\ &\geq \mathbb{E}_{t,y_1} [C(\mathbb{E}_{t,y_1}[S_{\tau}^{\alpha} + D_{\tau}^{\alpha}], a)] \\ &\geq \mathbb{E}_{t,y_1} [C(S_{\tau}^{\alpha} + D_{\tau}^{\alpha}, a)], \end{aligned}$$

for all $a \in \mathbb{R}_+$. Therefore,

$$\begin{aligned} V(t, x, s, d_2, \kappa^+, \kappa^-, \mu) &\geq \mathbb{E}_{t,y_2} \left[ \sum_{\tau \in [t, \tau_S]} C(S_{\tau}^{\alpha} + D_{\tau}^{\alpha}, |\Delta X_{\tau}^{\alpha}|) + C(S_{\tau_S}^{\alpha} + D_{\tau_S}^{\alpha}, X_{\tau_S}^{\alpha}) \right] \\ &\geq \mathbb{E}_{t,y_1} \left[ \sum_{\tau \in [t, \tau_S]} C(S_{\tau}^{\alpha} + D_{\tau}^{\alpha}, |\Delta X_{\tau}^{\alpha}|) + C(S_{\tau_S}^{\alpha} + D_{\tau_S}^{\alpha}, X_{\tau_S}^{\alpha}) \right] \\ &\geq V(t, x, s, d_1, \kappa^+, \kappa^-, \mu) - \epsilon. \end{aligned}$$

As $\epsilon$ approaches zero, we obtain $V(t, x, s, d_1, \kappa^+, \kappa^-, \mu) \leq V(t, x, s, d_2, \kappa^+, \kappa^-, \mu)$ for all $0 \leq d_1 \leq d_2$.

Therefore, $V$ is decreasing in $d$ on $\mathbb{R}_+$. The proofs of result 3 and of the first part of result 4 are similar to the proof of result 2.

**Proof of result 4:**

Let $t \in [0, T]$, $y = (x, s, d, \kappa^+, \kappa^-, \mu) \in \mathcal{D}$ and $\alpha \in \mathcal{A}_t(x)$. Using (10) and (12), we get that

$$J(t, y, \alpha) = \mathbb{E}_{t,y} \left[ \sum_{\tau \in [t, \tau_S]} \left( |\Delta X_{\tau}^{\alpha}| (S_{\tau}^{\alpha} + D_{\tau}^{\alpha}) - \int_{0}^{Q(|\Delta X_{\tau}^{\alpha}|)} v f(v) dv - c_0 \right) \right] \\ + \mathbb{E}_{t,y} \left[ 1_{\{|\Delta X_{\tau_S}^{\alpha}| > 0\}} \left( |\Delta X_{\tau_S}^{\alpha}| (S_{\tau_S}^{\alpha} + D_{\tau_S}^{\alpha}) - \int_{0}^{Q(|\Delta X_{\tau_S}^{\alpha}|)} v f(v) dv - c_0 \right) \right]$$

Based on the controlled dynamics of the fundamental price $S^\alpha$ and of the price deviation $D^\alpha$
described in (11), the reward function $J$ can be expressed as

$$ J(t, y, \alpha) = xs + \nu \mathbb{E}_{t,y} \left[ \sum_{\tau \in [t, \tau_S]} |\Delta X_{\tau}^{\alpha}| \left( \int_t^{\tau} \int_{\mathbb{R}_+} Q(v)n(du, dv) - \sum_{t \le \tau_k < \tau} Q(\xi_k) \right) \right] \\ + \mathbb{E}_{t,y} \left[ \sum_{\tau \in [t, \tau_S]} |\Delta X_{\tau}^{\alpha}| D_{\tau}^{\alpha} - \int_0^{Q(|\Delta X_{\tau}^{\alpha}|)} v f(v) dv - c_0 \right] \\ + \nu \mathbb{E}_{t,y} \left[ \mathbb{1}_{\{|\Delta X_{\tau_S}^{\alpha}| > 0\}} |\Delta X_{\tau_S}^{\alpha}| \left( \int_t^{\tau_S} \int_{\mathbb{R}_+} Q(v)n(du, dv) - \sum_{t \le \tau_k < \tau_S} Q(\xi_k) \right) \right] \\ + \mathbb{E}_{t,y} \left[ \mathbb{1}_{\{|\Delta X_{\tau_S}^{\alpha}| > 0\}} \left( |\Delta X_{\tau_S}^{\alpha}| D_{\tau_S}^{\alpha} - \int_0^{Q(|\Delta X_{\tau_S}^{\alpha}|)} v f(v) dv - c_0 \right) \right] \\ = xs + g(t, x, d, \kappa^+, \kappa^-, \mu, \alpha). $$

Hence, the linear dependence on the initial parameter $s$ in the dynamics of $S^\alpha$ makes the following separation

$$ V(t, y) = xs + \sup_{\alpha \in A_t(x)} g(t, x, d, \kappa^+, \kappa^-, \mu, \alpha), $$

possible. This completes the proof.

<figure><img src="image_8.png" /></figure>

## D Numerical Implementation

To parameterize the value function $V$ defined in (13), we implement a neural network as a parametric function approximator. This method is chosen because the exact form of $W_N$ is typically unknown. The neural network approximation is particularly motivated by the high dimensionality of the problem. To validate this approach, we use the universal approximation theorem, justified by the continuity of $W_N$ (see Proposition 5.1).

**Theorem D.1 (Hornik, Stinchcombe, and White [33]).** Let $W$ be a value function defined on $(t, y) \in [0, T] \times \mathcal{D}$. Suppose $W$ is continuous on the compact domain $[0, T] \times \mathcal{D}$. Then, for any $\epsilon > 0$, there exists a neural network $\hat{W}(t, y; \theta)$ with a sufficiently large number of hidden neurons such that

$$ \sup_{(t,y) \in [0,T] \times \mathcal{D}} |W(t, y) - \hat{W}(t, y; \theta)| < \epsilon. $$

The neural network is trained iteratively using the following procedure, which enables the approximation to progressively converge toward the value function $V$:

* **Initialization:** We initialize the parameters $\theta_0$ and set

$$ W_0(t, y; \theta_0) = V_0(t, y), $$

where $V_0$ is the initial value function. The network has an input layer for state variables, three hidden layers with 64, 32, and 16 neurons respectively, with ReLU activations, and an output layer estimating $W$. Xavier initialization is used for $\theta$ to ensure proper gradient flow.

* **Data Generation:** We generate a set of training samples $(t, y)$ from the discretized domain $[0, T] \times \mathcal{D}$. For each sample, we compute the target values using the operator $I_1$ defined in (25).

* **Approximation of $W_N$:** We approximate $W_N$ using a neural network. The term $\hat{W}_N$ refers to the approximation of $W_N$ from the previous iteration.

* **Target Computation:** For each training sample, we determine the target value for $W_{N+1}$ by computing the supremum over $u \in [t, T]$ of the operator $I_1$ applied to the current approximation $\hat{W}_N$ so that we have

$$ W_{N+1}(t, y) = \sup_{u \in [t, T]} I_1 \hat{W}_N(t, u, y). $$
* **Optimization:** We define the loss function $L(\theta)$ as the mean squared error between the neural network output $\hat{W}(t, y; \theta)$ and the target values $W_{N+1}(t, y)$, such that

$$L(\theta) = \frac{1}{M} \sum_{i=1}^{M} (\hat{W}(t_i, y_i; \theta) - W_{N+1}(t_i, y_i))^2.$$

The optimization is carried out using the Adam optimizer to update the parameters $\theta$.

* **Convergence Check:** The convergence of the training process is monitored by evaluating changes in the loss function and network parameters. The training is concluded when the change in these metrics falls below a predetermined threshold $\epsilon$.