 Research
 Open Access
 Published:
The Euler scheme for stochastic differential equations with discontinuous drift coefficient: a numerical study of the convergence rate
Advances in Difference Equations volume 2019, Article number: 429 (2019)
Abstract
The Euler scheme is one of the standard schemes to obtain numerical approximations of solutions of stochastic differential equations (SDEs). Its convergence properties are well known in the case of globally Lipschitz continuous coefficients. However, in many situations, relevant systems do not show a smooth behavior, which results in SDE models with discontinuous drift coefficient. In this work, we analyze the long time properties of the Euler scheme applied to SDEs with a piecewise constant drift and a constant diffusion coefficient and carry out intensive numerical tests for its convergence properties. We emphasize numerical convergence rates and analyze how they depend on the properties of the drift coefficient and the initial value. We also give theoretical interpretations of some of the arising phenomena. For application purposes, we study a rankbased stock market model describing the evolution of the capital distribution within the market and provide theoretical as well as numerical results on the long time ranking behavior.
Introduction
In recent years, many applications related to stochastic differential equations (SDEs) with discontinuous drift coefficient have emerged. These types of equations typically arise in mathematical finance and insurance [2, 9, 15, 16], engineering applications [22, 36], economy [26, 38], or stochastic control problems [3, 21, 38, 41].
The existence and uniqueness of solutions of SDEs in the standard case, i.e., the case of sufficiently smooth coefficients, are well understood [17], and the corresponding numerical analysis is well developed (see, e.g., [19]) providing a variety of different numerical approximation schemes. A recent numerical comparison of two of them, the Euler scheme and the Milstein scheme, in the case of nonlinear drift and diffusion coefficients can be found in [5].
However, the standard theory on SDEs does not apply anymore in case of a discontinuous drift coefficient, e.g., a piecewise constant drift coefficient, and a special theory is needed to address the question of existence and uniqueness of solutions of such SDEs [18, 42, 44]. The same is true for the numerical analysis: The convergence behavior of approximation schemes needs to be reconsidered and “research on numerical methods for SDEs with irregular coefficients is highly active” [25, p. 2]. In the case of a sufficiently smooth drift and a constant diffusion coefficient, the exact strong rate of convergence is 1 for the Euler scheme, see [6, 19]. At the time when the main part of the research presented here was undertaken, no comparable result was known in the case of a discontinuous, e.g., piecewise constant, drift coefficient. After many discussions and investigations, also inspired by a previous version of this manuscript, refined results are now about to be established, see Sect. 2.1.
In this work, we focus on numerical approximations of SDEs in the presence of a piecewise constant drift and a constant diffusion coefficient. We provide theoretical considerations on the long time behavior of approximated SDE solutions based on the results from the theory of ergodic Markov chains. Moreover, we provide further insight into the numerical behavior of approximation schemes, in particular the Euler scheme, by analyzing the numerical convergence rates based on a reference solution. The numerical speed of convergence heavily depends on the initial value and properties of the drift coefficient, e.g., drift direction or jump height. Our tests reveal that for a special class of drift coefficients the numerical convergence rates are higher and independent of initial conditions due to the ergodicity of the Euler scheme and the underlying SDE. In addition to focusing on the numerical convergence rates, we also use the Euler scheme to verify qualitative properties such as the long time behavior of a rankbased stock market model [4], a prominent model in finance to describe the evolution of the capital distribution within the market.
The remainder of this manuscript is as follows: In Sect. 2, we introduce some theoretical and numerical basics and establish the ergodicity of the Euler approximations in the case of an appropriate, piecewise constant drift coefficient. In Sect. 3, we discuss numerical convergence properties and further findings of several numerical tests. We conclude this work in Sect. 4 with the application from mathematical finance mentioned above, where SDEs with a discontinuity in the drift coefficient naturally arise.
Problem description
In this section, we introduce our basic setting, i.e., the type of SDE we are interested in and some basic terms for the numerical tests. Besides the Euler scheme and its long time properties in our setting, we also briefly discuss the applicability and performance of some other numerical schemes.
The equation
In this manuscript, we consider timehomogeneous SDEs with piecewise constant drift coefficient and additive noise:
Here, we have \(s \in \mathbb {N}\), \(\alpha _{j}, \sigma , \xi \in \mathbb {R}\) and disjoint (possibly infinitely many) intervals \(B_{j} \subset \mathbb{R}\) for all \(1 \leq j \leq s\), and \(( W_{t} ) _{t \in [0,T]}\) is a onedimensional Brownian motion.
The existence and uniqueness of solutions to this type of SDEs are guaranteed by results of [42, 44] and [18]. In [42], the conditions on the drift and diffusion coefficient, under which the corresponding SDE has a unique strong solution, are derived. As emphasized therein, those conditions are in particular fulfilled for a bounded drift coefficient and a constant diffusion coefficient. Thus, the existence and uniqueness of a strong solution for SDEs of type (1) is ensured.
For the numerical analysis of SDEs with discontinuous drift and/or diffusion coefficient, the situation is more involved. In this manuscript, we focus on the strong convergence rate of the Euler scheme, which, for a general SDE
where f and g are such that a unique strong solution exists, is given by
The underlying time discretization of the time interval \([0,T]\) is \(0=t_{0}< t_{1}<\cdots <t_{n}=T\) with corresponding step size \(\Delta \mathrel {:=}\frac{T}{n}\), where \(n+1\) is the number of grid points.
While its behavior is well known for SDEs with Lipschitz continuous coefficients f and g, much less has been known in more general cases, even for SDEs with additive noise and a piecewise constant drift coefficient. The first contribution in this area is—up to the best of our knowledge—the work [12], where almost sure convergence of the Euler scheme has been established in the case of a onesided Lipschitz drift coefficient, a locally Lipschitz diffusion coefficient, and the existence of a Lyapunov function for the SDE. The results of [13] give strong convergence of the Euler scheme for SDEs with additive noise in the case of a discontinuous but monotone drift coefficient, while [40] establishes the almost sure and strong convergence of the Euler scheme for SDEs with additive noise and drift of the form \(f(x)= \operatorname{sign}(x)\). Recent contributions with respect to strong approximations of SDEs with discontinuous drift coefficient are a series of articles by Ngo and Taguchi [33,34,35] and Leobacher and Szölgyenyi [23,24,25], respectively. Very recently MüllerGronbach and Yaroslavtseva [29] established strong order \(1/2\) for (2) in the case of a scalar equation with piecewise Lipschitz drift and nonadditive noise, and Neuenkirch et al. obtained the same convergence order for an adaptive Euler scheme in the multidimensional case, see [31]. The weak approximation of SDEs with discontinuous coefficients has been studied in [20], where an Eulertype scheme based on an SDE with mollified drift coefficient is analyzed.
In the case of SDE (1), the latest result on the strong convergence rate of the Euler scheme
for the approximation of \(X_{T}\), i.e., the solution at time T, is an \(L^{2}\)convergence order \(3/4\varepsilon \) in [30] for arbitrarily small \(\varepsilon >0\).
For a better comparison, note that in the standard setting of an SDE with additive noise, where the drift coefficient is sufficiently smooth, the Euler scheme has an exact strong convergence order of 1, see, e.g., [6] and [19, p. 350f].
So to summarize: The Euler scheme for our nonstandard setting of SDE (1) has at least \(L^{2}\)convergence order \(3/4\varepsilon \). However, observing this convergence order numerically will be a different story (see Sect. 3). For our theoretical and numerical considerations, we restrict ourselves to the case of \(s=2\) in equation (1). This entails that we focus on one point of discontinuity in the drift coefficient to better work out the arising effects.
Error measurement
As already mentioned, we are interested in empirically measuring the strong convergence rate of the Euler scheme. The standard procedure for this is as follows: The root mean squared error (RMSE) at time T for Euler scheme (1) with step size \(\Delta =T/n\) is given by
Since an explicit form of \(X_{T}\) is unknown in general, one needs to replace \(X_{T}\) in our simulation studies by a numerical reference solution \(X_{T}^{\mathtt{num}}\), which is computed by the Euler scheme for an extremely small step size \(\Delta =T/N\) with a very large number of \(N+1\) grid points such that this approximation can be considered close enough to the true solution. Moreover, also the expectation \(\mathbb {E}\vert X_{T}^{\mathtt{num}}  x_{n}^{\exp\mathrm{E}}\vert ^{2}\) is not known explicitly, so we will approximate this expectation by the empirical RMSE
with a large number M of Monte Carlo repetitions, i.e., \(( X_{T} ^{\mathtt{num}}  x_{n}^{\exp\mathrm{E}})^{(i)}\), \(i=1, \ldots , M\), are iid copies of \(X_{T}^{\mathtt{num}}  x_{n}^{\exp\mathrm{E}}\). Here, \(X_{T}^{\mathtt{num}}\) and \(x_{n}^{\exp\mathrm{E}}\) have the same random input. Note that N has to be chosen sufficiently large to generate the numerical reference solution and to avoid oscillations in \(e_{ \mathtt{emp}}(n)\), which might occur if N and n are close. If this is the case, solutions might either be almost identical (differences close to machine accuracy) or obey a difference as high as the full jump height (not captured drift changes). Those different scales might lead to oscillations in the error measurement. The number of repetitions M should also be large enough to have a good approximation of the expectation, i.e., a small Monte Carlo error.
An alternative error measurement that is often used is based on error increments and reads as follows:
In Sect. 3, the numerical investigations are primarily based on error measure (5) and are supplemented by results obtained for error measure (6).
Other schemes
A natural idea is of course to consider other schemes than the explicit Euler scheme and to compare them in our simulation studies.
The implicit Euler scheme
Implicit schemes have good stability properties, thus they are a natural choice to consider. For an SDE with additive noise, where the drift coefficient is sufficiently smooth, the implicit Euler scheme has strong convergence order 1 (see, e.g., [1] and [32]).
However, for SDEs of type (1) already the implicit Euler scheme is not well defined. To see this, consider the SDE
with \(\alpha _{1} >0 > \alpha _{2}\). The implicit Euler scheme
requires to solve, for fixed but arbitrary \(z \in \mathbb{R}\), the equation
with respect to \(y \in \mathbb{R}\). This equation does not possess a solution if \(z \in (\alpha _{1} \Delta , \alpha _{2} \Delta )\), and hence an implicit Euler scheme is not well defined in this setting.
The Heun scheme
The Heun scheme is another scheme with strong order one for SDEs with additive noise under appropriate smoothness conditions on the drift coefficient. Adapted from [19, p. 373] for SDEs of type (1), it is defined by
For a closer look at the behavior of this scheme at a discontinuity, assume that the drift coefficient is given by \(a(x)=\pm \operatorname{sign}(x)\). An increment of the Heun scheme with \(x_{k}^{\mathrm{Heun}}=x\) is then given by
So, if no drift change occurs in the Euler step \(x + a(x)\Delta + \sigma ( W_{(k+1)\Delta }  W_{k \Delta })\), a Heun step and an Euler step coincide. However, if a drift change occurs in the Euler step, the Heun step reads as
i.e., it approximates the drift coefficient by zero and its dynamics are purely diffusionbased in this case.
A Wagner–Platen type scheme
A strong order 1.5scheme for SDEs with smooth drift coefficient and additive noise is given by a Wagner–Platen type scheme (see, e.g., [19, p. 383]), which reads in our setting as follows:
with
Now, we look again at the case of a drift coefficient given by \(a(x)=\pm \operatorname{sign}(x)\) and step size \(\Delta < \sigma ^{2}\). For a Wagner–Platen step with \(x_{k}^{\mathrm{Pla}}=x\), it depends now on whether
have the same sign or not. If this condition is fulfilled, i.e., if x is sufficiently far away from the discontinuity, then a Wagner–Platen step and an Euler step coincide. If the latter condition is not satisfied, then we have the dynamics
So, also here, the diffusive dynamic dominates the scheme when taking values close to the discontinuity.
Ergodicity and stability of the Euler scheme
We will now address the long time properties of the Euler scheme based on the results from the theory of ergodic Markov chains. Within the SDEs of type (1) with \(s=2\), we distinguish the equations with respect to the direction in which the drift coefficient is pointing.
Definition 1
We will call a drift coefficient \(a: \mathbb{R} \rightarrow \mathbb{R}\) inward pointing if there exists \(x^{*} \in \mathbb{R}\) such that
and outward pointing if there exists \(x^{*} \in \mathbb{R}\) such that
In this subsection, we consider the special case of
and assume that
i.e., an inward pointing drift coefficient towards the discontinuity zero. Clearly, we have
i.e., on average, the solution is moving inwards. Moreover, following, e.g., Chap. 6 in [10], this SDE admits a unique invariant distribution with Lebesgue density
where the normalizing constant \(c>0\) is such that \(\int _{\infty } ^{\infty } \varphi _{\infty }(x) \,dx =1\). In particular, we have that
and the law of large numbers
holds, if \(h: \mathbb{R} \rightarrow \mathbb{R}\) is measurable and satisfies \(\int _{\infty }^{\infty } h(x) \varphi _{\infty }(x) \,dx < \infty \).
It will turn out that the explicit Euler scheme
with
will recover these properties. (Here we also indicate the dependence on the initial value ξ in our notation.) Euler scheme (10) corresponds to a time homogenous Markov chain with transition kernel
and satisfies the discrete counterpart to (7), i.e.,
Now, we will prove the existence of a unique stationary distribution for the Euler scheme. In particular, due to the discontinuity at zero, the following Proposition 2 is not covered by the standard references as, e.g., [27] and [37] for Eulertype discretizations of ergodic SDEs. Note that the long time properties of (10) have also been heuristically studied in [39]. Here, using the theory of Markov chains, we obtain the following geometric ergodicity result for the Euler scheme.
Proposition 2
Let \(\alpha _{1}>0>\alpha _{2}\) and \(\Delta >0\) be fixed. Then Euler scheme (10) admits a unique stationary distribution \(\mu _{\Delta }\), which is independent of the initial value ξ. Moreover, there exist \(\beta _{\Delta } \in (0,1)\) and constants \(\mathcal {M}_{\Delta }(\xi ), \xi \in \mathbb{R}\), such that
Proof
We start by verifying that \(V(x)=e^{ \tau x}\), \(x \in \mathbb{R}\), is an appropriate Lyapunov function for the above Markov chain if \(\tau >0\) is sufficiently small. This is a direct consequence of the wellknown form of the moment generating function for the folded normal distribution, i.e.,
where Φ is the distribution function of the standard normal distribution and \(\mu \in \mathbb{R}\), \(\nu >0\). Using (12) with \(\mu =x+a(x)\Delta \) and \(\nu ^{2}=\Delta \), we obtain
So, we have
and choosing \(\tau < 2\min \{ \alpha _{1}, \alpha _{2} \}\) gives the desired Lyapunov property
with \(C>0\), \(\gamma \in (0,1)\). Since the transition kernel is Gaussian, an application of the quantitative Harris theorem (see, e.g., Chap. 15 in [28], or Theorem 3.15 (and the following example) in [7]) yields the geometric ergodicity result. □
Choosing \(A=(\infty ,y]\), we obtain in particular the counterpart to (8), i.e.,
Clearly, the limit distribution is independent of the initial value, as for the underlying SDE.
Moreover, an ergodic theorem as, e.g., Corollary 2.5 in [7] yields also the discrete counterpart to the law of large numbers (9): We have
for all measurable \(h: \mathbb{R} \rightarrow \mathbb{R}\) such that \(\int _{\infty }^{\infty } h(x) \mu _{\Delta }(dx) < \infty \).
Finally, note that SDEs with outward pointing drift coefficients do not admit a stationary solution. For the SDE
with \(\alpha _{1} < 0 < \alpha _{2}\), straightforward calculations using Itō’s lemma yield
and so \(\lim_{t \rightarrow \infty } \mathbb{E}X_{t}^{2} = \infty \), which excludes the existence of a stationary solution.
Simulation studies
This section is concerned with the numerical investigation of onedimensional SDEs of type (1) with \(s=2\). A threedimensional version of SDE (1) will be numerically analyzed in Sect. 4 in the context of a financial market model. For the remainder of this section, we will choose \(T=1\), \(M=10^{5}\), \(N=2^{14}\), and \(n=2^{\tilde{n}}\) with \(\tilde{n} \in \{4,\ldots ,10\}\) (unless otherwise mentioned). We then calculate the corresponding Euler approximation and the empirical RMSE \(e_{\mathtt{emp}}(n)\). For simplicity, we omit the upper index of the numerical approximation indicating that the approximation is based on the Euler scheme. The empirical convergence rate is given by the negative slope of the regression line, which we obtain when plotting \(\tilde{n}=\log _{2}(n)\) versus \(\log _{2} (e_{\mathtt{emp}}(n) )\). Exemplary, we relate the results obtained using the Euler scheme to those for the Heun scheme and the Wagner–Platentype scheme from Sect. 2.3. In our simulation studies, we focus on the two types of drift coefficients introduced in Definition 1: inward and outward pointing drift coefficients.
Our numerical investigations are based on several additional key characteristics: We consider the average number of drift changes. As the Euler scheme for SDE (1) is exact up to the first drift change, another quantity of interest is the number of paths with at least one drift change. To get further insight whether some paths are really far away from the true solution, we measure the largest error that occurs within the considered time interval (not necessarily in the end). Besides the error sizes themselves, it is interesting to see what proportion of errors at final time T is large, medium, or small and how this distribution of error sizes depends on the step size. Furthermore, we analyze the evolution of the error over time for a fixed step size. To underline the influence of the drift direction towards or away from the discontinuity, we generate plots of several solution sample paths. We will see that the observed empirical^{Footnote 1} rates of convergence heavily depend on whether the drift coefficient is inward or outward pointing. Whereas for the latter one, there is a dependency on the initial value of the SDE, rates in case of an inward pointing drift coefficient seem to be independent of the initial value, corresponding to Proposition 2. In addition, we analyze how the jump height (difference in drift values) influences the empirical convergence rate.
As representatives of the class of SDEs (1), we consider here the SDEs given in Table 1.
In the remainder of this chapter, we present and discuss some key results of the simulation studies.
Key results
The empirical convergence rates obtained by the Euler scheme for the above stated step sizes \(\Delta =T/n\) with \(n=2^{\tilde{n}}\), \(\tilde{n} \in \{4,\ldots ,10\}\) are given in Table 2 (outward pointing drift coefficients highlighted in light gray, the discontinuity in gray).
Our results show that

(i)
in general, we loose convergence order one, which the Euler scheme has under standard assumptions for SDEs with additive noise,

(ii)
and that a crucial factor is whether the drift coefficient is inward or outward pointing: for inward pointing coefficients the guaranteed convergence order \(3/4\) is recovered, which is not always the case for outward pointing coefficients.

(iii)
Moreover, empirical convergence rates are less stable with respect to the initial value for outward pointing drift coefficients. The largest difference amounts to 0.86 for elementary_minus34.
To address the latter aspect, we supplement the numerical results for the drift coefficient elementary_minus34 by results obtained using the alternative error measure \(e^{\mathrm{inc}}(n)\), introduced in Sect. 2.2. In Table 3, we clearly observe that the estimate of the rate based on error increments \(e^{ \mathrm{inc}}(n)\) is more stable. However, the estimate is still far away from the theoretically guaranteed convergence rate of \(\frac{3}{4}  \varepsilon \) for arbitrarily small \(\varepsilon >0\) for an equidistant time grid (see page 3).
Furthermore, our numerical tests show that neither using the Heun scheme nor using the Platen scheme yields a different picture. In particular, convergence rates do not improve significantly, and the schemes do not yield a better resolution of the discontinuity (see Tables 4 and 5).
Drift direction and initial value
For an outward pointing drift coefficient, the numerical convergence order even seems to depend on the initial value and the spectrum of orders obtained for different initial values is very broad with values between 0.25 and 1.17 (see Table 2).
On the other hand, for an inward pointing drift coefficient, the convergence order seems to be independent of the initial value and the spectrum of orders numerically obtained for different initial values and inward pointing drift coefficients is tight with values between 0.80 and 0.91 (see Table 2). The stability of the estimates is due to the ergodicity of the SDE and the Euler scheme in this case, see Sect. 2.4. The geometric convergence speed in Proposition 2 explains why the numerical tests for inward pointing drift coefficients yield such stable estimates, independently of the initial value: \(X_{T}^{ \mathtt{num}}\) and \(x_{n}\) are, for a sufficiently large number of grid points \(n+1\), close to their unique stationary distributions, which stabilizes the Monte Carlo estimates. Also, as pointed out already above, the guaranteed convergence order \(3/4\) is recovered here.
For the above equations, the structure of the drift coefficient is directly related to the number of drift changes. An inward pointing drift coefficient results in many drift changes, while in the case of an outward pointing drift coefficient, only few drift changes occur. We can further observe that:

(i)
when starting away from the discontinuity, numerical rates for outward pointing drift coefficients are better than for inward ones;

(ii)
when starting close to the discontinuity, outward pointing drift coefficients imply worse numerical convergence rates than inward ones.
So in the latter case we obtain a positive correlation between the number of drift changes and the numerical convergence rate, which implies that frequent drift changes are not necessarily bad for the quality of the approximation—quite the contrary seems to apply, which is surprising at first glance.
Hence, the type of monotonicity of the drift coefficient is of great importance. Intuitively, an inward pointing drift coefficient should lead to many drift changes, which suggests that individual drift changes are not of great importance. An outward pointing drift coefficient on the other hand pushes the solution away from the discontinuity implying a low number of drift changes. Those rare drift changes entail the risk that an approximated path that missed a drift change in the true solution evolves in the wrong direction leading to large errors. The occurrence of drift changes and the implication for the approximated solution will be further elucidated in Sect. 3.4.
Jump height
The intensity of the effects related to inward and outward pointing drift coefficients depends on the jump height, i.e., the distance between assigned drift values. In case of elementary_minus34, this distance amounts to 7, whereas it is 1.6 in case of elementary_minus0.6_1. The empirical convergence rates in Table 2 show the following: The higher the jump height, the more pronounced are the effects described in Sect. 3.2. Exemplary, there is a difference of 0.8 in the empirical convergence rates for elementary_minus34 for initial values 0 and 1, whereas this difference is only 0.06 for elementary_minus0.6_1. This phenomenon is related to a scaling property. By enlarging the drift value, the influence of the diffusive part of the SDE is weakened. Consider, e.g., the SDE
with \(\alpha \geq 1\). Using the new variable \(Y_{t}= \frac{1}{\alpha } X_{t}\), we have the dynamics
with a reduced diffusion coefficient. So, for α large and initial values far away from the discontinuity, the dynamics of the Euler scheme is almost purely deterministic, which leads to the observed higher empirical convergence rates.
Case study of an inward versus outward pointing drift coefficient
In this subsection, we analyze the pattern described in 3.2 in more detail, exemplary for the drift coefficients elementary4minus3 and elementary_minus34.
Drift changes
Figure 1 shows the average number of drift changes for both coefficients. The behavior goes along with the intuitive understanding described above. Here, ñ is the exponent of the dyadic step size \(\Delta =2^{ \tilde{n}}\). Note that for step sizes 2^{−4} to 2^{−8} and elementary_minus34 the number of drift changes stays below 2.
Comparison of solution sample paths
Figure 2 shows 100 sample paths of the numerical reference solution (\(\Delta =2^{14}\)). The black line represents the discontinuity in the drift coefficient.
In the situation of Fig. 2(b), where the solution drifts away from the discontinuity, it is of tremendous importance whether a drift change is captured by the approximation or not: the solution does not stay close to the discontinuity, and thus, there are not many chances for a drift correction to take place, see Fig. 3. For the SDE,
with \(\alpha _{1}<0<\alpha _{2}\) and \(\xi >0\) the conditional probability \(p(\xi ,\theta ,\Delta )\) that the exact solution changes its drift over \([0,\Delta ]\) given that the approximation \(x_{1}\) at \(t=\Delta \) has value \(\theta \geq 0\) (and thus has not changed its drift) satisfies
see, e.g., [11, p. 169]. So the (conditional) probability of missing drift changes is not negligible and even close to one for small ξ or θ. Due to the very small probability (16) of a drift change for outward pointing drift coefficients, the empirical convergence rate might be subject to rare event simulation effects. The topic of rare events and their implications for the empirical convergence rate will be further addressed in Sect. 3.5.
Largest error
The latter observation is also reflected in the largest distance for 10^{4} sample paths between the approximation based on step size 2^{−10} and the numerical reference solution, see Table 6. The largest distances amount to 1.271 for elementary4minus3 and 4.508 for elementary_minus34.
Evolution of the error over time
To gain even more insight, we compare the empirical RMSE for increasing time t of elementary4minus3 and elementary_minus34 when starting in the discontinuity \(\xi =1.4\) for step sizes 2^{−4}, 2^{−8}, and 2^{−10} by plotting the base2 logarithm of the RMSE against the time (see Fig. 4). We have added in these figures the following additional information: If the number is not zero, the most frequent times of drift changes corresponding to the chosen step size are indicated. The number of plotted drift change times is based on the average number of drift changes over the simulated sample paths.
Furthermore, if in the corresponding cases drift changes occur, we add the very first drift change (of all simulated paths) of the numerical reference solution and the Euler schemes. They are generated by finding the time at which the first drift change occurs for 10^{4} saved paths and then taking the minimum over all that times. The time is registered as the point of discretization at which a drift change that took place was detected. The very first drift change of the reference solution is marked at a height of zero for a better distinguishability. RMSE over time and drift change times are calculated on a basis of 10^{4} simulation paths.
We can extract from Fig. 4 at least two features:

(i)
The error stays constant or even decreases over time for elementary4minus3 in contrast to a strong error accumulation over time for elementary_minus34. (Note that the ordinate has a base2 log scale.)

(ii)
In the inward pointing drift coefficient case, the error is by several magnitudes smaller than for an outward pointing drift coefficient.
This illustrates again the stabilizing effect of an inward pointing drift coefficient and the importance of capturing the first drift changes correctly in case of an outward pointing drift coefficient.
Distribution of error sizes
Besides the empirical RMSE itself, the empirical distribution of the errors in \(t=T\) is of interest. The error at final time T is quantified by \(\vert x_{N}  x_{n} \vert \) for step size \(\Delta =T/n=2^{\tilde{n}}\). The histograms in Fig. 5 are based on \(M=10^{4}\) simulations for different step sizes and highlight again the different magnitudes of the empirical RMSE (abscissa with a base2 logarithm scale). Another feature, which we can extract from the histograms, is a nonnegligible part of simulated paths with an error of machine accuracy size for elementary_minus34. We will discuss this feature in more detail in the next subsection.
Rare events and goodness of the regression fit
In case of an outward pointing drift coefficient the empirical RMSE and the linear regression estimates become unreliable or at least questionable.
For initial values close to the discontinuity, the observed empirical convergence order are in some cases far away from the guaranteed \(3/4\), although the linear regression typically produces stable results, see Fig. 6(b). A possible explanation for this is again the first drift changes. When starting close to the initial value, the first drift changes seem to be very sensitive to the step size, which results in rather different trajectories of the Euler scheme.
Furthermore, if the initial value is far away from the discontinuity, only very few drift changes occur in the underlying SDE (if at all). Hence, if the step size of the Euler scheme is sufficiently small, these changes are captured and the error drops drastically. Figure 6 illustrates this by comparing the regressions for an initial value \(\xi =0\) away from the discontinuity in 1.4 and an initial value \(\xi =1\), which is closer to the discontinuity. (In Fig. 6(a), the regression also has to deal with two different regimes.) Note that, for (1), the Euler scheme is always exact up to the time of the first drift change.
Moreover, for an outward pointing drift coefficient, the Euler scheme and the exact solution coincide with high probability, which explains, e.g., the errors close to machine accuracy for the drift coefficient sign and the initial value \(\xi =5\). Note that in this setting the number of paths with at least one drift change is even zero over all saved 10^{4} solution paths.
To explain this phenomenon, consider again the SDE
with \(\alpha _{1}<0<\alpha _{2}\). An application of formula (5.13) in Chap. 3.5.C in [17] gives
Note that an initial value \(\xi \neq 0\) is not a restriction as we analyze the case of an initial value far away from the discontinuity. So, for drift values \(\alpha _{1}=\alpha _{2}=1\), and an initial value \(\xi =5\), the Euler scheme is exact with a probability of at least \(1e^{10}\) \(\approx 0.99995460 \ldots \) .
To summarize: Standard Monte Carlo simulations for testing convergence rates seem to be unreliable in the case of outward pointing coefficients. No stable asymptotic regime seems to be reached by our estimators. Smaller step sizes or a larger Monte Carlo sample might be a remedy for this problem, similar to [14] where moment explosions of the Euler scheme for SDEs with superlinear coefficients are observed in a numerically asymptotic setting. Another remedy might be the usage of a rare event simulation technique such as the one used in [43] in the context of power flow reliability, where the probability of an outage is very small. But this is beyond the scope of the present manuscript.
Instead, we supplement our numerical study of the convergence rate by numerical investigations of the qualitative behavior of the Euler scheme applied to a multidimensional SDE with a similar structure to equation (1). Those are used in a financial market model, the socalled Atlas model, to describe the evolution of the capital distribution. Having addressed the long time properties of the Euler scheme on a theoretical basis for a particular onedimensional SDE in 2.4, the aim is now to recover this aspect of the longtime behavior numerically also for a multidimensional SDE.
The Euler scheme for the Atlas model
In this section, we use the Euler scheme to simulate the socalled Atlas model, which is a particular firstorder market model [4]. In such models, the asset dynamics depend on the size (measured in terms of market capitalization) of the corresponding firm, which results in an SDE model with discontinuous coefficients.
Firstorder market models
A firstorder model [4] is defined as follows: Let \(\gamma , g_{1},\ldots,g_{d} \in \mathbb{R}\) and \(\sigma _{1},\ldots,\sigma _{d} \in (0, \infty )\) such that
Consider now stocks for which the market capitalizations are given by \(X_{1},\ldots ,X_{d}\), where the index \(i \in \{1,2, \ldots , d \}\) indicates the name of the firm, and that follow the dynamics
Here, \(W_{1}, \ldots, W_{d}\) are independent Brownian motions and the growth rates \(\gamma _{i}:[0,\infty ) \rightarrow \mathbb{R}\) and volatilities \(\sigma _{i}:[0,\infty ) \rightarrow (0, \infty )\) are given by
The ranks \(r_{i}(t)\) for the stock \(X_{i}(t)\) at time t arise from the reverse orderstatistics:
Ties in the ranking are resolved by giving the firm with a lower index i the better ranking. So in such a model, the kth largest firm is assigned a growth rate of \(\gamma + g_{k}\) and a volatility of \(\sigma _{k}\) over the whole time horizon.
According to [4], the simplest among the firstorder models is the socalled Atlas model, which was introduced in [8, Ex. 5.3.3]. Within the setting of (19) and (20), choosing
leads to the Atlas model. Here, only the smallest stock in the market—called the Atlas stock—has a nonzero but positive growth rate (for its logdynamics).
By setting \(Y_{i}(t) \mathrel {:=}\log X_{i}(t)\), \(i=1,\ldots,d\), as well as plugging in the Atlas parameters (22) in our firstorder model (19)–(20), we obtain the Atlas model in compact form as follows:
As stated in [4, Prop. 2.3], the solution of (23) satisfies the ergodic relation
i.e., all stocks in the market asymptotically spent at each rank approximately the same amount of time. Similar ergodic relations also hold for general firstorder market models.
Numerical results
For simulations of the Atlas and general firstorder models, one has to rely on discretization schemes such as the Euler method. In this subsection, we test whether the Euler scheme is able to recover the long time behavior (24), i.e., whether the discrete occupation rates
where \(\widehat{r}_{i}\) is the discretized counterpart of (21) based on the Euler scheme and \(T/\Delta \in \mathbb{N}\), converge to the analytical value.
Here, we consider a threedimensional model with initial logcapitalizations \(Y(0)=[3.4, 4.1, 5.7]\) and \(\widetilde{Y}(0)=[1.2, 3.5, 10.8]\), \(\gamma =0.1\) as market drift, and \(\sigma =0.09\) as market volatility.^{Footnote 2} Table 7 presents the discrete occupation rates (averaged over \(M=10^{3}\) repetitions) for \(\Delta =2^{14}\) and different values of T as well as the sum of the squared deviations from the analytical asymptotic occupation rate. As expected, the discrete occupation rates converge to the analytical asymptotic occupation rate of \(1/d=1/3\) with increasing time horizon.
Furthermore, results suggest that less varying initial capitalizations imply that the numerical values are closer to the analytical result already for shorter time horizons, which coincides with the intuitive understanding. We also simulated the above scenarios with \(\Delta =2^{10}\) instead of \(\Delta =2^{14}\): all occupation times were equal with an accuracy of four digits and one third of the 90 occupation rates differed in the fifth digit. This suggests that—as soon as the step size is small enough—a further refinement of the step size is no longer beneficial and the crucial simulation parameter is T, the endpoint of the considered time horizon.
Conclusion and outlook
We have seen that the numerical approximation of solutions of SDEs with discontinuous drift coefficients is a challenging task, where several particularities arise. We were able to identify two main classes of discontinuous drift coefficients: outward and inward pointing drift coefficients. For the latter class, we analyzed stability properties. It turned out that the main difficulty in measuring the empirical convergence rates is how to appropriately capture drift changes. For inward pointing coefficients, we obtained stable estimates, which are in accordance with the theoretical results. For outward pointing cases, the estimates seem to be unreliable, no stabilizing asymptotic regime seems to be reached for the estimates. We tested two higherorder numerical schemes that are frequently used in a setting where coefficients are sufficiently smooth. However, both schemes did not lead to an improved behavior.
Notes
 1.
We use the expressions “numerical” and “empirical” rate (respectively order) of convergence synonymously.
 2.
The market parameters are inspired by parameters from A. Banner’s (INTECH Investment Technologies LLC, Princeton) presentation on “Equity Market Stability” given at the WCMF6 conference, Santa Barbara, 2014.
References
 1.
Alfonsi, A.: Strong order one convergence of a drift implicit Euler scheme: application to the CIR process. Stat. Probab. Lett. 83, 602–607 (2013)
 2.
Asmussen, S., Taksar, M.: Controlled diffusion models for optimal dividend payout. Insur. Math. Econ. 20, 1–15 (1997)
 3.
Balakrishnan, A.V.: On stochastic bang bang control. Appl. Math. Optim. 6, 91–96 (1980)
 4.
Banner, A.D., Fernholz, R., Karatzas, I.: Atlas models of equity markets. Ann. Appl. Probab. 15, 2296–2330 (2005)
 5.
Bayram, M., Partal, T., Orucova Buyukoz, G.: Numerical methods for simulation of stochastic differential equations. Adv. Differ. Equ. 2018, Paper No. 17 (2018)
 6.
Detemple, J.B., Garcia, R., Rindisbacher, M.: A Monte Carlo method for optimal portfolios. J. Finance 58, 401–446 (2003)
 7.
Eberle, A.: Markov Processes. Lecture notes, University of Bonn (2016)
 8.
Fernholz, E.R.: Stochastic Portfolio Theory. Applications of Mathematics, Stochastic Modelling and Applied Probability, vol. 48. Springer, New York (2002)
 9.
Fernholz, R., Ichiba, T., Karatzas, I.: A secondorder stock market model. Ann. Finance 9, 439–454 (2013)
 10.
Gihman, I., Skorohod, A.: Stochastic Differential Equations. Springer, Berlin (1972)
 11.
Gobet, E.: Weak approximation of killed diffusion using Euler schemes. Stoch. Process. Appl. 87, 167–197 (2000)
 12.
Gyöngy, I.: A note on Euler’s approximations. Potential Anal. 8, 205–216 (1998)
 13.
Halidias, N., Kloeden, P.E.: A note on the Euler–Maruyama scheme for stochastic differential equations with a discontinuous monotone drift coefficient. BIT Numer. Math. 48, 51–59 (2008)
 14.
Hutzenthaler, M., Jentzen, A., Kloeden, P.E.: Strong and weak divergence in finite time of Euler’s method for stochastic differential equations with nonglobally Lipschitz continuous coefficients. Proc. R. Soc. Lond., Ser. A, Math. Phys. Eng. Sci. 467, 1563–1576 (2011)
 15.
Ichiba, T., Papathanakos, V., Banner, A., Karatzas, I., Fernholz, R.: Hybrid Atlas models. Ann. Appl. Probab. 21, 609–644 (2011)
 16.
Karatzas, I., Fernholz, R.: Stochastic portfolio theory: an overview. In: Handbook of Numerical Analysis, vol. 15, pp. 89–167 (2009)
 17.
Karatzas, I., Shreve, S.E.: Brownian Motion and Stochastic Calculus. Springer, New York (1991)
 18.
Kleptsyna, M.L., Veretennikov, A.Y.: On strong solutions of stochastic Itô–Volterra equations. Theory Probab. Appl. 29, 153–157 (1985)
 19.
Kloeden, P.E., Platen, E.: Numerical Solution of Stochastic Differential Equations, vol. 23. Springer, Berlin (1999) [u.a.], corr. 3. print ed.
 20.
KohatsuHiga, A., Lejay, A., Yasuda, K.: On weak approximation of stochastic differential equations with discontinuous drift coefficient. In: Hara, C. (ed.) Mathematical Economics, Kyoto, Japan, vol. 1788, pp. 94–106 (2011)
 21.
Kushner, H.J., Dupuis, P.: Numerical Methods for Stochastic Control Problems in Continuous Time, 2nd edn. Applications of Mathematics (New York). Stochastic Modelling and Applied Probability, vol. 24. Springer, New York (2001)
 22.
LaBolle, E.M., Quastel, J., Fogg, G.E., Gravner, J.: Diffusion processes in composite porous media and their numerical integration by random walks: generalized stochastic differential equations with discontinuous coefficients. Water Resour. Res. 36, 651–662 (2000)
 23.
Leobacher, G., Szölgyenyi, M.: A numerical method for SDEs with discontinuous drift. BIT Numer. Math. 56, 151–162 (2016)
 24.
Leobacher, G., Szölgyenyi, M.: A strong order 1/2 method for multidimensional SDEs with discontinuous drift. Ann. Appl. Probab. 27, 2383–2418 (2017)
 25.
Leobacher, G., Szölgyenyi, M.: Convergence of the Euler–Maruyama method for multidimensional SDEs with discontinuous drift and degenerate diffusion coefficient. Numer. Math. 138, 219–229 (2018)
 26.
Leobacher, G., Szölgyenyi, M., Thonhauser, S.: On the existence of solutions of a class of SDEs with discontinuous drift and singular diffusion. Electron. Commun. Probab. 20, Paper No. 6 (2015)
 27.
Mattingly, J., Stuart, A., Higham, D.: Ergodicity for SDEs and approximations: locally Lipschitz vector fields and degenerate noise. Stoch. Process. Appl. 101, 185–232 (2002)
 28.
Meyn, S., Tweedie, R.: Markov Chains and Stochastic Stability. Springer, Berlin (1993)
 29.
MüllerGronbach, T., Yaroslavtseva, L.: On the performance of the Euler–Maruyama scheme for SDEs with discontinuous drift coefficient (2018). arXiv:1809.08423
 30.
Neuenkirch, A., Szölgyenyi, M.: The EulerMaruyama scheme for SDEs with irregular drift: convergence rates via reduction to a quadrature problem (2019). arXiv:1904.07784
 31.
Neuenkirch, A., Szölgyenyi, M., Szpruch, L.: An adaptive Euler–Maruyama scheme for stochastic differential equations with discontinuous drift and its convergence analysis. SIAM J. Numer. Anal. 57, 378–403 (2019)
 32.
Neuenkirch, A., Szpruch, L.: First order strong approximations of scalar SDEs defined in a domain. Numer. Math. 128, 103–136 (2014)
 33.
Ngo, H.L., Taguchi, D.: Strong rate of convergence for the Euler–Maruyama approximation of stochastic differential equations with irregular coefficients. Math. Comput. 85, 1793–1819 (2016)
 34.
Ngo, H.L., Taguchi, D.: On the Euler–Maruyama approximation for onedimensional stochastic differential equations with irregular coefficients. IMA J. Numer. Anal. 37, 1864–1883 (2017)
 35.
Ngo, H.L., Taguchi, D.: Strong convergence for the Euler–Maruyama approximation of stochastic differential equations with discontinuous coefficients. Stat. Probab. Lett. 125, 55–63 (2017)
 36.
Olama, M.M., Djouadi, S.M., Charalambous, C.D.: Stochastic differential equations for modeling, estimation and identification of mobiletomobile communication channels. IEEE Trans. Wirel. Commun. 8, 1754–1763 (2009)
 37.
Roberts, G.O., Tweedie, R.L.: Exponential convergence of Langevin distributions and their discrete approximations. Bernoulli 2, 341–363 (1996)
 38.
Shardin, A.A., Szölgyenyi, M.: Optimal control of an energy storage facility under a changing economic environment and partial information. Int. J. Theor. Appl. Finance 19, 1650026 (2016)
 39.
Simonsen, M., Leth, J., Schiøler, H., Cornean, H.D.: A simple stochastic differential equation with discontinuous drift. In: Proceedings Third International Workshop on Hybrid Autonomous Systems, HAS 2013, Rome, Italy, 17th March 2013, pp. 109–123 (2013)
 40.
Simonsen, M., Schioler, H., Leth, J., Cornean, H.: A convergence result for the Euler–Maruyama method for a simple stochastic differential equation with discontinuous drift. In: 2014 American Control Conference, pp. 5180–5185 (2014)
 41.
Touzi, N.: Optimal Stochastic Control, Stochastic Target Problems, and Backward SDE. Fields Institute Monographs, vol. 29. Springer, New York; Fields Institute for Research in Mathematical Sciences, Toronto, ON. With Chap. 13 by Angès Tourin (2013)
 42.
Veretennikov, A.J.: On strong solutions and explicit formulas for solutions of stochastic integral equations. Math. USSR Sb. 39, 387–403 (1981)
 43.
Wadman, W.S., Crommelin, D.T., Zwart, B.P.: A largedeviationbased splitting estimation of power flow reliability. ACM Trans. Model. Comput. Simul. 26, 1–26 (2016)
 44.
Zvonkin, A.K.: A transformation of the phase space of a diffusion process that removes the drift. Math. USSR Sb. 22, 129–149 (1974)
Acknowledgements
Parts of this work were carried out while A. Neuenkirch was visiting the Facultad de Matemáticas de la Universidad de Sevilla; A. Neuenkirch wishes to thank the Dpto. Ecuaciones Diferenciales y Análisis Numérico for its hospitality and support. Moreover, the authors would like to thank the referees for their insightful comments and remarks.
Availability of data and materials
Not applicable.
Funding
This work was supported by the DFG grant No. GO 1920/41. Moreover, the publication of this article was funded by the Ministry of Science, Research and the Arts BadenWürttemberg and the University of Mannheim.
Author information
Affiliations
Contributions
All authors contributed to all parts of the manuscript. All authors read and approved the final manuscript.
Corresponding author
Correspondence to S. Göttlich.
Ethics declarations
Competing interests
The authors declare that they have no competing interests.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Göttlich, S., Lux, K. & Neuenkirch, A. The Euler scheme for stochastic differential equations with discontinuous drift coefficient: a numerical study of the convergence rate. Adv Differ Equ 2019, 429 (2019). https://doi.org/10.1186/s1366201923614
Received:
Accepted:
Published:
MSC
 60H10
 65C20
Keywords
 Discontinuous drift
 Numerical schemes
 Convergence rates
 Experimental study