Optimal Limit Order Book Trading Strategies with Stochastic Volatility in the Underlying Asset

In quantitative finance, there have been numerous new aspects and developments related with the stochastic control and optimization problems which handle the controlled variables of performing the behavior of a dynamical system to achieve certain objectives. In this paper, we address the optimal trading strategies via price impact models using Heston stochastic volatility framework including jump processes either in price or in volatility of the price dynamics with the aim of maximizing expected return of the trader by controlling the inventories. Two types of utility functions are considered: quadratic and exponential. In both cases, the remaining inventories of the market maker are charged with a liquidation cost. In order to achieve the optimal quotes, we control the inventory risk and follow the influence of each parameter in the model to the best bid and ask prices. We show that the risk metrics including profit and loss distribution (PnL), standard deviation and Sharpe ratio play important roles for the trader to make decisions on the strategies. We apply finite differences and linear interpolation as well as extrapolation techniques to obtain a solution of the nonlinear Hamilton-Jacobi-Bellman (HJB) equation. Moreover, we consider different cases on the modeling to carry out the numerical simulations.


Introduction
Recently, there have been crucial developments in quantitative financial strategies to execute the orders driven in markets by computer programs with a very high speed (in microseconds). In particular, high-frequency trading is one of the major topics that attracts the attention excessively due to its benefits on market microstructure, being an interdisciplinary field including the hot topics, such as stochastic optimization, finance, economics and statistics. The market microstructure, which can be stated as the research on the strong trading mechanisms managed for the financial securities, has been equipped with the contributions by the books Hasbrouck (2007) and O'Hara (1997). A significant number of algorithmic trading strategies in markets has also been commenced with the appearance of high-frequency trading which is characterized as a less narrow set of trading strategies in the algorithmic trading class and a growing need for the quantitative approaches on the analysis and optimization techniques to develop the trading strategies.
In electronic markets, any trader can become a market maker who provides the liquidity to the markets in Limit Order Books (LOB); and market makers are allowed to submit the orders on both buy and sell sides of the market by the trading mechanisms. Deciding for the best bid and ask prices that a market maker sets up is a hard and complex problem in many aspects due to the fact that the problem should be tackled as a combined problem of the modeling the asset price dynamics and the optimal spreads. Fortunately, the stochastic control theory helps to handle such kind of optimization problem by seeking an optimal strategy in order to maximize the trader's objective function and to face a dyadic problem for the high-frequency trading. The theory encourages the study of optimizing activities in financial markets as it allows to accomplish the complex optimization problems involving constraints that are consistent with the price dynamics while managing the inventory risk. In order to detect the optimal quotes in the market, it is, therefore, necessary to solve the corresponding nonlinear Hamilton-Jacobi-Bellman (HJB) equation for the optimal stochastic control problem. This is generally achieved by applying various rootfinding algorithms that can handle the complexity and high-dimensionality of the equation. See for instance Bachouch et al. (2022) and Baldacci et al. (2019).
In the framework of the optimal trading strategy for high-frequency trading in a LOB, there have been many papers following early studies of Grossman and Miller (1988) and Ho and Stoll (1981). Avellaneda and Stoikov (2008) have revised the study of Ho and Stoll (1981) building a practical model that considers a single dealer trading a single stock facing with a stochastic demand modeled by a continuous time Poisson process. The literature on the optimal market making problem has been burgeoning since 2008 with the work of Avellaneda and Stoikov (2008), inspiring Guilbaud and Pham (2013) to derive a model involving limit and market orders with optimal stochastic spreads. Bayraktar and Ludkovski (2014) have considered the optimal liquidation problem where they model the order arrivals with intensities depending on the liquidation price. More advanced models have been developed with adverse selection effects and stronger market order dynamics, see for example the paper of Cartea et al. (2014). Guéant et al. (2013) have extended and formalized the results of Avellaneda and Stoikov (2008). Another extended market making model with inventory constraints has been provided by Fodra and Labadie (2012) who consider a general case of midprice by linear and exponential utility criteria and find closed-form solutions for the optimal spreads.  have proposed a solution to deal with the problem of including the market impact on the midprice and have worked on risk metrics for the high-frequency trading strategies they have developed. Moreover, Yang et al. (2020) have improved the existing models with Heston stochastic volatility model, to characterize the volatility of the stock price with price impact and, implemented an approximation method to solve the nonlinear HJB equation. They have considered a constant price impact using the same counting processes for both arrival and filled limit orders. More recently, Baldacci et al. (2021) have studied the optimal control problem for an option market maker with Heston model in an underlying asset using the vega approximation for the portfolio. For more developments in optimal market making literature, we refer the reader to Guéant (2017), Ahuja et al. (2016), Cartea et al. ( , 2017, Guéant and Lehalle (2015), Nyström (2014) and Guéant et al. (2012).
The goal of this paper is first to propose an optimal quoting strategy that is adopted by the stochastic volatility, drift effect and market impact by the amount and type of the orders in the price dynamics. We also consider the case of the market impact occuring by the jumps in volatility dynamics. More precisely, we investigate an optimal trading strategy by these extended price modelings under different utility functions proposing two independent counting processes to express the market impact by the arrival and the filled limit orders motivated by . We derive the closed-form solutions for the optimal quotes and solve the corresponding nonlinear HJB equations using the finite difference discretization method which enables us to evaluate the spread values and derive the various simulation analyzes. Furthermore, we explore the risk and normality testings of the models depending on their strategies. Lastly, we compare the models that we have derived in this paper with existing optimal market making models in the literature under both quadratic and exponential utility functions.
The rest of the paper is organized as follows. In Sect. 2, we set the framework in continuous time and formulate the optimization problem in terms of the expected return of the trader. Section 3 is dedicated to the study of the stochastic control and Hamilton-Jacobi-Bellman equations for the model proposed in Sect. 2. In Sect. 3.2.1, we consider the case of the jumps in volatility of the price. In Sect. 5, we present numerical solutions under various conditions. Finally, Sect. 6 concludes the paper with an outlook. The paper is also equipped with an Appendix on how to use the method of finite differences for the numerical solution of the corresponding nonlinear differential equation.

A Market Making Optimization Problem in a Limit Order Book
We define a probability space ðX; F ; PÞ with a sample space X, filtration F and a probability measure P for all random variables and stochastic processes.
To start, we set up a high-frequency trading model in order to gain from the expected profit by building trading strategies on limit buy and sell orders. The model we will explore is based on a stock price that is generated by Poisson processes with various intensities representing the different jump amounts to employ the adverse selection effects. The model also includes the stochastic volatility dynamics.
Assume that the midprice [or fundamental price ] S t of the stock in the market follows the dynamics: which employs the Heston stochastic volatility model Heston (1993), where B 1 t and B 2 t are Wiener processes and q 2 ½À1; 1 is the instantaneous correlation coefficient between them. Here, l is the constant drift term, h is the long-term variance parameter, k is the rate at which the stochastic volatility m t reverts to h, r is the volatility of the volatility and m t ! 0 follows a mean-reverting square root process. We should note that if the Feller's condition, 2kh ! r 2 Feller (1951), is satisfied, then the volatility process m t becomes always positive. In the model, M AE t are independent Poisson processes with intensities k AE which count the number of arrived market orders and e AE are the jump sizes in the midprice caused by the orders which are i.i.d. random variables with finite second moments having E½e AE ¼ AE .
The model is constructed for the case of market making problem. Hence, we assume that there is a market maker who continuously proposes optimal bid and ask quotes at prices S t À d À t and S t þ d þ t , where d AE t are the related depths at which the market maker posts the limit orders.
The inventory of the market maker with an initial inventory q 0 ¼ 0 is restricted to be between upper and lower bounds during the trading session at any time t; particularly, q 2 ½q; q and it has the following dynamics:

Dynamic Programming Equation for the Value Function
Under the assumptions provided in Sect. 2 and assuming that ðS t ; M AE t ; N AE t Þ is Markovian, the optimization problem (3) can be solved using the stochastic control approach (Bates 2016;Björk 2012;Pham 2009). The solution will be based on two different choices of utility functions, quadratic and exponential, in the sequel.

Case 1: Quadratic utility function
We assume that the utility function is of the quadratic form, that is, where the function gðq T Þ may be considered as a function that penalizes the leftover inventories at the maturity time with a constant execution cost parameter a. Note that this utility function is linear when a ¼ 0, and hence, the market maker becomes riskneutral in such a case. Thereby, one has the corresponding value function which should be satisfied by the HJB equation.
Proposition 1 The value function (5) satisfies the HJB equation, with the final condition, where K t is given in (2) and the expectation is taken over the random variables e AE .
Proof Here, we will show only the basic steps of the proof. For more details, one can refer to Fleming and Soner (2006) and Pham (2009). It is clear that the value function (5) for R þ Â R n ! R is in the form of Fðs; X u s ; u s Þds þ GðX u s Þ ! and that it is optimal when u t ¼ uðt; S t Þ is the control process of the problem, A t is the set of the admissible strategies, F and G are the instantaneous and terminal reward functions, respectively. We want to derive a partial differential equation (PDE) for the value function (5). Further, we fix ðt; xÞ 2 ð0; T Þ Â R n and choose any stopping time t þ h\T where h [ 0 is small enough. Then, we consider the expected utility function This completes the proof.

Deriving the optimal quotes
For the case of a quadratic utility function, we derive the optimal spreads for limit orders and observe their behaviors. For this purpose, we should obtain an appropriate solution to (6) with the final condition (7) and show that this solution verifies the value function (5).
Note that when the function uðt; m; qÞ is independent of m, the formulas given by (13) correspond to the optimal control results in .
We should also note that the behavior of the equation is changed at the boundary points of the inventory limits. Being q ¼ q means that the selling is forbidden for the market maker, since there will be no leftover inventories if the selling action happens. As a result, we have the HJB equation Therefore, in this case, we can only find the optimal buy spread d ÀÃ t . Similarly, in the case of q ¼ q, buying is forbidden for the market maker. Thus, we have We should recall that we impose the inventory q t to be in a finite range ½q; q for the whole trading session. (14) is invariant under interchanging q with Àq. Thus, we have uðt; m; qÞ ¼ uðt; m; ÀqÞ which leads d AEÃ ðt; m; qÞ ¼ d ÇÃ ðt; m; ÀqÞ by the optimal controls (13).
The computational difficulty to solve the Eqs. (14), (15) and (16) together arises, due to the fact that equations contain a discrete variable q with continuous variables t and m. Further, u values at level q À 1, as well as q þ 1, feed the u values at level q. Hence, to overcome this difficulty, we solve the nonlinear verification equation by applying finite difference discretization scheme backwards in time. For the details, see Appendix 1. After calculating uðt; m; qÞ, we can generate the optimal distances given by the formulas (13).
Remark 1 By the transformation uðt; m; qÞ ¼ 1 j ln xðt; m; qÞ with xðt; m; qÞ ¼ ½xðt; m; qÞ; xðt; m; q À 1Þ; . . .; xðt; m; qÞ 0 where j þ ¼ j À ¼ j, storing all q's into a vector and after some calculations; (14), (15), and (16) can be transformed into the following nonlinear system of PDEs where x t , x m , x mm andx are ðq À q þ 1Þ Â 1 vectors given by Remark 2 An important restriction arises on the negative spreads since the intensities are defined for all real numbers and the trader should keep the admissible strategies where the optimal spreads should be positive and finite. To avoid this situation, we add a constraint for d AEÃ t and get the maximum value of the negative spreads with a very small positive number d Ã : when q 6 ¼ q:

Verification argument
Now, we show that a solution uðt; m; qÞ of (12) exists and is unique that should be guaranteed by the verification theorem so that this classical solution is the value function of the HJB equation and the spreads, defined by (13), are indeed the optimal ones.
Proof The proof is very similar to the discussions presented in  and Guéant et al. (2013). Let t 2 ½0; T , ðd AE s Þ t s T be the admissible controls and W ðt; x; S; m; qÞ be the solution to the HJB Eq. (6). Consider the following processes for s 2 ½t; T : as well as such that dB 1 s dB 2 s ¼ qds, where M AE are independent Poisson processes with intensities k AE and N AE are independent counting processes with filled probabilities e Àj AE d AE s . The optimal bid and ask prices are Note that W is continuous and positive on a compact set, thus it has a lower bound. We know that d AE s are bounded from below and d þ Hence, all the terms in stochastic integrals in (18) are bounded. By Dynkin's formula Dynkin (1965) , we get Now, by the dominated convergence theorem Klebaner (2005), it can be seen that which holds for all the admissible controls ðd AE s Þ t s T . Using the fact that W solves that the HJB Eq. (6) and similar arguments in Cartea and Jaimungal (2015) Hence, this proves that W ðt; x; S; m; qÞ is the value function of the optimization problem (5) and the d AEÃ t given by (13) are the admissible optimal controls.

Case 2: Exponential utility function
The case of exponential utility function have been investigated earlier by Avellaneda and Stoikov(2008), Guéant et al. (2013), and Fodra and Labadie (2012) for several types of midprice dynamics. In this section, we illustrate the results for the midprice model given by (1). Assume that the utility function is exponential having a degree of risk aversion for the investor with the following related value function: where gðq T Þ ¼ Àaq 2 T . In this case, we assume that w ¼ 0. Now, we display out the corresponding HJB equation of the value function (19).

Proposition 3 The value function (19) satisfies the following HJB equation,
with the final condition, W ðT ; x; S; m; qÞ ¼ Àe ÀcðxþqðSÀaqÞÞ : Proof The proof is similar to the proof of Proposition 1.

Solution of the HJB equation
For the case of exponential utility function, now we explore the results of optimal controls obtained by solving the HJB Eq. (20).
Substituting the optimal spreads into (24) yields the verification equation, for q 2 ½q; q with final condition uðT ; m; qÞ ¼ 0. Then, the following theorem holds true.
Proof The proof can be carried out using the similar techniques as in Theorem 1.

Effect of the Jumps in Volatility in a LOB model
Now, as another extension of a stock price impact on optimal market making problem, we work on the problem that the stochastic volatility of the asset is affected by the arrival of market orders and perform this case on the optimal trading prices. The models in literature assume that the stock price is followed by mostly Brownian motion with constant volatility, and in the cases of stochastic volatility, they consider only a diffusive volatility. Picking up the volatility as diffusive is highly permanent but this dynamics can allow the increments to increase only by a sequence of normally distributions. On the other hand, models with jumps in volatility are more persistent as the jumps fill in the gap between the stock prices and diffusive volatility supplying quick moves to increase the volatility and experiments show that diffusive volatility without jumps causes misdefined effects on prices Eraker et al. (2003). Therefore, we consider that the volatility of the asset is stochastic and impacted by the orders including the jump processes: with the same assumptions and quadratic utility function as in Case 1 in Sect. 3. Therefore, the corresponding HJB equation can be obtained by applying the stochastic control approach.
Proposition 5 The value function (5) satisfies the HJB equation, with the final condition, W ðT ; x; S; m; qÞ ¼ x þ qðS À aqÞ: Proof The proof is similar to the proof of Proposition 1.

Numerical Results
In this section, we provide the numerical results regarding on the solution of the market making problem and explore the behavior of the optimal controls d þÃ and d ÀÃ for various cases. We conduct the implementations of the models for a highfrequency trading and thus we consider the maturity time T as 10 s. The parameters that we use in the following analyzes are given in Table 1. Hence, the simulations in this part are executed using the parameters in Table 1 and solving the verification Eqs. (14), (25) and (30) for q 2 ½q; q with final condition uðT ; m; qÞ ¼ 0.

Results with the quadratic utility function
This part intends to show the numerical experiments and the behaviour of the market maker under the results given in Sect. 3.1. Figure 1 displays the solution of the value function uðt; m; qÞ for a fixed inventory level q and a representation of the asset volatility which are obtained from one simulation. Figure 2 illustrates the optimal prices for q ¼ À4, q ¼ 0 and q ¼ 4 where each of them are obtained from one simulation and it shows that how the optimal prices calculated by the spread formulas in (13) change by our model. It is observed that the optimal spreads have different asymmetries for different level of the inventories. For example, the strategy is followed as that the trader buys an asset with lower spread and closer price to the midprice while she sells the asset putting higher sell spread and farther price when q ¼ À4. Here, S denotes the midprice of the stock which is obtained by the process (1) while "bid and ask" denote the optimal bid and ask prices which are obtained by S À d À and S þ d þ . Figure 3 depicts one simulation of the profit and loss function of the market maker at any time t during the trading session in the left panel. The profit and loss performance of the trading is displayed by the cash level histogram in the left panel. It is observed from Fig. 3 that the strategy is profitable even when there are adverse selection effects in the model due to the expectations of the jumps.
In Fig. 4, some simulated paths of the inventory process and the average of these simulations can be seen for q 2 ½À5; 5 and q 2 ½À10; 10 while the other parameters are fixed as in Table 1. In the left figures, randomly chosen 10 paths of the inventory process are observed. The right figures illustrate all simulated paths with the average of these simulations. It is observed that the inventory processes change for each trade and the summarized pattern tends to revert to zero as the time approaches to the end of the trade. The figure clearly shows that the trade ends at some time between t ¼ 2 and t ¼ 3 when q 2 ½À5; 5. We observe this result because the trader's allowed inventory bound is restricted on a small range, so the inventories may not revert to zero at the end of the trade and she may have to pay the liquidation cost for the remaining inventories. Therefore, we provide the plots for q 2 ½À10; 10 in order to see the time evolution of the process for larger inventory bounds. In Fig. 5, we can see the optimal spreads d þ and d À for the trader depending on the each inventory levels with a given liquidation parameter a ¼ 0:01. This is a small inventory-risk aversion value but is enough to force the inventory process to revert to zero at the end of the trading.
On the negative inventory levels, d þ values are larger when t\T since she is unable to sell when the inventory approaches to the minimum admitted level q, so that the trader may want to sell her assets only if she receives a large premium for selling on these levels. As t approaches to T, it is observed that the optimal sell spreads decrease since she wants to get rid off her assets rather than paying for the liquidation cost at the end of the trading. On the positive inventory levels, the qualitative behavior of the trader is just the opposite of the idea for the negative inventory levels. In this case, the trader wants to reduce the number of shares in her hand. Because if she still has the assets when the time approaches to the maturity time of the trade, then either she will have to sell them with lower price or pay for the liquidation cost at the end. The probability of selling the assets at maturity time is higher than that for the time far away from T. Therefore, the trader increases the selling spreads on the positive inventory levels as the time is almost close to T. Similar interpretation can be adapted for the optimal buy spread d À (see Fig. 5b). Figure 6 depicts the trading intensities k AE e Àj AE d AE t for each of the inventory level. It is observed that the thickness of the market prices is correlated with the trading intensity inversely. As a larger trading intensity decreases the market impact in execution which leads a decrease in price movements; it causes a lower price that is presented in Fig. 6. Figure 7 presents the d þ and d À results when the arrival of market orders is asymmetric. The intensities k AE of the jump processes in asset price give us the information about the number of market order arrivals. For k þ ¼ 2 and k À ¼ 1 while the other parameters are fixed to those in Table 1, we see that there are more buy market orders arriving, thus the optimal filled sell spreads are larger for all inventory levels comparing to the case when the arrival of market orders is symmetric. For all simulations, it is observed in Table 2 that, when we compare our strategy with a benchmark strategy that is symmetric around the midprice independently of inventory as done in Avellaneda and Stoikov (2008), profit of the strategy is less than that of the symmetric strategy where the average spreads are calculated by d þ þd À 2 with the optimal spreads d AE obtained by (13). On the other hand, the results show that our strategy has a lower standard deviation. It can be also seen that the inventory of the trader reverts to zero more quickly than the symmetric strategy and the standard deviation of the inventory is produced less in the strategy.
Note that when we have e þ ¼ e À ¼ 0 in the model, then it reduces to the Heston stochastic volatility model without jumps: We thereby observe that the optimal spread values are higher in the model with jumps (1) than those of the model without jumps (31); hence the adverse selection effect on a model with stochastic volatility is more profitable. The average spread is 1.0403 by the model (1) while it is 1.0322 by the model without jumps. In Table 3, it is obviously seen that the model with jumps produces larger sell spreads rather than the model without jumps.
Optimal spreads d þ and d À

Comparative statistics
In this section, we investigate the comparative statistics results of the model that we introduce in the previous section. Table 4 shows some significant statistical properties of the strategy in terms of its terminal wealth. The Sharpe ratio which is the return per unit risk, i.e., mean over the standard deviation, is found to be 1.0156 for the profit and loss of the trader expressing that we have an attractive trading performance. We also reveal the skewness and kurtosis parameters to discover the degree of the normality violation of the distribution. The skewness characterizes the lack of symmetry that gets the importance because of the fact that the statistical theory generally uses the normal distribution assumption. Meanwhile, the kurtosis refers to the sharpness and height of (a) δ + (b) δ − Fig. 6 Trading intensities for d þ and d À (a) δ + (b) δ − Fig. 7 Optimal spreads d þ and d À for k þ ¼ 2 and k À ¼ 1 the central peak of the distribution. By the skewness and kurtosis values given in the table, we refer that the profit and loss function for this trading session has a normal distribution since they lie in the acceptable range for normality. Figure 9 depicts the histogram of the inventory. Accordingly, we may conclude that the inventory has the normal distribution.
By the statistics of the spread d þ þ d À , as we observe in Table 5 obtained from all simulations, it can be deduced that the Sharpe ratio attracts the trader as it is very high since the standard deviation is very low while it has a good expected return. Fig. 8 Optimal spreads d þ and d À for þ ¼ 0:008 and À ¼ 0:004   194442 0.190347 Moreover, the spread can also be considered to be normally distributed due to its skewness and kurtosis values.

Sensitivity to parameters
As we have discussed the behaviors of the optimal spreads and some statistical properties of wealth and inventory processes of the trading in previous part of this section, now we carry out the dependency and sensitivity of the parameters to the solution of the optimization problem and explore the results in this part.
5.1.2.1 Effects of a Now, we work on the dependency of the optimal spreads with respect to the liquidation cost a. Numerically, we observe that the optimal spreads behave in different sense when t approaches to the final trading time with an increasing values of a. Since this parameter refers to the liquidation cost for the remaining inventories, the trader changes her behaviour at the end of the trade session when a increases. We carry out the simulations with a 2 f0; 0:001; 0:01g while the other parameters are kept the same as in the Table 1.
We investigate the effect of a on the optimal spreads by choosing three specific trading time; those are when t ¼ 0, t ¼ 5, and t ¼ 10, since the behaviour of the trader changes with the trade time in terms of the liquidation cost. In this analysis, we explore the results for all inventory levels and m 0 .
At time t ¼ 0, our results show that the change of the optimal spreads does not follow a monotonic way. On the other hand, at time t ¼ 5 and t ¼ 10, we observe the following behaviour of the optimal spreads: This result makes sense since the trader should also cover the liquidation cost while selling her assets when q\0, for example. On the other hand, the optimal sell spreads get to decrease when q [ 0 since it is optimal to post lower ask prices in order not to have any remaining inventories and pay for the liquidation cost. Therefore, we notice that as time passes and approaches to the final time, the trader behaves monotonically for an increased value of a on the positive and negative inventory levels.
for all q. We implement our numerical simulations with changing drift constant l in the set of values fÀ0:01; 0:01; 0:02g as the other parameters in Table 1 remain the same.
In Table 6, we observe that the optimal prices increase when the drift parameter l increases as the trader expects the price to move up, she sends the orders at higher prices to get profit from the price increase which meets with our expectation.

Effects of w
Turning to the constant w to penalize the variations, it can be seen that the optimal quotes increase when the risk of penalizing volatilities. Eventually, since the trader wants to cover her cost for the variations during the trading, the increase of optimal prices make sense to cover these costs by these amounts. Hence, the following behavior on optimal spreads is expected: As we execute our calculations with changing w parameter as w 2 f0; 0:01; 0:02g while keeping the other parameters same as in the Table 1, our above expectation matches with the solutions obtained and be seen Table 7.
5.1.2.4 Effects of k This is the mean reversion adjustment rate on the volatility of the model. A large value of k means that the volatility will revert to the average mean faster which increases the optimal spreads for q [ 0 and reduces them for q\0.
In our numerical observations, we take k 2 f1; 2; 3g while we do not change the rest of the parameters in Table 1 and we observe our expectations in solutions which can be tracked by Table 8, in coherence with (35).
In the model, since k is just in multiplication with long-term variance parameter h, the impact of h on the optimal quotes will have just the opposite effect of when k is employed.
5.1.2.5 Effects of r Concerning r, the dependence of optimal spreads is very obvious because a large variance causes an uncertainty and price risk. To reduce this risk and for the higher cost of the variations, the trader increases the prices of the orders. The following result is expected when dependency of r is considered: In our numerical simulations, we take r as r 2 f0:1; 0:3; 0:5g while keeping the other parameters same as in the Table 1 and we see that our expectation on changing r values is met as shown in Table 9.

Approaching terminal time strategy
It is worth mentioning that the trader changes her qualitative behavior depending on the liquidation and penalizing variations of the constants and her positions on inventories as the time approaches to maturity.  194442 0.192607 0.191778 For the parameters a ¼ 0, w 2 f0; 0:1g when AE ¼ ; j AE ¼ j and keeping the rest of the parameters same, we observe the following behavior for the optimal spreads: Figure 10 represents the behavior of the trader for a ¼ 0; w ¼ 0 when the strategy approaches to terminal time. In this case, since there is no penalizing parameters, it is easy to understand that the spreads converge to a specific value when t ! T .
Remark 3 Note that when a ¼ 0, all the optimal spreads converge to the value of 1 j AE þ AE as uðt; m; qÞ À uðt; m; q AE 1Þ tends to zero. Now, we test the effect of the existing liquidation penalty parameter with the penalty of the variations on the optimal spreads. For being a ¼ 0:1; w 2 f0; 0:1g when AE ¼ ; j AE ¼ j having same values of the other parameters, the following observation can be tested: Figure 11 highlights how the trader behaves when there is liquidation and variations penalty factor with of a ¼ 0:1 and w ¼ 0:1 while the strategy approaches to the terminal time. In this case, the trader should be more cautious since she may have to pay for the liquidating and running variations if she still has the assets at maturity time. Therefore, she increases the optimal sell spreads when q\0 to cover these costs; on the other hand, she reduces the spreads as she is not willing to pay the costs when she has enough assets at hand. It is noticed that the model is efficient as the trader can pay for the liquidation cost until to a ¼ 0:1 parameter value without any difficulty.

Results with the exponential utility function
In this part, the experiment is constructed to discuss the results for d þ ð0; m 0 ; qÞ depending of different risk aversion degrees c in the set of values f0:0001; 0:001; 0:01g with the same parameters given in Table 1. The parameter c shows the risk-averse degree of the investor. When c increases, the risk-averse degree of the investor increases. Consequently, she will sell the assets with a lower price on the positive inventory levels to reduce both the price risk and liquidation risk. On the other hand, she does not face with the liquidation risk on the negative inventory levels but wants to receive higher amount for selling the assets. Table 10 displays the results for the performance of the strategy with a liquidation parameter a ¼ 0:01. Thereby, we observe the following behavior of the investor: Fig. 11 Optimal spreads d þ and d À for a ¼ 0: By the numerical experiments, we can conclude that the above behavior of the optimal spreads with different values of c is observed in Table 10.

Results of the model with jumps in volatility
Numerical experiments for this case are carried out by linear interpolation and extrapolation in order to calculate the value functions uðt; m þ þ ; qÞ and uðt; m À À ; qÞ. In order to recall the models easier, we call the model studied in in Case 1 in Sect. 3 with stock price dynamics (1) as "Model 1" and the model with the dynamics (26) "Model 2". Figure 12 illustrates d þ ðt; m 0 ; 0Þ and d À ðt; m 0 ; 0Þ values for Model 1 and Model 2. It is observed that the Model 1 which has jumps in stocks has a slightly wider d þ values. We note that bid-ask spread for Model 1 is 1.0402 while it is 1.0328 for Model 2 given the other parameters in Table 1. Table 11 which is obtained from all simulations depicts the results of these two strategies. We can see that when the jumps occur in volatility, it causes not only larger profits but also larger standard deviation of the profit and loss function.

Comparison with existing models
In this section, we compare the existing optimal market making models based on the stock price impacts with the models that we introduce in the previous sections. Numerical experiments are carried out on two different types of utility functions, i.e., quadratic and exponential utility functions.
We give the results for the value function  Table 12 obtained from all simulations illustrates that the traders using the Model c have relatively higher return but also relatively a higher standard deviation comparing to other models. The performances of Sharpe ratios of each models indicates that the stock price models with stochastic volatility based on a quadratic utility function produces more attractive portfolios than the other models. It is demonstrated that the Model d has a Gaussian normal distribution while the others are positively skewed.
The next experiment is carried out for the value function using the exponential utility function and the results are provided for the following models.

Conclusion
In this paper, we investigated the high-frequency trading strategies for a market maker using a mean-reverting stochastic volatility models that involve the influence of both arrival and filled market orders of the underlying asset. First, we design a model with variable utilities where the effects of the jumps corresponding to the orders are introduced in returns of the asset and generate optimal bid and ask prices for trading. Then, we develop another, but novel, approach considering an underlying asset model with jumps in stochastic volatility. Such an extension allows one to fit the implied volatility smile better in practice.
In order to analyze the experimental results, we work on the models that we have derived using different metrics. It is salient to mention that the market maker modifies her qualitative behavior in various situations, i.e., changing inventory levels, utility functions. By our numerical results, we deduce that the jump effects and comparative statistics metrics provide us with the information for the traders to  (1) has a considerable Sharpe ratio and inventory management with a lower standard deviation comparing to the symmetric strategy. Besides, we further quantify the effects of a variety of parameters in models on the bid and ask spreads and observe that the trader follows different strategies on positive and negative inventory levels, separately. The strategy derived by the model (1), for instance, illustrates that when time is approaching to the terminal horizon, the optimal spreads converge to a fixed, constant value. Furthermore, in case of the jumps in volatility, it is observed that a higher profit can be obtained but with a larger standard deviation. Consequently, we support our findings by comparing the models proposed within this research with the stock price impact models existing in literature. Last but not least, we have substantially improved the performances of a market maker with the proposed models.

Appendix: Numerical Solution of the Optimal Stochastic Control Problem
In this section, we proceed with the numerical discretization of the time t and m to obtain a solution only for the nonlinear verification Eqs. (14), (15) and (16).
Due to the high nonlinearity of the verification equations, we apply a numerical method and write the fully-explicit finite difference discretization. To work with finite difference quotients, we discretize the domain of interest by dividing the corresponding intervals into M and N subintervals with constant step sizes respectively, such that t n ¼ nDt and m j ¼ m min þ jDm, where n ¼ 0; 1; . . .; M and j ¼ 0; 1; . . .; N . Let us denote the approximation value of uðt; m; qÞ as u n j;q for all grid points ðt n ; m j ; qÞ. Thus, we have u n j;q % uðnDt; jDm; qÞ. The terms in Eq. (14) Here, we choose an upwind scheme for the term kðh À mÞo m u, as we should adapt the finite difference stencil numerically to simulate in the direction of the flow of the information, depending on whether h [ m or h [ m. Inserting these terms into (17) provides us the discretized version of the equation: u n j;q ¼ u nþ1 j;q þ Dt lq À wmq 2 r 2 þ kðh À mÞ u nþ1 jþ1;q À u nþ1 j;q Dm 1 h [ m þ u nþ1 j;q À u nþ1 jÀ1;q Dm 1 h\m ! þ 1 2 r 2 m u nþ1 jþ1;q À 2u nþ1 j;q þ u nþ1 jÀ1;q ðDmÞ 2 þ k þ qe þ þ 1 j þ e À1Àj þ ðe þ það1À2qÞÀu nþ1 j;qÀ1 þu nþ1 j;q Þ ! þ k À Àqe À þ 1 j À e À1Àj À ðe À það1þ2qÞÀu nþ1 j;qþ1 þu nþ1 j;q Þ ! !
with the final condition uðT ; q; mÞ ¼ 0. We use Neumann boundary conditions as follows: u n N ;q ¼ 2u n N À1;q À u n N À2;q u n 0;q ¼ 2u n 1;q À u n 2;q : To summarize, we illustrate the solution in Algorithm 1, then use (13) to calculate d AEÃ t .
Funding Open Access funding enabled and organized by Projekt DEAL. The authors have not disclosed any funding.

Declarations
Conflict of interest The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/ licenses/by/4.0/.