1. Introduction
This paper describes an algorithm for generating exact samples of the extrema of a stable process (see Algorithm 1.1 below) based on dominated coupling from the past (DCFTP), a coupling method for exact simulation from an invariant distribution of a Markov chain on an ordered state space (see [Reference Kendall and Møller21] and the references therein). The chain in Algorithm 1.1 is based on a novel characterization for the law of the supremum of a stable process at a fixed time in Theorem 1.1. Perpetuity (1.1) is established via the stochastic representation for concave majorants of Lévy processes [Reference Pitman and Uribe Bravo27] and the scaling property of stable laws (see Section 2 below for the proof of Theorem 1.1).
Theorem 1.1. Let $Y=(Y_t)_{t\in[0,\infty)}$ be a stable process with the stability and positivity parameters $\alpha$ and $\rho$ , respectively (see Appendix A). Define $\overline{Y}_{1}=\sup_{s\in[0,1]}Y_{s}$ and let $ (B,U,V,S,\overline{Y}_{1}) $ be a random vector with independent components, where U,V are uniform on (0,1), B is Bernoulli with parameter $1-\rho$ , and S has the law of $Y_{1}$ conditioned on being positive. Then the following equality in law holds:
where $\Lambda=1+B(V^{\frac{1}{\rho}}-1)$ . Furthermore, the law of $\overline{Y}_{1}$ is the unique solution to (1.1).
The universality of stable processes makes them ubiquitous in probability theory and many areas of statistics and natural and social sciences (see the monograph [Reference Uchaikin and Zolotarev30] and the references therein). The problem of efficient simulation of stable random variables in the context of statistics was addressed in [Reference Devroye and James15]. Among the path properties, the running supremum $\overline{Y}_{t}=\sup_{s\in[0,t]}Y_{s}\overset{d}{=}t^{1/\alpha}\overline{Y}_{1}$ of a stable process is of special interest (see [Reference Bernyk, Dalang and Peskir1], [Reference Doney16], [Reference Kuznetsov22], and [Reference Song and Vondraek29]) as it arises in application areas such as optimal stopping, the prediction of the ultimate supremum, and risk theory (see [Reference Bernyk, Dalang and Peskir2] and [Reference Song and Vondraek29]).
In general, we have no access to the density, distribution, or even characteristic function of $\overline{Y}_1$ , making a rejection sampling algorithm (see [11, Section II.3]) for $\overline{Y}_1$ difficult to construct. More precisely, if Y has no positive jumps, the strong Markov property and the fact that Y does not jump over positive levels imply that $\overline{Y}_{1}$ has the same law as $Y_{1}$ conditioned on being positive [Reference Michna25]. In all other cases, the law of $\overline{Y}_{1}$ is not accessible in closed form, and the information about it in the literature is obtained via analytical methods based on the Wiener–Hopf factorization. If Y has no negative jumps, [Reference Bernyk, Dalang and Peskir1] gives an alternating series expression for the density, while [Reference Doney16] and [Reference Kuznetsov22] give a double series representation for a dense class of parameters. The coefficients in these representations are complicated, and it is not immediately clear how one could use them to design a simulation algorithm. Moreover, in the general case, when $\alpha$ is rational the series representation is proved to be convergent for finitely many $\rho$ only [Reference Kuznetsov23]. Our simulation algorithm is based on purely probabilistic methods (it may be regarded as a generalization of the exact simulation algorithm for Vervaat perpetuities in [Reference Fill and Huber18]) and as such covers the entire class of stable processes.
1.1. Exact simulation algorithm
The perpetuity in (1.1) above gives rise to an update function $x \mapsto \phi(x,\Theta)$ of a Markov chain on $(0,\infty)$ , where the components of the random vector $\Theta$ are the random variables in Theorem 1.1 (see (3.1) below for the precise definition of $\phi$ ). The invariant distribution (i.e. invariant probability measure as defined in [Reference Meyn and Tweedie24, p. 229]) for the chain $X'= \{ X_{n}'\} _{n\in\mathbb{Z}}$ , defined by $X_n'=\phi(X_{n-1}',\Theta_{n-1})$ with $ \{ \Theta_{n}\} _{n\in\mathbb{Z}}$ a sequence of independent copies of $\Theta$ , equals that of $\overline{Y}_1$ . However, since $x \mapsto \phi(x,\Theta)$ is strictly increasing in x with probability one, no coalescence occurs, making X’ unusable for DCFTP purposes. Fortunately, the structure of the perpetuity in (1.1) is such that the update function $\phi$ can be modified to a multigamma coupler [Reference Murdoch and Green26] $x\mapsto \psi(x,\Theta)$ , which is constant on a subinterval in $(0,\infty)$ with positive probability and globally non-decreasing. The definition of $\psi$ , given in Lemma 3.1 below, was inspired by [Reference Fill and Huber18], where such a modification was applied to Vervaat perpetuities. The construction requires an addition of a single independent uniform random variable to the vector $\Theta$ and yields a Markov chain $X= \{ X_{n}\} _{n\in\mathbb{Z}}$ on $(0,\infty)$ via $X_{n}=\psi (X_{n-1},\Theta_{n-1}) $ , where $ \{ \Theta_{n}\} _{n\in\mathbb{Z}}$ are independent copies of $\Theta$ . The invariant distribution of X equals that of $\overline{Y}_1$ and the coalescence occurs at every step with positive probability. The former follows from Theorem 1.1 and the fact that the chains X and X’ have the same transition probabilities (see Lemma 3.1 below) and the latter is a consequence of the structure of $\psi$ .
Our aim is to sample $X_{0}$ , whose law equals that of $\overline{Y}_{1}$ . By construction of $\psi$ it follows that $\psi (x,\Theta) =\psi (a (\Theta) ,\Theta) $ for any $x\in(0, a (\Theta) ]$ , where $\theta\mapsto a (\theta) $ is a positive deterministic function explicitly given in (3.3) of Lemma 3.1 below. The coalescence for X occurs every time the inequality $X_n\leq a (\Theta_n) $ is satisfied, since, if $-\sigma$ is such a time, then $X_{-\sigma+1}=\psi (a (\Theta_{-\sigma}) ,\Theta_{-\sigma}) $ disregards the value $X_{-\sigma}$ and hence the entire trajectory of X prior to time $-\sigma+1$ .
The task now is to detect whether the event $ \{X_n\leq a (\Theta_n) \} $ occurred without knowing the value of $X_n$ (if we had access to $X_n$ for any $n\in\mathbb{Z}$ , we would have a sample from the law of $\overline{Y}_1$ !). DCFTP [Reference Kendall and Møller21] suggests looking for a process $D= \{ D_{n}\}_{n\in\mathbb{Z}}$ satisfying $D_{n}\geq X_{n}$ for all $n\in\mathbb{Z}$ , which can be simulated backwards in time (starting at 0) together with the independent, identically distributed (i.i.d.) sequence $ \{ \Theta_{n}\} _{n\in\mathbb{Z}}$ . It is possible to define such a process D, which turns out to be stationary but non-Markovian, by ‘unwinding’ the recursion for X backwards in time and bounding the terms (see (3.8) in Section 3).
Algorithm 1.1 (Exact sampling from the law of $\overline{Y}_1$ )
1. Starting at 0, sample $\{(D_n,\Theta_n)\}_{n\in\mathbb{Z}}$ backwards in time until
\[ -\sigma=\sup\{n\leq 0\colon D_n\leq a(\Theta_n)\} \]2. Put $X_{-\sigma+1}=\psi(a(\Theta_{-\sigma}),\Theta_{-\sigma})$
3. Compute recursively $X_n=\psi(X_{n-1},\Theta_{n-1})$ for $n=-\sigma+2,\ldots,0$
4. return $X_0$
The backward simulation of $ \{ (D_{n},\Theta_{n}) \}_{n\in\mathbb{Z}}$ in step 1 of Algorithm 1.1 is discussed in Section 4 below. It relies on two ingredients: (A) the simulation of the indicators of independent events with summable probabilities and (B) the simulation of a random walk with negative drift and its future supremum. By the Borel–Cantelli lemma, only finitely many indicators in (A) are non-zero. A simple and efficient algorithm for the simulation of the entire sequence is given in Section 4.1 below. The algorithm for (B) has been developed in [Reference Blanchet and Sigman4, Section 4]. For completeness, in Section 4.2 below we present the algorithm from [Reference Blanchet and Sigman4, Section 4] applied to the specific random walk that arises in definition (3.8) of our dominating process D. The algorithm in [Reference Blanchet and Sigman4, Section 4] requires the simulation of the walk under the original measure as well as under an exponential change of measure. In our case the increments of the random walk in question are shifted negative exponential random variables. This makes the dynamics of the walk explicit and easy to simulate under both measures (see Section 4.2 below for details), making the implementation of Algorithm 1.1 quite fast. More precisely, Algorithm 5.1 below (a version of Algorithm 1.1) was implemented in Julia; see the GitHub repository [Reference González Cázares, Mijatovi and Uribe Bravo19] for the code and a simple user guide. This implementation outputs approximately 104 samples every 1.15 seconds (see Section 5 for details).
Note that the random time $\sigma$ in Algorithm 1.1 dictates the number of simulations, as steps 2–4 in the algorithm require only deterministic computation. In order to prove that $\sigma$ is finite, we couple D with a dominating process D′, which is a component of a multi-dimensional positive Harris-recurrent Markov chain $\Xi$ (see (3.9) for the definition of D′ and Lemma 3.2 of Section 3 below). Note that we need not be (and in fact are not) able to simulate D′. We apply the general state-space Markov chain theory [24, 28] to prove the following result (see Section 3 below for details).
Theorem 1.2. The random time $\sigma$ in Algorithm 1.1 is finite a.s. (almost surely). Moreover, $\mathbb{E} [\sigma|\Xi_0]\lt\infty$ a.s.
Fill and Huber [Reference Fill and Huber18, Theorem 5.1] provide a sharp estimate on $\mathbb{E} [\sigma]$ for an analogous algorithm in the context of Vervaat perpetuities. Their analysis is based on the fact that their dominating process D is a birth–death Markov chain and is hence time-reversible with skip-free increments and an explicit invariant distribution (shifted geometric). In the context of Theorem 1.2, the dominating process D is non-Markovian, its increments are diffuse, have heavy tails and the multi-dimensional Markov chain $\Xi$ used to bound D has a non-explicit invariant probability measure $\pi$ (which also has heavy tails). These heavy tails make the chain frequently take large values, which in turn makes the coalescence events and probabilities harder to trace, bound and control. Moreover, the law of the time-reversal of $\Xi$ (with respect to $\pi$ ) is very different from that of $\Xi$ . The key step in the proof of Theorem 1.2 is provided by [Reference Revuz28, Theorem 8.1.1], which allows us to conclude that the time-reversed chain has a Harris-recurrent modification. However, a quantitative bound on the expected number of steps taken backwards in time in Algorithm 1.1 remains an open problem.
1.2 Related literature
Exact simulation algorithms for various instances of a general perpetuity equation $\mathcal{X}\overset{d}{=}A_0 \mathcal{X}+A_1$ (with $(A_0,A_1)$ and $\mathcal{X}$ independent) have been developed in the literature.
Fill and Huber [Reference Fill and Huber18] studied the case $A_0=A_1\geq0$ , $\mathbb{E} [A_0]<1$ , specializing to the Vervaat perpetuity for $A_0=U^{1/\beta}$ with U uniform on (0,1) and $\beta\in(0,\infty)$ ; see also [Reference Cloud and Huber9] and [Reference Devroye12]. Briefly put, Fill and Huber first identified the update function and constructed a multigamma coupler. The identified dominating process is a simple random walk with a partially absorbing barrier and whose invariant law is that of a shifted geometric random variable. A sped-up version of a DCFTP algorithm [Reference Devroye12] in the case $\beta=1$ (i.e. when $\mathcal{X}$ follows the Dickman distribution) is given in [Reference Devroye and Fawzi13].
Devroye and James [Reference Devroye and James14] developed the double CFTP algorithm in the case $A_0=V$ and $A_1=(1-V)Z$ , where V takes values in [0,1] (and has a computable density) and Z is independent of V with support in an interval [0, c] for some $c<\infty$ . This structure appears similar to perpetuity (2.1) of Proposition 2.1 below, where $A_0=U^{1/\alpha}$ and $A_1=(1-U)^{1/\alpha}\max\{Y_1,0\}$ with $Y_1$ an $\alpha$ -stable random variable independent of the uniform U. Proposition 2.1 provides a key step in the proof of Theorem 1.1 above, which in turn is the cornerstone of Algorithm 1.1. The upper bound c on the support of Z in [Reference Devroye and James14] is inversely proportional to the coalescence probability of the chain in the double CFTP algorithm, making its direct application to perpetuity (2.1) impossible, since $\max\{Y_1,0\}$ not only has infinite support but also a heavy tail. Moreover, even if we could construct a stochastic (rather than constant) upper bound on the relevant support, this bound would necessarily still have a heavy tail, making the coalescence in a generalization of the algorithm in [Reference Devroye and James14] unlikely. This would then yield long (possibly infinite) running times for such a generalization.
Dassios, Lim, and Qu [Reference Dassios, Lim and Qu10] studied the generalized Vervaat perpetuity where $A_1=A_0A_2$ for independent $A_2$ and $A_0=U^{1/\beta}$ with U uniform on (0,1). By calculating the Laplace transform from the perpetuity, they showed that $\mathcal{X}$ has the law of the marginal of a pure-jump Lévy process at time $\beta$ with Lévy density $\nu(\rm{\mathrm{d}} x)= |x|^{-1}(\mathbb{P}(A_2\gt{x})1_{x\gt{0}}+\mathbb{P}(A_2\lt-x)1_{x\lt0})\,\rm{\mathrm{d}} x$ . Techniques similar to those in [Reference Chi6], based on infinite divisibility, are used to devise the simulation algorithm under the conditions $A_2\geq0$ and $\lim_{x\downarrow0}\mathbb{P}(A_2\leq x)/x<\infty$ , without relying on Markov chain techniques. The calculation of Laplace transforms based on perpetuities (2.1) or (1.1) yields complicated equations for the Laplace transform. Furthermore, even if we could solve for the Laplace transform of $\overline{Y}_1$ , we could not follow the simulation approach from [Reference Dassios, Lim and Qu10], as $\overline{Y}_1$ is typically not infinitely divisible.
Blanchet and Sigman [Reference Blanchet and Sigman4] used a version of a multigamma coupler, allowing $A_1$ to have a heavy tail but assuming the independence of $A_0$ and $A_1$ , a requirement clearly violated by perpetuities (1.1) and (2.1) in the present paper. Moreover, a certain domination condition [Reference Blanchet and Sigman4, equation (2) in Assumption (B)] for the density of $A_1$ is stipulated, which plays an important role in constructing the coalescence probability. This dominating condition is hard to establish for the density of a stable law conditioned on being positive, appearing in perpetuity (1.1). Thus, even if one could remove the assumption on the independence of $A_0$ and $A_1$ in [Reference Blanchet and Sigman4], this technical requirement would make it hard to apply the sampling algorithm from [Reference Blanchet and Sigman4] directly in our setting.
The structure of the multigamma coupler used in the present paper is closer to that of [Reference Fill and Huber18] (see also Section 1.1 above and Lemma 3.1 below) than that of [Reference Blanchet and Sigman4]. Despite the differences between the samplers in [Reference Blanchet and Sigman4] and the one used here, the construction of our dominating process was inspired by the one presented in [Reference Blanchet and Sigman4]. However, we were unable to use the dominating process $V^+_k$ in [Reference Blanchet and Sigman4, equation (9)] directly, which appears to be bounded from below by the deterministic function $k\mapsto \rm{\mathrm{e}}^{ak/2}/(1-\rm{\mathrm{e}}^{-a/2})$ (for all positive integers k and some constant $a>0$ ) tending to infinity exponentially fast and hence suggesting a positive probability of never detecting coalescence. It appears that this issue could be circumvented in the general context of [Reference Blanchet and Sigman4] by a simple adaptation of our dominating process defined in (3.8) below, which is based on the idea of adaptive bounds (see Figure 1 in Section 4.1).
A perpetuity can be understood as the special case of the stochastic fixed-point equation $\mathcal{X}\overset{d}{=}f(\mathcal{X},U)$ in a general state space for independent $\mathcal{X}$ and U and some measurable function f. See the monograph [Reference Huber20] for a comprehensive survey on the variety of Markov chain techniques, such as CFTP and DCFTP, used to obtain exact samples of $\mathcal{X}$ .
The problem of the exact simulation of the first passage event of a spectrally positive stable process (resp. a Lévy process with infinite activity and finite variation) is addressed in [Reference Chi8] (resp. [Reference Chi7]). Algorithm 1.1 solves this problem for all stable processes as follows: for any $x>0$ , define the first passage time $\tau_x\,:\!=\inf\{t>0\colon Y_t\geq x\}$ and note that the equality of events $\{\tau_x>t\}=\{\overline{Y}_t<x\}$ for all $t\in(0,\infty)$ and the scaling property yield the equality in law $\tau_x\overset{d}{=}(x/\overline{Y}_1)^ \alpha$ .
We conclude the introduction by noting that Proposition 2.1 easily implies the asymptotic behaviour at infinity of the distribution function of $\overline{Y}_1$ stated in [3, Proposition VIII.1.4, p. 221]. Excluding the spectrally negative case, perpetuity (2.1) and the Grinceviius–Grey theorem [Reference Buraczewski, Damek and Mikosch5, Theorem 2.4.3] yield $\lim_{x\to\infty}2\mathbb{P} (Y_1U^{1/\alpha}>x) / \mathbb{P} (\overline{Y}_1>x) =1$ . By Breiman’s lemma [Reference Buraczewski, Damek and Mikosch5, Lemma B.5.1] we have $\lim_{x\to\infty} 2\mathbb{P} (Y_1U^{1/\alpha}>x) /\mathbb{P} (Y_1>x) =1$ , implying $\lim_{x\to\infty} \mathbb{P} (\overline{Y}_1>x) /x^{-\alpha} =\Gamma(\alpha)\sin(\pi\alpha\rho)/\pi$ via the classical tail behaviour of the stable law [Reference Uchaikin and Zolotarev30, Section 4.3].
The remainder of the paper is structured as follows. In Section 2, we establish perpetuity (2.1) and apply it in the proof of Theorem 1.1. In Section 3 we define the update function $\psi$ (in Lemma 3.1), construct the dominating process and prove Theorem 1.2 above. Section 4 discusses the backward simulation of $\{(D_n,\Theta_n)\}_{n\in\mathbb{Z}}$ . Finally, a numerical performance analysis is found in Section 5.
2. Stochastic perpetuities
Let Y be a stable process with stability and positivity parameters $\alpha$ and $\rho$ , respectively (see Appendix A below for definition). Since $Y_0=0$ and the scaling property yield $\overline{Y}_{t}=\sup_{s\in [0,t] }Y_{s}\overset{d}{=}t^{1/\alpha}\overline{Y}_{1}$ for all $t\in[0,\infty)$ , we may restrict our attention to $\overline{Y}_1$ . Let $S (\alpha,\rho) $ and $\overline{S} (\alpha,\rho) $ denote the laws of $Y_{1}$ and $\overline{Y}_{1}$ , respectively. Since $\mathbb{P} (Y_{t}>0) =\rho$ for any $t>0$ , the extreme cases $\rho\in \{ 0,1\} $ are excluded from our analysis as they correspond to Y having monotone paths. Let U(0,1) denote the uniform law on (0,1) and define $x^+=\max\{x,0\}$ for any real number $x\in\mathbb{R}$ .
Proposition 2.1. Let $ (\overline{Y}_1,Z,U) \sim \overline{S} (\alpha,\rho) \times S (\alpha,\rho) \times U (0,1) $ . Then the law of $\overline{Y}_{1}$ is the unique solution of the following perpetuity:
To prove this result, we need the next definition. For any $a<b$ , the concave majorant of a function $f\colon [a,b]\to\mathbb{R}$ is defined as the smallest concave function $c\colon [a,b]\to\mathbb{R}$ , such that $c (t) \geq x (t) $ for every $t\in [a,b] $ . The proof of Proposition 2.1 exploits the fact that the supremum of a function lies on its concave majorant, at the end of all (if any) faces with positive slope. Following the classical result for the complete description of a concave majorant of random walks, Pitman and Uribe Bravo [Reference Pitman and Uribe Bravo27] described the continuous-time analogue of these results for Lévy processes ([Reference Pitman and Uribe Bravo27] is phrased in terms of the convex minorant, but through a change of sign their results cover the concave majorant). The idea is as follows: fix a sample path of Y and pick a random face of its concave majorant above an independent uniform point in [0,1]. The length of the chosen face is distributed as $V\sim U(0,1)$ and its height is distributed as the increment of a stable process over a time interval of duration V. Moreover, after removing this face (together with the path underneath it) the remainder of the concave majorant behaves like a concave majorant of a stable process over the time interval [0,1-V]; see [Reference Pitman and Uribe Bravo27]. This recursive relation and the scaling property of Y will yield the perpetuity in (2.1).
Proof. A stick-breaking process $ \{ \ell_{n}\} _{n\geq1}$ on [0,1] is defined recursively as follows:
where $L_{n-1}=\ell_{1}+\cdots+\ell_{n-1}$ , $L_0=0$ and $ \{ V_{n}\} _{n\geq1}$ is a sequence of i.i.d. random variables with law U(0,1) (independent of Y). Let $C=(C_t)_{t\in[0,1]}$ be the concave majorant of the Lévy process Y. Let $ (d_{n}-g_{n},C_{d_{n}}-C_{g_{n}}) _{n\geq1}$ be the lengths and heights of the faces of C picked at random, uniformly on lengths and without replacement ( $g_n$ and $d_n$ denote the beginning and end times for the nth face). Theorem 1 of [Reference Pitman and Uribe Bravo27] asserts the following equality in law:
The concave majorant $(C_t)_{t\in[0,1]}$ is piecewise linear, with the corresponding slopes forming a non-increasing piecewise constant function in t. Hence $\overline{Y}_{1}$ is always contained in the image of the function C. Moreover, the supremum equals the sum of all the positive heights of C:
Conditional on $ \{ L_{n}\}_{n\geq1}$ , the random variables $ \{ Y_{L_{n}}-Y_{L_{n-1}}\}_{n\geq1}$ are independent and have the same distribution as the respective $Y_{\ell_{n}}$ . Hence, for an i.i.d. sequence $ \{ Z_{n}\} _{n\geq1}$ with law $S (\alpha,\rho) $ , we have
implying
It is well known that $ \{ \frac{p}{\ell_{n}}{1-\ell_{1}}\} _{n\geq2}$ is a stick-breaking process on [0,1], independent of $\ell_1\sim U(0,1)$ (and $ \{ Z_{n}\} _{n\geq1}$ ). Hence by (2.2) we find the equality in law
which, together with (2.2), implies the perpetuity
Finally, the uniqueness of solution follows from [Reference Buraczewski, Damek and Mikosch5, Theorem 2.1.3].
Let $S^{+} (\alpha,\rho) $ denote the law of $Y_{1}$ conditioned on being positive. For $n,m\in\mathbb{Z}$ define the sets
Proof of Theorem 1.1. Note that the random variable Z + in Proposition 2.1 behaves like the product of a Bernoulli random variable and a stable random variable conditioned on being positive, that is, if $B\sim \operatorname{\rm{Ber}} (\rho) $ and $S\sim S^{+} (\alpha,\rho) $ are independent, then $Z^{+}\overset{d}{=}BS$ . Since $\mathbb{P} (Z^{+}=0) =1-\rho>0$ , the idea behind the proof of Theorem 1.1 is to iterate perpetuity (2.1) backwards in time until the first time we observe Z +>0.
More precisely, by Proposition 2.1 and Kolmogorov’s consistency theorem, we can construct a stationary Markov chain $ \{ (U_{n},Z_{n},\zeta_{n}) \}_{n\in\mathcal{Z}^{1}}$ with invariant law $U (0,1) \times S (\alpha,\rho) \times\overline{S} (\alpha,\rho) $ , where $ \{ (U_{n},Z_{n}) \} _{n\in\mathcal{Z}^{1}}$ is an i.i.d. sequence with law $U (0,1) \times S (\alpha,\rho) $ and
Define $V_{0}=1$ and $V_{n}=\prod_{m\in\mathcal{Z}_{n}^{0}} (1-U_{m}) $ for $n\in\mathcal{Z}^{0}$ . Then the following equality holds:
Let $\tau=\sup \{ n\in\mathcal{Z}^{0}\colon Z_{n}>0\} $ (with convention $\sup\emptyset=-\infty$ ) be the last time we see a positive value in the sequence $ \{ Z_{n}\}_{n\in\mathcal{Z}^{0}}$ . Substituting $n=\tau$ in (2.4), we get
This equality of course yields the same equality in law. It will hence imply the perpetuity in (1.1), if we prove that the random variables involved have the desired laws and independence structure.
The events $ \{ Z_{n}>0\} $ , $n\in\mathcal{Z}^0$ , are independent with probability $\rho$ , making $\tau$ a geometric random variable on $\mathcal{Z}^0$ with parameter $\rho$ . By construction, the coordinates of the vector $(U_n,Z_n,\zeta_n)$ are independent for any $n\in\mathcal{Z}^0$ . Hence we have $ (U_{\tau},Z_{\tau},\zeta_{\tau}) \sim U (0,1) \times S^{+} (\alpha,\rho) \times\overline{S} (\alpha,\rho) $ . Moreover, $ (U_{\tau},Z_{\tau},\zeta_{\tau}) $ is independent of $ (\tau,V_{\tau+1}) $ . Hence (2.5) will imply the perpetuity in the theorem if we prove that $\Lambda$ has the same law as $V_{\tau+1}$ . Put differently, as $\tau$ and $U_0$ are independent, it is sufficient to prove the following equality in law:
Since $-\log (1-U_{1}) \sim \operatorname{\rm{Exp}} (1) $ is exponential with mean one, $-\log (V_{n}) $ is gamma-distributed with density $x\mapsto x^{-n-1}\,\rm{\mathrm{e}}^{-x}/({-}n-1)!$ for any $n\in\mathcal{Z}^0$ . Hence, on the event $\{\tau\neq -1\}$ , the density of the conditional law $-\log (V_{\tau+1}) |\tau$ is given by $x\mapsto x^{-\tau-2}\,\rm{\mathrm{e}}^{-x}/({-}\tau-2)!$ . Thus, the conditional law $-\log (V_{\tau+1}) |\{\tau\neq -1\}$ is exponential with density
Since $-\log (V_{\tau+1}) $ takes the value 0 when $\tau=-1$ , which happens with probability $\rho$ , and is otherwise exponential with mean $1/\rho$ , the distributional identity in (2.6) follows.
Finally, the uniqueness of the solution for perpetuity (1.1) follows from [Reference Buraczewski, Damek and Mikosch5, Theorem 2.1.3].
3. The Markov chain X and the dominating process D in Algorithm 1.1
Let $\mathcal{A}= (0,\infty) \times (0,1) \times (0,1) \times (0,1]$ and define the function $\phi\colon (0,\infty) \times\mathcal{A}\to (0,\infty) $ by
Note that the map $x\mapsto \phi (x,\theta) $ is increasing and linear in x for all $\theta\in\mathcal{A}$ and does not depend on w. Let $W\sim U (0,1) $ be independent of random variables S, U, and $\Lambda$ defined in Theorem 1.1. Then, by Theorem 1.1, we have $\zeta\overset{d}{=}\phi (\zeta,\Theta) $ , where $\zeta\sim\overline{S} (\alpha,\rho) $ is independent of $\Theta= (S,U,W,\Lambda) $ . Hence a Markov chain with the update function $\phi$ has the correct invariant law but does not allow for coalescence: if for any $x,y\in(0,\infty)$ we have $\phi(x,\Theta)=\phi(y,\Theta)$ , by (3.1) it follows that $x=y$ . But the structure of $\phi$ and the additional randomness in W allow us to modify the update function $x \mapsto \phi(x,\theta)$ so that coalescence can be achieved, while keeping the law of the chain unchanged.
Lemma 3.1. Define the functions $\psi\colon (0,\infty) \times\mathcal{A}\to (0,\infty) $ and $a\colon \mathcal{A}\to (0,\infty) $ by the formulae
The map $x\mapsto\psi(x,\theta)$ is non-decreasing in x for all $\theta\in\mathcal{A}$ . Moreover, for $\zeta$ and $\Theta$ as in the paragraph above, we have $\phi (x,\Theta) \overset{d}{=}\psi (x,\Theta) $ for all $x\gt0$ and $\overline{S} (\alpha,\rho) $ is the unique solution of the distributional equation $\zeta\overset{d}{=}\psi (\zeta,\Theta) $ .
Proof. The function $\psi$ takes constant value of $w^{\frac{1}{\alpha\rho}} (1-u) ^{\frac{1}{\alpha}}s$ for $x\in (0,a (\theta) ]$ and increases linearly on the interval $ (a (\theta) ,\infty) $ with the right limit satisfying $\lim_{x\searrow a (\theta) }\psi (x,\theta) = (1-u) ^{\frac{1}{\alpha}}s>\psi (a (\theta) ,\theta) $ . Hence the desired monotonicity follows.
We now prove that $\phi (x,\Theta) \overset{d}{=}\psi (x,\Theta) $ for all $x>0$ , that is, the transition probabilities for the update functions $\phi$ and $\psi$ coincide. Pick $x>0$ and note that
Thus, for any $y>0$ we have
Define
and note that $ \{ a (\Theta) \geq x\} = \{ \Lambda^{\rho}\leq v (U,S) \} $ . On this event, the definition of $\Lambda$ in Theorem 1.1 implies the inequality $\Lambda<1$ , in which case $\Lambda^{\rho}$ is uniform on (0,1). Hence the conditional law of $\Lambda$ , given (U, S) and $\{ a (\Theta) \geq x\} $ , is uniform on the interval (0, v (U, S)). Moreover, the conditional law of v (U, S) W, given (U, S) and on $ \{ a (\Theta) \geq x\} $ , is also uniform on (0, v (U, S)). Hence, for any $y>0$ the following equalities hold:
Taking expectations in this identity yields the unconditional equality
Hence we get
implying the equality in law $\phi (x,\Theta) \overset{d}{=}\psi (x,\Theta) $ for arbitrary $x>0$ .
Pick $y\gt0$ . Since $\Theta$ and $\zeta$ are independent, by Theorem 1.1 we have
implying $\zeta\overset{d}{=}\psi (\zeta,\Theta) $ . Moreover, if there exists some $\zeta^{\prime}$ (independent of $\Theta$ ) satisfying $\zeta^{\prime}\overset{d}{=}\psi (\zeta^{\prime},\Theta) $ , this calculation implies the equality $\zeta^{\prime}\overset{d}{=}\phi (\zeta^{\prime},\Theta) $ . By Theorem 1.1 we get $\zeta^{\prime}\overset{d}{=}\zeta$ , as claimed.
By Lemma 3.1 and Kolmogorov’s consistency theorem, there exists a probability space supporting a sequence $ \{ \Theta_{n}\} _{n\in\mathbb{Z}}$ of independent copies of $\Theta$ and a stationary Markov chain $ \{ X_{n}\} _{n\in\mathbb{Z}}$ , satisfying $X_{n+1}=\psi (X_{n},\Theta_{n}) $ for all $n\in\mathbb{Z}$ . In the rest of the paper, $\{(X_n,\Theta_n)\}_{n\in\mathbb{Z}}$ denotes the corresponding Markov chain on $(0,\infty)\times\mathcal{A}$ . In order to detect coalescence in Algorithm 1.1, we now construct a dominating process $\{D_n\}_{n\in\mathbb{Z}}$ .
To this end, fix constants $\delta$ and d satisfying $0<\delta<d<\frac{p}{1}{\alpha\rho}$ . Let $I_{k}^{n}=1_{ \{ S_{k}>\rm{\mathrm{e}}^{\delta (n-1-k) }\} }$ for all $n\in\mathbb{Z}$ , $k\in\mathcal{Z}^{n}$ (see (2.3) above), where $S_k\sim S^{+}(\alpha,\rho)$ is the first component of $\Theta_k$ (see the first paragraph of Section 3). Fix $\gamma>0$ such that $\mathbb{E} S_{1}^{\gamma}<\infty$ (see (A.2)). Markov’s inequality implies
and hence $\sum_{m=0}^{\infty}(1-p (m) )<\infty$ . Since $\{S_k\}_{k\in\mathbb{Z}}$ are independent, the Borel–Cantelli lemma ensures that, for a fixed $n\in\mathbb{Z}$ , the events $ \{ S_{k}>\rm{\mathrm{e}}^{\delta (n-1-k) }\} = \{ I_{k}^{n}=1\} $ occur for only finitely many $k\in\mathcal{Z}^{n}$ a.s. Let $\chi_{n}$ be the smallest time beyond which the indicators $I_{k}^{n}$ are all zero:
with convention $\inf\emptyset =\infty$ . Note that $-\infty\lt\chi_{n}\leq n-1$ holds a.s. for all $n\in\mathbb{Z}$ . Since the integers are countable, we have $n-1\geq \chi_{n}>-\infty$ for all $n\in\mathbb{Z}$ a.s.
Define the i.i.d. sequence $ \{ F_{n}\} _{n\in\mathbb{Z}}$ by $F_{n}=d+\pgfrac{1}{\alpha}\log (\Lambda_{n}U_{n}) $ , where $U_n$ and $\Lambda_n$ are the second and fourth components of $\Theta_n$ , respectively (see the first paragraph of Section 3). Note that $d-F_{n}$ has the same law as a sum of (random) geometrically many independent exponential random variables and is hence exponentially distributed with mean $\mathbb{E}[d-F_{n}]=\frac{p}{1}{\alpha\rho}$ . Let $C= \{ C_{n}\} _{n\in\mathbb{Z}}$ be a random walk defined by $C_{0}=0$ and
Recall definition (2.3) and let $R= \{ R_{n}\} _{n\in\mathbb{Z}}$ be the reflected process of the walk $ \{ C_{n}\} _{n\in\mathbb{Z}}$ , that is,
For any $n\in\mathbb{Z}$ , define the following random variables:
The sum in (3.8) is taken to be zero if $\mathcal{Z}^n_{\chi_n}=\emptyset$ , i.e. if $\chi_n=n$ . Note that the series in $D_n''$ is absolutely convergent by the Borel–Cantelli lemma, but $D_n'$ cannot be simulated directly as it depends on an infinite sum. Finally, define the random element $\Xi_n= (\Theta_{n},R_{n},D_{n}^{\prime}) $ for any $n\in\mathbb{Z}$ .
(a) $X_{n}\leq D_{n}\leq D_{n}^{\prime}$ for all $n\in\mathbb{Z}$ a.s.
(b) The processes $R= \{ R_{n}\}_{n\in\mathbb{Z}} $ and $\Xi=\{\Xi_n\}_{n\in\mathbb{Z}}$ are Markov, stationary, and $\varphi$ -irreducible (see definition [Reference Meyn and Tweedie24, p. 82]) with respect to the respective invariant distributions.
Proof. (a) Since $\mathbb{E} F_{1}\lt0$ , by the strong law of large numbers we have $C_{-n}\to-\infty$ a.s. as $n\to\infty$ . Hence $R_{n}<\infty$ for all $n\in\mathbb{Z}$ a.s. and a direct termwise comparison yields $D_{n}^{\prime}\geq D_{n}$ for all $n\in\mathbb{Z}$ . It remains to prove that $X_{n}\leq D_{n}$ for all $n\in\mathbb{Z}$ .
Recall that the function $\theta\mapsto a(\theta)$ is defined in (3.3). Let $\tau_{n}=\sup \{ k\in\mathcal{Z}^{n}\colon X_{k}\leq a (\Theta_{k}) \} $ (with convention $\sup\emptyset = -\infty$ ) be the last time the coalescence occurred before $n\in\mathbb{Z}$ . If $\tau_{n}>-\infty$ , the value $X_{1+\tau_{n}}$ does not depend on $X_{\tau_{n}}$ , and neither do the values of the chain taken at subsequent times. In particular,
In general, by (3.2) and (2.3), $X_n$ can be expressed as
where sums over empty sets in (3.10) are defined to be equal to zero and, if $\tau_{n}=-\infty$ , we define $\mathcal{Z}^n_{\tau_{n}+1} =\mathcal{Z}^n$ . A termwise comparison then yields
Recall that $S_{k} (1-I_{k}^{n}) \leq \rm{\mathrm{e}}^{\delta (n-1-k) } (1-I_{k}^{n}) $ for all $k\in\mathcal{Z}^n$ . Since $I_{k}^{n}=0$ for $k<\chi_{n}$ , we get
The inequalities in (3.11)–(3.12) and the definition in (3.8) imply $X_{n}\leq D_{n}$ for all $n\in\mathbb{Z}$ a.s.
(b) Note that $C_k-C_n=\sum_{i=k}^{n-1}F_i$ for all $k\in\mathcal{Z}^n$ . Hence $R_n=\sup\{C_k-C_n\colon k\in\mathcal{Z}^{n+1}\}$ and $F_n$ are independent and the Markov property for $ \{ R_{n}\}_{n\in\mathbb{Z}}$ follows from
By (3.9) we have $D_{n}^{\prime\prime}=S_{n-1}+\rm{\mathrm{e}}^{-d}D_{n-1}^{\prime\prime}$ . Hence $ (R_{n},D_{n}^{\prime}) $ is a function of
(recall that $S_{n-1}$ is the first component of the random vector $\Theta_{n-1}$ ). Since the random elements $\Xi_{n-1}$ and $\Theta_{n}$ are independent, the process $ \{\Xi_n\}_{n\in\mathbb{Z}}$ is Markov.
The vector $\Xi_n= (\Theta_{n},R_{n},D_{n}^{\prime}) $ is in a bijective correspondence with $ (\Theta_{n},R_{n},D_{n}^{\prime\prime}) $ .
Since $ \{ \Theta_{n}\}_{n\in\mathbb{Z}}$ are i.i.d., the following equality in law holds:
implying the stationarity of $ \{ (\Theta_{n},R_{n},D_{n}^{\prime\prime}) \}_{n\in\mathbb{Z}}$ and hence of R and $\Xi$ .
The process R can jump to 0 in a single step and has positive jumps of size at most $1/(\alpha\rho)-d$ , both with positive probability. Hence it will hit any subinterval of its state space $[0,\infty)$ from any starting point in a finite number of steps with positive probability, making it $\varphi$ -irreducible [Reference Meyn and Tweedie24, p. 82] with respect to its invariant law.
Since $\Theta_n$ is independent of $(R_n,D_n'')$ , the $\varphi$ -irreducibility of $ \{\Xi_{n}\}_{n\in\mathbb{Z}}$ follows if, starting from an arbitrary point, we can prove that the process $\{(R_n,D_n'')\}_{n\in\mathbb{Z}}$ hits any rectangle in the product $[0,\infty)\times (0,\infty)$ with positive probability. Since we already know that R hits intervals and has (arbitrarily) small positive jumps with positive probability, the independence of $\{D''_n\}_{n\in\mathbb{Z}}$ and R, together with the fact that $D_n''$ has a positive density, imply the final statement of the lemma.
Proof of Theorem 1.2. By Lemma 3.2(ii), $\Xi$ is $\pi$ -irreducible, where $\pi$ denotes the invariant law of $\Xi$ . Hence, by [Reference Meyn and Tweedie24, Proposition 10.1.1], $\Xi$ is recurrent, meaning that the expected number of visits of the chain $\Xi$ to any set charged by $\pi$ is infinite for all starting points. By [Reference Meyn and Tweedie24, Theorem 9.0.1], the chain $\Xi$ is Harris-recurrent on a complement of a $\pi$ -null set. Put differently, for any starting point, the number of visits $\Xi$ makes to any set charged by $\pi$ is infinite almost surely.
Consider the Markov chain $\Psi=\{\Psi_n\}_{n\in\mathbb{N}}$ , where $\mathbb{N}=\{0,1,\ldots\}$ and $\Psi_n=\Xi_{-n}$ . In the language of [Reference Revuz28], $\Psi$ is a chain dual to $\Xi$ with respect to $\pi$ . In particular, the invariant law of $\Psi$ equals $\pi$ . Since $\Xi$ is Harris-recurrent on a state space with a countably generated $\sigma$ -algebra, [Reference Revuz28, Theorem 8.1.1] implies that there exists a modification of $\Psi$ (again denoted by $\Psi$ ) that is also Harris-recurrent. Since $\mathbb{P} (a (\Theta_{-n}) \geq D_{-n}^{\prime}) \gt{0}$ for any $n\in\mathbb{N}$ , it follows that the $\Psi$ -stopping time $\sigma^{\prime}=\inf \{ n>0\colon a (\Theta_{-n}) \geq D_{-n}^{\prime}\} $ is finite almost surely. Moreover, by [Reference Meyn and Tweedie24, Theorem 11.1.4] we have $\mathbb{E} [\sigma'|\Psi_0]<\infty$ almost surely.
Recall that $\sigma=\inf \{ n>0\colon a (\Theta_{-n}) \geq D_{-n}\} $ is the number of steps taken backwards in time in Algorithm 1.1. By Lemma 3.2(i) we have $\sigma\leq \sigma'$ . Since, by definition, $\Psi_0=\Xi_0$ , the claim follows.
4. Backward simulation of $ \{ (D_{n},\Theta_{n}) \} _{n\in\mathbb{Z}}$
A key step in Algorithm 1.1 consists of simulating the process $\{(D_n,\Theta_n)\}_{n\in\mathbb{Z}}$ backwards in time until the random time $\sigma=\inf \{ n>0\colon a(\Theta_{-n})\geq D_{-n}\} $ (see (2.3) and (3.3) for the definitions of $\mathcal{Z}^1$ and $a(\theta)$ , respectively). The forthcoming Algorithm 4.1 is responsible for this step. Recall that $\{\Theta_n\}_{n\in\mathbb{Z}}$ is an i.i.d. sequence with $\Theta_n=(S_n,U_n,W_n,\Lambda_n)$ having independent components, where $S_n$ , $U_n$ , and $\Lambda_n$ are distributed as in Theorem 1.1 and $W_n\sim U(0,1)$ .
At time $n\in\mathbb{Z}$ , the dominating process D in (3.8) depends on three components: the sequence $ (\chi_{n}, \{ S_{k}\} _{k\in\mathcal{Z}_{\chi_{n}}^{0}}) $ , the all-time maximum $\sup_{k\in\mathcal{Z}^{n+1}} \{C_k\}$ and $C_n$ (via the reflected process R: see (3.6)–(3.7)) and the uniform random variables $ \{ U_{k}\} _{k\in\mathcal{Z}_{\chi_{n}}^{0}}$ . The time $\chi_n$ in (3.5) is the last time before n the random variables $ \{ S_{k}\}_{k\in\mathcal{Z}^{0}}$ exceed a certain adaptive exponential bound. Algorithm 4.2 for sampling $ (\chi_{n}, \{ S_{k}\} _{k\in\mathcal{Z}_{\chi_{n}}^{0}}) $ is given in Section 4.1 below. A sample for $(R_n,C_n)$ requires the joint forward simulation of the dual random walk −C and its ultimate maximum. This problem was solved in [Reference Blanchet and Sigman4]. The algorithm in [Reference Blanchet and Sigman4], stated for completeness as Algorithm 4.6 of Section 4.2 below for the random walk C in (3.6), requires the simulation of the walk under the exponential change of measure.
Since the increments of C are shifted negative exponential random variables under the original measure, they remain in the same class under the exponential change of measure, making the simulation in Algorithm 4.6 simple. Finally, heaving simulated (R,C) backwards in time, we need to recover the random variables $\Lambda_{k}$ and $U_{k}$ , conditional on the values of increments $F_k=d+(1/\alpha) \log(U_n \Lambda_n)$ we have observed. Algorithm 4.7 in Section 4.3 below describes this step.
Algorithm 4.1 (Backward simulation of $(\sigma,\{(D_{n},\Theta_{n})\}_{n\in \mathcal{Z}_{-\sigma}^{0}})$ )
1. Sample $\chi_{-1}$ and $\{S_k\}_{k\in \mathcal{Z}^0_{\chi_{-1}}}$ $\rhd$ Algorithm 4.2
2. Sample $\{(R_k,C_k,\Lambda_k,U_k)\}_{k\in \mathcal{Z}^0_{N_{-1}}}$ for some $N_{-1}\leq \chi_{-1}$ $\rhd$ Algorithms 4.6 and 4.7
3. Bundle up $\{\Theta_k\}_{k\in \mathcal{Z}^0_{\chi_{-1}}}$ and compute $D_{-1}$
4. Put $n\,:\!=-1$
5. while $D_n>a(\Theta_n)$ do
6. Put $n\,:\!=n-1$
7. Sample $\chi_{n}$ and $\{S_k\}_{k\in \mathcal{Z}^{\chi_{n+1}}_{\chi_n}}$ conditional on $(\chi_{n+1},\{S_k\}_{k\in \mathcal{Z}^{\chi_{n+1}}_{\chi_n}})$ $\rhd$ Algorithm 4.2
8. Sample $\{(R_k,C_k,\Lambda_k,U_k)\}_{k\in \mathcal{Z}^{N_{n+1}}_{N_n}}$ for some $N_n\leq \chi_n$ $\rhd$ Algorithms 4.6 and 4.7
9. Bundle up $\{\Theta_k\}_{k\in \mathcal{Z}^{\chi_{n+1}}_{\chi_n}}$ , and compute $D_n$
10. end while
11. Put $\sigma = -n$
return $(\sigma,\{ \Theta_{k}\}_{k\in \mathcal{Z}^0_{-\sigma}})$
The number of steps $N_{-1}$ (resp. $N_{n}$ ) in line 2 (resp. 8) of Algorithm 4.1 is random since Algorithm 4.6, which outputs the all-time maximum of the random walk, may need more values of the random walk than required to recover the previous value of the dominating process $D_{-1}$ (resp. $D_{n}$ ). (In the notation of Section 4.2 below, the integers $N_{n}$ take the form $\Delta (\tau_{m}) $ .) The running time of Algorithm 4.2 is random but has moments of all orders (see Lemma 4.1 in Section 4.1 below). Algorithm 4.7 executes a loop of length equal to the number of steps in the random walk C the algorithm is applied to, with each step sampling one Poisson and one beta random variable (see Section 4.3 below). Hence both Algorithms 4.2 and 4.5 are fast (see Section 5). Algorithm 4.6 of [Reference Blanchet and Sigman4] (see Section 4.2 below) runs Algorithms 4.3, 4.4, and 4.5 sequentially. Each of these algorithms is reliant on rejection sampling and has a finite expected running time, which is easy to quantify in terms of the increments of the walk C.
4.1 Simulation of $ (\chi_{n}, \{ S_{k}\} _{k\in\mathcal{Z}_{\chi_{n}}^{0}}) $
Consider independent Bernoulli random variables $\{J_{n}\}_{n=1}^\infty$ with computable $p_{n}=\mathbb{P}(J_{n}=0)$ , $n\geq 1$ , satisfying $\sum_{n=1}^\infty(1-p_{n})<\infty$ . By the Borel–Cantelli lemma, the random time $\tau=\sup\{n\geq0\colon J_n=1\}^+$ (with convention $\sup\emptyset =-\infty$ ) satisfies $\tau\in\mathbb{N}$ a.s. Clearly, $J_{n}=0$ for all $n>\tau$ , and $\{\tau<n\} =\bigcap_{k=n}^{\infty}\{J_{k}=0\}$ implies $\mathbb{P}(\tau<n)=\prod_{k=n}^{\infty}p_{k}$ . If there exists $n^{\ast}\geq1$ such that for all $n\geq n^{\ast}$ we have a positive computable lower bound $q_{n}\leq\prod_{k=n}^{\infty}p_{k}$ , then we can simulate $(\tau,\{J_k\}_{k\in\{0,\ldots,\tau\}})$ as follows.
Define the auxiliary function $F\colon (0,1) \times (0,1) \to \{ 0,1\} \times (0,1) $ by the formula
The following observation is simple but crucial: for any $p\in(0,1)$ and $U\sim U (0,1) $ , the components of the vector $(J,V) =F (U,p)$ are independent, J is Bernoulli with $\mathbb{P}(J=0)=p$ , and $V\sim U (0,1) $ .
Sample $ \{ J_{n}\} _{n\in\mathcal{Z}_1^{n^\ast}}$ and an independent $U^{ (n^{\ast}) }\sim U (0,1) $ . Let $ (J_{n^\ast},U^{ (n^\ast+1) }) =F (U^{ (n^\ast) },p_{n^\ast}) $ . Hence $J_{n^{\ast}}$ has the correct distribution and is independent of $U^{ (n^{\ast}+1) }\sim U(0,1)$ . Thus, $J_{n^{\ast}}$ is independent of $F (U^{ (n^{\ast}+1) },p_{n^{\ast}+1}) = (J_{n^{\ast}+1},U^{ (n^{\ast}+2) }) $ . Define recursively $ (J_{n},U^{ (n+1) }) =F (U^{ (n) },p_{n}) $ for $n\geq n^\ast+2$ and note that the sequence $ \{ J_{n}\}_{n\in\mathbb{N}}$ of Bernoulli random variables is i.i.d. Moreover, the sequence $\{U^{(n)}\}_{n\geq n^\ast}$ detects the value of $\tau$ since
Algorithm 4.2 (Simulation of $(\tau,\{J_k\}_{k\in\{1,\ldots,\tau\}})$ )
1. Sample $J_1,\ldots, J_{n^\ast-1}$ and put $n\,:\!=n^\ast-1$
2. Sample $U\sim U(0,1)$
3. loop
4. Put $n \,:\!= n+1$
5. if $U\gt{p_n}$ then
6. Put $J_n\,:\!=1$ and update $U\,:\!={(U-p_n)}/{(1-p_n)}$
7. else if $U \leq q_n$ then
8. Compute $\tau$ from $J_1,\ldots,J_{n-1}$ and exit loop
9. else
10. Put $J_n\,:\!=0$ and update $U\,:\!={U}/{p_n}$
11. end if
12. end loop
13. return $(\tau,\{J_k\}_{k\in\{1,\ldots,\tau\}})$
Algorithm 4.2 samples a single uniform random variable and performs a binary search. Its running time $\varsigma=\inf \{ n\geq n^{\ast}\colon U^{ (n) }\leq q_{n}\} \geq\tau+1$ (with convention $\inf\emptyset =\infty$ ) has the following properties.
(a) If $\lim_{n\to\infty}q_{n}=1$ then $\mathbb{P}(\varsigma\lt\infty)=1$ .
(b) If $\sum_{n=n^{\ast}}^{\infty} (1-q_{n}) \lt\infty$ then $\mathbb{E} \varsigma\lt\infty$ .
(c) If $\sum_{n=n^{\ast}}^{\infty} (1-q_{n}) \,\rm{\mathrm{e}}^{tn}\lt\infty$ for some $t>0$ , then $\mathbb{E} \,\rm{\mathrm{e}}^{t\varsigma}\lt\infty$ .
If $q_n p_{n-1}\geq q_{n-1}$ for $n>n^\ast$ , then the converses of (a), (b), and (c) are also true.
Remark 4.1. At the cost of more operations, one may always construct a sequence $\{q_n^\prime\}_{n=n^\ast}^\infty$ that satisfies (d). Indeed, let $q_{n^\ast}^\prime=q_{n^\ast}$ and define recursively $q_n^\prime = \max\{q_n,q^\prime_{n-1}/p_{n-1}\}$ for $n> n^\ast$ ; then these satisfy condition (d), are computable and inductively satisfy $q_{n}^\prime\leq \prod_{k=n}^\infty p_k$ for $n\geq n^\ast$ . This consideration shows that our conditions are sharp.
Proof. (a) For all $n\geq n^{\ast}$ we have $ \{ \varsigma\leq n\} \supseteq \{ U^{ (n) }\leq q_{n}\} $ ; then $\mathbb{P}(\varsigma>n)\leq\mathbb{P}(U^{(n)}>q_n)=1-q_{n}$ . Hence $\mathbb{P}(\varsigma=\infty)=\lim_{n\to\infty}\mathbb{P}(\varsigma>n) \leq\lim_{n\to\infty}(1-q_{n})=0$ and the sufficiency follows.
(b) Similarly,
and the claim follows.
(c) Note that
Exchanging the order of summation in the third equality of the following estimate implies (c):
(d) Condition (d) and the relation $(\tau+1)\vee n^\ast=\inf\{k\geq n^\ast\colon U^{(k)}\leq \prod_{j=k}^\infty p_j\}$ imply for $n\geq k\geq n^\ast$
Thus, a simple calculation yields
and the result follows from standard probability theory.
In Algorithm 4.1 we are required to sample $ (\chi_{0}, \{ S_{k}\} _{\mathcal{Z}_{\chi_{0}}^{0}}) $ , and then, iteratively for $n\in\mathcal{Z}^0$ , $\chi_{n}$ and the remaining $ \{ S_{k}\} _{k\in\mathcal{Z}_{\chi_{n}}^{\chi_{n+1}}}$ , given the known values $ (\chi_{n+1}, \{ S_{k}\} _{k\in\mathcal{Z}_{\chi_{n+1}}^{0}}) $ . To apply Algorithm 4.2, we need a computable lower bound on the product of probabilities $p (m) =\mathbb{P}(S_1\leq \rm{\mathrm{e}}^{\delta m})$ , $m\in\mathbb{N}$ . Recall the exponential lower bound on p(m) in (3.4) and define
(here $\lfloor x\rfloor=\sup\{n\in\mathbb{Z}\colon n\leq x\}$ for any $x\in\mathbb{R}$ ). Note that for any $m\geq m^{\ast}$ we have $\rm{\mathrm{e}}^{-\delta\gamma m}\mathbb{E} S_1^{\gamma}<1$ and may hence define
The inequality in (3.4) implies
Since for any $k\in\mathcal{Z}^{0}_{\chi_0}$ we have
Algorithm 4.2 can be applied (with $n^\ast=m^\ast$ ) to sample the sequence $ \{ I_{k}^{0}\}_{k\in\mathcal{Z}^{0}_{\chi_0}}$ . Moreover, for $m\in\mathbb{N}$ we get
Hence, for any $t\in(0,\delta\gamma)$ , Lemma 4.1(c) implies that the running time $\varsigma$ satisfies $\mathbb{E} [\rm{\mathrm{e}}^{\varsigma t}]<\infty$ and therefore possesses moments of all orders. Having obtained $ (\chi_{0}, \{ I_{k}^{0}\}_{k\in\mathcal{Z}^{0}_{\chi_0}}) $ , for $k\in\mathcal{Z}^{0}_{\chi_0}$ , we sample $S_{k}$ as $S^{+} (\alpha,\rho) $ conditional on $S_{k}\leq \rm{\mathrm{e}}^{-\delta (k+1) }$ (if $I_{k}^{0}=0$ ) or $S_{k}>\rm{\mathrm{e}}^{-\delta (k+1) }$ (if $I_{k}^{0}=1$ ), yielding a sample of $ (\chi_{n}, \{ S_{k}\} _{k\in\mathcal{Z}_{\chi_{n}}^{0}}) $ .
Assume now that we have already sampled $ (\chi_{n+1}, \{ S_{k}\} _{k\in\mathcal{Z}_{\chi_{n+1}}^{0}}) $ . The adaptive exponential bounds in the indicators $I^{n+1}_k$ and $I^n_k$ are different (see Figure 1) and the relevant probabilities take the form
Since $\{S_{1}\leq \rm{\mathrm{e}}^{\delta m}\} \subset \{S_{1}\leq \rm{\mathrm{e}}^{\delta (m+1)}\}$ , the inequality $p^{\prime} (m) \geq p (m) $ holds for any $m\in\mathbb{N}$ . Thus
and Algorithm 4.2 can be applied with $n^\ast=\max\{m^\ast,n-\chi_{n+1}\}$ . The same argument as above shows that the running time $\varsigma$ has moments of all orders.
4.2 Simulation of the random walk and its reflected process from [Reference Blanchet and Sigman4]
In this section we present an overview of the algorithm in [Reference Blanchet and Sigman4] for the joint simulation of (C,R) defined in (3.6)–(3.7). We refer to [Reference Blanchet and Sigman4] and [Reference Ensor and Glynn17] for the proofs (the latter paper contains the simulation algorithm for the ultimate maximum of a random walk with negative drift and provides a basis for the simulation algorithm in [Reference Blanchet and Sigman4]).
Let $\eta=\eta(d)$ be the unique positive root of $\psi_{d}(\eta)=0$ , where $\psi_{d}(t)=\log(\mathbb{E} \,\rm{\mathrm{e}}^{tF_0})=dt-\log(1+t/(\alpha\rho))$ . Note that
and $\eta =-\alpha\rho-W_{-1} ({-}\alpha\rho d\,\rm{\mathrm{e}}^{-\alpha\rho d}) /d$ , where $W_{-1}$ is the secondary branch of the Lambert W function. Since $\mathbb{E}[\exp(\eta F_n)]=1$ for all $n\in\mathbb{Z}$ , the process $\{ \exp(\eta C_{n})\}_{n\in\mathcal{Z}^{1}}$ is a positive backward martingale started at one, thus inducing a probability measure $\mathbb{P}^{\eta}$ on $\sigma$ -algebras $\sigma (C_{k};\,k\in\mathcal{Z}_{n}^{1}) $ , $n\in\mathcal{Z}^{1}$ , by the formula $\mathbb{P}^{\eta}(A)=\mathbb{E}[1_{A}\,\rm{\mathrm{e}}^{\eta C_{n}}]$ where $A\in\sigma (C_{k};\,k\in\mathcal{Z}_{n}^{1}) $ . Under $\mathbb{P}^{\eta}$ , the process C remains a random walk with i.i.d. increments satisfying $(\alpha\rho+\eta)(d-F_{n})\sim \operatorname{\rm{Exp}}(1)$ . Hence $\mathbb{E}^{\eta}[C_{-1}]=\psi_{d}^{\prime} (\eta) >0$ , implying $\lim_{n\to-\infty}C_{n}=\infty$ , $\mathbb{P}^\eta$ -a.s. by the strong law of large numbers.
For any $k\in\mathbb{Z}$ define (with convention $\sup \emptyset = -\infty$ )
For ease of notation we let $T_{x}=T_{x}^{0}$ . Let E be an independent exponential random variable with mean one. Then, for $x>0$ , we have $\mathbb{P} (R_{0}>x) =\mathbb{P}^{\eta} (L_{E/\eta}>x) $ , where $L_{x}=\inf \{ y\geq0\colon C_{T_{y}}>x\} $ is the right inverse of $x\mapsto C_{T_x}$ ; see e.g. [Reference Ensor and Glynn17]. Hence, for $x\in(0,x')$ , where $x'\leq\infty$ , sampling $1_{ \{ R_{0}>x\} }=1_{ \{ T_{x}>-\infty\} }$ , conditional on $1_{ \{ R_{0}\leq x'\} }=1_{ \{ T_{x'}=-\infty\} }$ , in finite time amounts to sampling E and $C_{-1},\ldots,C_{T_{E/\eta}}$ under $\mathbb{P}^{\eta}$ ; see Algorithm 4.3 below.
Algorithm 4.3. (Simulation of $1_{\{R_{0}\gt{x}\} }$ conditional on $\{ R_{0}\leq x^{\prime}\} $ )
Require: $\infty \geq x^\prime >x >0$
1. loop
2. Sample $E\sim \operatorname{\rm{Exp}}(1)$
3. if $E/\eta\leq x$ then
4. return 0
5. else
6. Sample $C_0=0,C_{-1},\ldots,C_{T_{E/\eta}}$ under $\mathbb{P}^\eta$
7. Compute $L_{E/\eta}$
8. if $L_{E/\eta}\leq x^\prime$ then $\rhd$ Accept sample
9. return $1_{\{L_{E/\eta}\gt{x}\}}$
10. end if
11. end if
12. end loop
Remark 4.2. Since $L_x\leq x$ , then the condition $E/\eta\leq x$ implies $L_{E/\eta}\leq x$ , thus identifying $1_{\{L_{E/\eta}\gt{x}\}}=0$ (see line 3) and saving the computational effort of running all subsequent lines. This algorithm repeats independent experiments with success probability $\mathbb{P}^\eta(L_{E/\eta}\leq x^\prime)>0$ . The expected running time of each iteration in the loop is bounded above by $(\eta^{-1}+d)/\psi'_d(\eta)$ ; see [Reference Ensor and Glynn17, equation (2.3)]. Hence the expected running time of Algorithm 4.3 is finite.
In Algorithm 4.6 below we need to sample the path of the random walk $\{C_k\}_{k\in\mathcal{Z}^1_{T_x}}$ conditioned on the event $ \{R_{0}\in(x,x')\} $ , where $0<x<x'\leq\infty$ . By a rejection sampling method under $\mathbb{P}^\eta$ and Algorithm 4.3 (see [Reference Blanchet and Sigman4, Lemma 3]), this can be achieved as follows.
Algorithm 4.4 (Simulation of $C_{0},\ldots,C_{T_{x}}$ conditional on $\{ T_{x}\gt-\infty=T_{x^{\prime}}\} $ )
Require: $\infty\geq x^\prime >x >0$
1. loop
2. Sample $C_0=0, C_{-1}, \ldots, C_{T_{x}}$ under $\mathbb{P}^\eta$
3. Given $C_{T_{x}}$ , sample independent $1_{\{R_0 ^\prime\leq x^\prime-C_{T_x}\}}$ and $U\sim U(0,1)$ $\rhd$ Algorithm 4.3
4. if $U \leq \exp({-}\eta C_{T_{x}})$ and $1_{\{R_0 ^\prime\leq x^\prime-C_{T_x}\}}=1$ then
$\rhd$ Accept sample
5. return $\{C_n\}_{n\in\mathcal{Z}_{T_x}^1}$
6. end if
7. end loop
Remark 4.3. Since $L_x\leq x$ , we have $\mathbb{P}(R_0\leq z)\geq \mathbb{P}(E/\eta\leq z)=1-\exp({-}z\eta)$ for all $z\geq0$ . Since the overshoot $C_{T_x}-x$ is in the interval (0,d), the expected running time of Algorithm 4.4 (i.e. one over the acceptance probability) is smaller than $\exp(\eta (x+d))/(1-\exp({-}\eta( x'-x-d))$ if $x'\gt{x+d}$ .
In Algorithm 4.6 we also need to simulate the path of the walk reaching a negative level −x, while staying below a given positive level forever. Algorithm 4.5 achieves this (see [Reference Blanchet and Sigman4, Lemma 3]). Its expected running time is bounded above by
Algorithm 4.5 (Simulation of $C_{0},\ldots,C_{T_{-x}}$ conditional on $ \{ T_{x^{\prime}}=-\infty\} $ )
Require: $x \in(0,\infty)$ and $x^\prime\in(0, \infty]$
1. loop
2. Sample $C_0=0, C_{-1}, \ldots, C_{T_{-x}}$ under $\mathbb{P}$
3. Given $C_{T_{-x}}$ , sample an independent
$1_{\{R_0 ^\prime\leq x^\prime-C_{T_{-x}}\}}$ $\rhd$ Algorithm 4.3
4. if $1_{\{R_0 ^\prime\leq x^\prime-C_{T_{-x}}\}}=1$ and $\max_{n\in\mathcal{Z}_{T_{-x}}^1}\{C_n\} \leq x^\prime$ then
$\rhd$ Accept sample
5. return $\{C_n\}_{n\in\mathcal{Z}_{T_{-x}}^1}$
6. end if
7. end loop
We now give a brief overview of the algorithm in [Reference Blanchet and Sigman4] for the simulation of $ \{ (C_{n},R_{n}) \} _{n\in\mathcal{Z}^{1}}$ . Pick $\kappa\gt\max\{\log(2)/(3\eta),1/(\alpha\rho)\}$ (see assumption in [Reference Blanchet and Sigman4, Proposition 3]). Blanchet and Sigman [Reference Blanchet and Sigman4] constructed sequences $\Delta= \{ \Delta (k) \} _{k\geq0}$ and $\tau= \{ \tau_{k}\}_{k\geq0}$ of decreasing negative and increasing positive times, respectively.
(i) At the start of each iteration of the algorithm we are given
\[ \Big( \{ \tau_{k}\} _{k\in \{ 0,\ldots,m\} },\ \{ \Delta (k) \} _{k\in \{ 0,\ldots,\tau_{m}\} },\ \{ C_{n}\}_{n\in\mathcal{Z}^1_{\Delta (\tau_{m}) }},\ \{ R_{n}\} _{n\in\mathcal{Z}^1_{\Delta (\tau_{m}-1) } }\Big) {.} \](ii) At each iteration we sample
\[ \Big(\tau_{m+1}, \{ \Delta (k) \} _{k\in \{ \tau_{m}+1,\ldots,\tau_{m+1}\} },\ \{ C_{n}\} _{n\in\mathcal{Z}^{\Delta (\tau_{m}) }_{\Delta (\tau_{m+1}) }},\ \{ R_{n}\}_{n\in\mathcal{Z}^{\Delta (\tau_{m}-1) }_{\Delta (\tau_{m+1}-1) }} \Big). \]
Note that at the mth iteration we have $\Delta (\tau_{m}) -\Delta (\tau_{m}-1) $ more values of the walk than of the reflected process. More precisely, the algorithm starts by setting $\Delta(0)=0$ and repeats the following steps: given $ \{ \tau_{k}\} _{k\in \{ 0,\ldots,m\} }$ and $ \{ \Delta(k)\} _{k\in \{ 0,\ldots,\tau_{m}\} }$ , then put $\Delta (\tau_{m}+1) =T_{-2\kappa}^{\Delta (\tau_{m}) }$ . Next, if $\Delta (k) $ is the last known value of $\Delta$ and if $R_{\Delta (k) }\gt\kappa$ , then put $\Delta (k+1) =T_{\kappa}^{\Delta (k) }$ and $\Delta (k+2) =T_{-2\kappa}^{\Delta (k+1) }$ . If instead $R_{\Delta (k) }\leq\kappa$ , then put $\tau_{m+1}=k$ . Repeat the previous two steps until we can compute $\tau_{m+1}$ , that is, until $R_{\Delta (k) }\leq\kappa$ . After computing $\tau_{m+1}$ go back and repeat. By construction (see Proposition 3 in [Reference Blanchet and Sigman4]), we have
Hence, we may compute $R_{n}$ , $n\in\mathcal{Z}_{\Delta (\tau_{m}-1) }^{1}$ , from the simulated values
Algorithm 4.6. (Simulation of the random walk and its reflected process)
Require $\kappa \gt \max\{{\log(2)}/{(3\eta)}, {1}/{(\alpha\rho)}\}$ , $d\in (0,1)$ , $\infty\geq x\gt{0}$ and $m\geq1$
$\rhd$ x is an upper bound for $R_0$
1. Put $t\,:\!=C_0\,:\!=\Delta(0)\,:\!=\tau_0\,:\!=0$
2. for $k\in\{1,\ldots,m\}$ do
3. Put $t\,:\!=\tau_{k-1}$
4. loop
Sample $C_{\Delta(t)-1}, \ldots, C_{T^{\Delta(t)}_{-2\kappa}}$ conditioned on $\{R_{\Delta(t)}<x-C_{\Delta(t)}\}$
$\rhd$ Algorithm 4.5
6. Put $\Delta(t+1)\,:\!=T^{\Delta(t)}_{-2\kappa}$ and $t\,:\!=t+1$
7. Sample $1_{\{R_{\Delta(t)}\gt\kappa\}}$ given $\{R_{\Delta(t)} \lt x-C_{\Delta(t)}\}$
$\rhd$ Algorithm 4.3
8. if $1_{\{R_{\Delta(t)}>\kappa\}}=1$ then
9. Sample $C_{\Delta(t)-1}, \ldots, C_{T^{\Delta(t)}_\kappa}$ from $\mathbb{P}^\eta$
$\rhd$ Algorithm 4.4
10. Put $\Delta(t+1)\,:\!=T^{\Delta(t)}_\kappa$ and $t\,:\!= t+1$
11. else
12. Put $x\,:\!=\kappa+C_{\Delta(t)}$ , $\tau_{k}\,:\!= t$ and exit loop
13. end if
14. end loop
15. end for
16. Compute $\{ R_{n}\}_{n\in\mathcal{Z}^1_{\Delta(\tau_{m}-1)} }$
17. return $\Big(\{ \tau_{k}\}_{k\in\{ 0,\ldots,m\}}, \{\Delta(k)\}_{k\in\{ 0,\ldots,\tau_{m}\}}, \{C_{n}\}_{n\in\mathcal{Z}^1_{\Delta(\tau_{m})}}, \{R_{n}\}_{n\in\mathcal{Z}^1_{\Delta(\tau_{m}-1)} }\Big)$
4.3 Sampling $(U_n,\Lambda_n)$ given $F_n$
Algorithm 4.1 requires knowledge of $\{(U_n,\Lambda_n)\}_{n\in\mathcal{Z}^0}$ , given the increments $\{F_n\}_{n\in\mathcal{Z}^0}$ of the random walk C. Since $\log (U_{n}\Lambda_{n}) =\alpha (F_{n}-d) $ for all $n\in\mathbb{Z}$ , by independence, we may restrict attention to $n=1$ . It follows from (2.6) above that $\Lambda_{1}\overset{d}{=}\prod_{i=2}^{T}U_{i}$ for an independent geometric random variable T with parameter $\rho$ on the positive integers (if $T=1$ the right-hand side is defined to equal one). Hence, by independence, we have $U_1 \Lambda_{1}\overset{d}{=}\prod_{i=1}^{T}U_{i}$ . By (2.7), $-\log \Lambda_1$ conditioned on being positive is exponential with mean $1/\rho$ . Hence, for any $n\geq1$ and $y>0$ we obtain
Thus the conditional law of $T-1$ given $\sum_{i=1}^{T}\log (U_{i}) =-y$ is Poisson with mean $ (1-\rho) y$ . If $T=1$ , then $-\log(U_1)=y$ and $\Lambda_1=1$ . If $T>1$ , then for $x\in(0,y)$ we get
Hence, conditional on $T=n$ and $\log (\prod_{i=1}^{T}U_{i}) =-y$ , the law of $-\pgfrac{1}{y}\log (U_{1}) $ is $\text{{beta}} (1,n-1) $ (understood as the Dirac measure $\delta_{1}$ when $n=1$ ). Finally we set $\Lambda_{1}=\exp (\alpha (F_1-d) ) /U_1$ .
Algorithm 4.7. (Simulation of $\{(U_{k},\Lambda_{k})\}_{k\in\mathcal{Z}_{m}^{n}}$ given $\{F_{k}\}_{k\in\mathcal{Z}_{m}^{n}}$ )
Require: $\{F_{k}\}_{k\in\mathcal{Z}_{m}^{n}}$ for $m,n\in\mathbb{Z}$ and $m< n$ .
1. for $k\in \mathcal{Z}^n_m$ do
2. Sample $T-1\sim \text{Poisson}({-}\alpha(F_{k}-d)(1-\rho))$
3. Sample $L\sim \text{{beta}}(1,T-1)$
4. Let $U_k\,:\!=\exp(L\alpha(F_k-d))$ and $\Lambda_k \,:\!= \exp((1-L)\alpha(F_{k}-d))$
5. end for
6. return $\{(U_{k},\Lambda_{k})\}_{k\in\mathcal{Z}_{m}^{n}}$
5. Implementation
Recall the definitions of the process $\{(C_n,F_n)\}_{n\in\mathbb{Z}}$ in 3.6, of $\{\Theta_n\}_{n\in\mathbb{Z}}$ in the first paragraph of Section 4 and of $\mathbb{P}^\eta$ in the second paragraph of Section 4.2. Before providing a concrete and concise algorithm and testing it, we will introduce a practical improvement based on a simple consideration.
Note that simulating the i.i.d. variables $\{\Theta_n\}_{n\in\mathcal{Z}^0}$ is clearly quicker and easier than employing the full machinery of our algorithms. Recall that the dominating process was introduced only to detect coalescence for the chain $\{X_n\}_{n\in\mathcal{Z}^0}$ . Thus, given $\{\Theta_n\}_{n\in\mathcal{Z}_{\Delta(0)}^0}$ for some burn-in parameter $\Delta(0)\in\mathcal{Z}^0$ and an upper bound $X^\prime_{\Delta(0)}=D_{\Delta(0)}\geq X_{\Delta(0)}$ (recall the definition of $\{D_n\}$ in (3.8)), one could recursively construct $X_{n+1}^\prime=\psi(X_n^\prime,\Theta_n)$ for $n\in\mathcal{Z}_{\Delta(0)}^{0}$ , and if any coalescence were detected, we would be certain that $X_0^\prime=X_0$ . Our objective is hence to take an appropriate $\Delta(0)$ that increases the probability $\mathbb{P}(X_0^\prime=X_0)$ . Algorithm 5.1 is a complete and compact simulation algorithm of $X_0$ , which makes use of this.
It is known that spectrally negative stable processes of infinite variation ( $\alpha>1$ and $\rho=1/\alpha$ ) satisfy $\overline{S}(\alpha,\rho)=S^+(\alpha,\rho)$ [Reference Michna25, Theorem 1]. As a simple application and sanity check, we now present a comparison between the empirical distribution function of $N=10^4$ samples and the actual distribution function in this case. To validate the samples, we compute the Kolmogorov–Smirnov statistic and test the hypothesis. (These graphs can be replicated following the guide available in [Reference González Cázares, Mijatovi and Uribe Bravo19].) In all three cases the null hypothesis of all samples coming from their respective distribution functions is not rejected (see Figure 2).
5.1. Parameter choice and numerical performance
As explicitly stated in Algorithm 5.1, and if one allows m* (recall its definition in paragraph 1, p. 14) to vary over $\lfloor\pgfrac{1}{(\delta\gamma)}\log\mathbb{E} S_1^\gamma\rfloor^++\mathbb{N}$ , our simulation procedure has six different parameters. A full theoretical optimization is infeasible as it heavily depends on, among other things, the way the algorithm is coded, the computational cost of simulating each variable, the cost of each calculation, memory accessing cost, the quality and state of the RAM and $(\alpha,\rho)$ . However, for the sake of presenting its practical feasibility, we have implemented the algorithm in the Julia programming language (see [Reference González Cázares, Mijatovi and Uribe Bravo19]) and run it on a macOS Mojave 10.14.3 (18D109) with a 4.2 GHz Intel Core i7 processor and an 8 GB 2400 MHz DDR4 memory. This implementation is far from optimal, but still outputs 104 samples in approximately 1.15 seconds (without multi-threading) for the suggested parameters $(d,\delta,\gamma,\kappa,\Delta(0),m^\ast)=\varpi$ where
This performance varies slightly for different choices of $(\alpha,\rho)$ . To put things in perspective, Algorithm 4.7 outputs, for the parameter choice $\varpi$ , 106 samples in approximately 0.4322 seconds and drawing 106 samples from $S^+(\alpha,\rho)$ takes 0.1833 seconds. On the other hand, the first iteration of Algorithm 4.2 (which simulates the indicators $\{I_k^0\}_{k\in\mathcal{Z}^0_{\chi_0}}$ and the conditionally positive stable random variables $\{S_k\}_{k\in\mathcal{Z}^0_{\chi_0}}$ ) simulates 104 samples in about 0.8125 seconds and is, although fast, the most computationally costly component of Algorithm 5.1. The main sources of this cost are the calculation of the probabilities {p(m)} (see their definition in (3.4)) and the simulation of $\{S_k\}_{k\in\mathcal{Z}^0_{\chi_0}}$ conditioned on the values of $\{I_k^0\}_{k\in\mathcal{Z}^0_{\chi_0}}$ .
Algorithm 5.1 (Perfect simulation of $X_0\overset{d}{=}\overline{Y}_1$ )
Require: Parameters
1. Put $x\,:\!=\infty$ , $t\,:\!=1$ ,
$s\,:\!=\Delta(0)$ , and $m\,:\!=n\,:\!=\Delta(0)+1$
$\rhd$ x is an upper bound on $\{C_k\}_{k\in\mathcal{Z}^{\Delta(0)}}$
2. Sample $\{\Theta_k\}_{k\in\mathcal{Z}^0_{\Delta(0)}}$
$\rhd$ Recall its definition in Section 4, paragraph 1
3. loop
4. Sample $(\chi_{m-1}, \{S_k\}_{k\in\mathcal{Z}_{\chi_{m-1}}^{s}})$ $\rhd$ Algorithm 4.2
5. while $n = m$ or $\Delta(t) \gt \chi_{m-1}$ do
6. Sample $C_{\Delta(t)}, \ldots, C_{T^{\Delta(t)}_{-2\kappa}}$ conditional on $\{R_{\Delta(t)}<x-C_{\Delta(t)}\}$
$\rhd$ Algorithm 4.5
7. Put $\Delta(t+1)\,:\!=T^{\Delta(t)}_{-2\kappa}$ and $t\,:\!=t+1$
$\rhd$ Recall its definition in (4.1)
8. Sample $1_{\{R_{\Delta(t)}\gt\kappa\}}$ given $\{R_{\Delta(t)} \lt x-C_{\Delta(t)}\}$
$\rhd$ Algorithm 4.3
9. if $1_{\{R_{\Delta(t)}\gt\kappa\}}=0$ then
10. Compute $\{ R_{k}\}_{k\in\mathcal{Z}^n_{\Delta(t-1)}}$ and put $n\,:\!=\Delta(t-1)$ and $x\,:\!=C_{\Delta(t)}+\kappa$
11. else
12. Sample $C_{\Delta(t)-1}, \ldots, C_{T_\kappa^{\Delta(t)}}$ from $\mathbb{P}^\eta$
$\rhd$ Algorithm 4.4
13. Put $\Delta(t+1)\,:\!=T_\kappa^{\Delta(t)}$ and $t\,:\!= t+1$
14. end if
15. end while
16. Sample $\{(U_k,\Lambda_k)\}_{k\in\mathcal{Z}_{\chi_{m-1}}^{s}}$ from $\{F_{k}\}_{k\in\mathcal{Z}_{\chi_{m -1}}^{s}}$ and put $s\,:\!=\chi_{m-1}$ $\rhd$ Algorithm 4.7
17. Compute $D_{m-1}$ and put $m\,:\!=m-1$
$\rhd$ Recall its definition in (3.8)
18. if $D_{m}\leq a(\Theta_{m})$ then
19. return $X_0\,:\!=\psi(\cdots\psi(D_{m},\Theta_{m}),\ldots,\Theta_{-1})$ $\rhd$
In this case $\sigma=m$
20. else if $m=\Delta(0)$ then
21. Put $X_0\,:\!=\psi(\cdots\psi(D_m,\Theta_m),\ldots,\Theta_{-1})$
22. if coalescence was detected then
23. return $X_0$
24. end if
25. end if
26. end loop
Next we show the local marginal behaviour of the number of samples output with confidence intervals, for a few different choices of parameters $(\alpha,\rho)$ . We will see that, although $\varpi$ may not be optimal, it is a simple and yet efficient choice. Moreover, the variation in performance for parameters close to this one is small, thus showing that this choice is relatively robust.
It should be noted that the data presented in Figure 3 are dependent on the characteristics of the hardware and software used. Hence, these exact numbers are not easily replicated. For instance, these times scale sublinearly as a function of the batch size, and are not replicated despite using the garbage collector and the same random seed. It is readily seen that the exact value of the parameters d, $\delta$ , $\Delta(0)$ , and m* is not too important in so far as they remain at a reasonable distance from their boundaries (where $\infty$ is a right-boundary for $\Delta(0)$ and m*). The value of $\kappa$ is slightly more sensitive, as is $\gamma$ . Other choices of $(\alpha,\rho)$ have slightly different behaviours. The shapes of these curves are similar, but the apparent minima change. Thus, we argue that $\varpi$ is a simple yet sensible choice.
Appendix A. Sampling the marginals of stable processes
A Lévy process $Y=(Y_{t})_{t\in[0,\infty)}$ in $\mathbb{R}$ is strictly stable with index $\alpha\in(0,2]$ if, for any constant $c\geq0$ , the processes $ (Y_{ct}) _{t\in[0,\infty)}$ and $ (c^{1/\alpha}Y_{t}) _{t\in[0,\infty)}$ have the same law. For brevity, we call Y a stable process. Sampling the increments of Y hence reduces to sampling $Y_{1}$ . Using Zolotarev’s (C) form [Reference Uchaikin and Zolotarev30], up to a scaling constant the law of $Y_{1}$ is parametrized by $ (\alpha,\beta) \in (0,2]\times [-1,1]$ via
and sgn(t) equals 1 (resp. −1) if $t\geq0$ (resp. $t\lt{0}$ ). The Mellin transform of $Y_{1}$ equals
where $\rho=\gpfrac{1+\theta}{2}$ and $\Gamma(\!\cdot\!)$ denotes the gamma function (see [Reference Uchaikin and Zolotarev30] Section 5.6). Taking $s=0$ in (A.2) implies that the stable law is uniquely determined by $\alpha$ and its positivity parameter $\rho=\mathbb{P} (Y_{1}\gt{0})$ . If $\alpha\gt{1}$ , the pair $(\alpha,\rho) \in(0,2]\times[0,1]$ must satisfy $\rho\in [1-\frac{1}{\alpha},\frac{1}{\alpha}] $ , since $\theta\in[1-\frac{2}{\alpha},\frac{2}{\alpha}-1]$ .
Let $S (\alpha,\rho) $ and $S^{+} (\alpha,\rho) $ denote the laws of $Y_{1}$ and $Y_{1}$ conditioned on being positive, respectively. As $\rho,\alpha\rho\in[0,1]$ and the Mellin transform determines the law uniquely, (A.2) implies that $ (Z'/Z'') ^{\rho}$ follows $S^{+} (\alpha,\rho) $ , where $Z'\sim S (\alpha\rho,1) $ and $Z''\sim S (\rho,1) $ are independent. Since $P'B+P'' (1-B) $ follows $S (\alpha,\rho) $ , where $P'\sim S^{+} (\alpha,\rho) $ , $P'\sim S^{+} (\alpha,1-\rho) $ , and $B\sim \operatorname{\rm{Ber}} (\rho) $ are independent, we only need to be able to simulate a positive stable random variable with law $S (\alpha,1) $ for any $\alpha\in(0,1]$ . If $\alpha=1$ , then by (A.1), $Y_{1}$ is a constant equal to one. If $\alpha\in(0,1)$ , Kanter’s factorization states
where E is exponential with mean one, independent of U, which is uniform on (0,1) (see [30, Section 4.4]). For alternative ways of sampling from the laws $S (\alpha,\rho) $ and $S^{+} (\alpha,\rho)$ we refer to [Reference Devroye and James15].
Acknowledgements
JGC and AM are supported by The Alan Turing Institute under EPSRC grant EP/N510129/1; AM is supported by EPSRC grant EP/P003818/1 and the Turing Fellowship funded by the Programme on Data-Centric Engineering of Lloyd’s Register Foundation; GUB is supported by CoNaCyT grant FC-2016-1946 and UNAM-DGAPA-PAPIIT grant IN115217; JGC is supported by CoNaCyT scholarship 2018-000009-01EXTF-00624. We thank Stephen Connor for the reference [Reference Cloud and Huber9].