Abstract
The Hartman–Watson distribution is an infinitely divisible probability law on the positive half-axis whose density is difficult to evaluate near zero. We compare three different methods to evaluate this density and show that the straightforward implementation along Yor’s explicit formula can be improved significantly by resorting to dedicated Laplace inversion algorithms. In particular, the best method seems to be an approach that is specifically designed for distributions from the Bondesson class, to which the Hartman–Watson distribution belongs. The latter approach can furthermore be extended to yield an efficient Laplace inversion algorithm for evaluating the distribution function of the Hartman–Watson law.
You have full access to this open access chapter, Download conference paper PDF
Similar content being viewed by others
Keywords
Mathematics Subject Classification (2000)
1 Introduction
In the process of studying the probability distribution of the integral over a geometric Brownian motion, [14] introduced the function
for \(r,x>0\). Denoting by
the modified Bessel function of the first kind, the function \(f_r(x):= \theta (r,x)/I_0(r)\), \(x >0,\,r>0\), is the density of a one-parametric probability law, say \(\mu _r\), on the positive half-axis, called the Hartman–Watson law. The Hartman–Watson law arises as the first hitting time of certain diffusion processes, see [10], and is of paramount interest in mathematical finance in the context of Asian option pricing, see [2, 6, 14]. It was shown in [7] that this law is infinitely divisible with Laplace transform given by \(\varphi _r(u):= I_{\sqrt{2\,u}}(r)/I_0(r)\), \(u \ge 0\). Moreover, it follows from a result in [10] that \(\mu _r\) is not only infinitely divisible, but even within the so-called Bondesson class, which is a large subfamily of infinitely divisible laws that is introduced in and named after [5]. Notice in particular that it follows from this fact together with ([13, Theorem 6.2, p. 49]) that the function \(\varPsi _r(u):=-\log \big ( I_{\sqrt{2\,u}}(r)/I_0(r) \big )\), \(u \ge 0\), is a so-called complete Bernstein function, which allows for a holomorphic extension to the sliced complex plane \(\mathbb {C} \setminus (-\infty ,0)\). We will make use of this observation in Sect. 5.
It is well-known that the numerical evaluation of the density of the Hartman–Watson law near zero is a challenging task because the integrand in the formula for \(\theta (r,x)\) is highly oscillating. The following sections discuss several methods to evaluate the function \(\theta (r,x)\) accurately. Figure 1 visualizes the function \(\theta (r,x)\) for three different parameters \(r\) and values \(x \in (0.15,4)\), where all numerical computation routines discussed in the present note yield exactly the same result.
When looking at Fig. 1, mathematical intuition suggests that the approximation \(\theta (0.5,x) \approx 0\) for \(x<0.15\) might be a pragmatic—and numerically efficient—implementation close to zero. Nevertheless, [9] considers the numerical evaluation close to zero and obtains significant errors, see Sect. 3. Moreover, [6] studies the asymptotic behavior of \(f_r(x)\) as \(x \downarrow 0\) and [2] study the behavior of the distribution function \(F_{r}\) of \(\mu _r\) as the argument tends to zero. We like to mention that the right tail of the Hartman–Watson distribution \(\mu _{r}\) becomes extremely heavy as \(r \downarrow 0\). For instance, the distribution function \(F_r(x)=\int _{0}^{x}f_r(t)\,\mathrm{d}t\) is still significantly smaller than \(1\) for \(x=10\) and different \(r\), see Fig. 1.
The remaining article is organized as follows. Section 2 illustrates the occurrence of the Hartman–Watson distribution, in particular, in mathematical finance. Section 3 discusses the direct implementation of Formula (1). Section 4 proposes the use of the Gaver–Stehfest Laplace inversion technique. Section 5 proposes a complex Laplace inversion algorithm to numerically evaluate \(f_r\) and \(F_r\). Finally, Sect. 6 concludes.
2 Occurrence of the Hartman–Watson Law
The most prominent occurrence of the Hartman–Watson distribution is probably in directional statistics (see [8]): if \(\mathbf W _t\) denotes a two-dimensional Brownian motion on the unit circle and \(\tau \sim \mu _r\) is independent thereof, then \(\mathbf W _{\tau }\) has the same law as \((\cos (X),\sin (X))\), where \(X\) follows the so-called von Mises distribution with parameter \(r\), which has density given by
The von Mises distribution is the most prominent law for an angle in the field of directional statistics, because it constitutes a tractable approximation to the “wrapped normal distribution” (i.e., the law of \(Y\) mod \(2\,\pi \) when \(Y\) is normal), which is difficult to work with.
The importance of the Hartman–Watson distribution in the context of mathematical finance originates from the fact that
where \(W_t\) denotes standard Brownian motion and \(A_t=\int _{0}^{t}e^{2\,W_s}\,\mathrm{ds}\) an associated integrated geometric Brownian motion, see [14]. The process \(A_t\), and hence the Hartman–Watson distribution, naturally enters the scene when Asian stock derivatives, i.e., derivatives with “averaging periods,” are considered in the Black–Scholes world, see, e.g., [2, 9]. Another example, which is mathematically based on the exactly same reasoning, has recently been given in [3]: when the Black–Scholes model is enhanced by the introduction of stochastic repo margins, this leads to a convexity adjustment for all kinds of stock derivatives which involves the density of the Hartman–Watson distribution.
Let us furthermore briefly sketch a potential third application, which uses a stochastic representation for the Hartman–Watson law. Consider a diffusion process \(\{X_t\}_{t \ge 0}\) satisfying the SDE
This explodes with probability one, as can be seen from Feller‘s test for explosion (the drift increases rapidly), i.e., there exists a stopping time \(\tau \in (0,\infty )\) such that paths of \(\{X_t\}\) are well defined on \([0,\tau )\) and \(\lim _{t \uparrow \tau }X_t = \infty \) almost surely. Such explosive diffusions are used to model fatigue failures in solid materials. \(X_t\) describes the evolution of the length of the longest crack and \(\tau \) is the time point of ultimate damage. Kent [10] shows that \(\tau \sim \mu _r\). We may rewrite \(\tau \) as the first hitting time of zero of the stochastic process \(Y_t:=1/X_t\), starting at \(Y_0=1/r>0\). Observing the stock price \(S_0>0\) of a highly distressed company facing bankruptcy, it might now make sense to model the evolution of this company‘s stock price until default as \(S_t:=Y_t\) setting \(r:=1/S_0\). The time of bankruptcy is defined as the first time the stock price hits zero, which has a Hartman–Watson law. A similar model, assuming \(S_t\) to follow a CEV process that is allowed to diffuse to zero, is applied in [1].
3 Straightforward Implementation Based on Formula (1)
Regarding the exact numerical evaluation of the Hartman–Watson density, the article [9] shows that a straightforward numerical implementation of the Formula (1) for \(r=0.5\) and \(x \in [0.125,0.15]\) yields significant numerical errors. In particular, Fig. 2 in [9] shows that one ends up with negative density values. We come to the same conclusion, see Fig. 2.
4 Evaluation via Gaver–Stehfest Laplace Inversion
We apply the Gaver–Stehfest algorithm in order to obtain \(\theta (r,\cdot )\) from its Laplace transform \( I_{\sqrt{2\,\cdot }}(r)\) via Laplace inversion for fixed values of \(r\). For a rigorous proof and a good explanation of this method, see [11]. In particular, it is not difficult to observe from Yor‘s expression (1) that ([11] Theorem 1(iii)) applies, which justifies the approximation
for \(n \in \mathbb {N}\) large enough, where for \(j=1,\ldots ,2n\) we have
The Gaver–Stehfest algorithm has the nice feature that only evaluations of the Laplace transform on the positive half-axis are required. In particular, the required modified Bessel function \(I_{\sqrt{2\,u}}(r)\) is efficient and easy to compute for \(u>0\). In MATLAB, it is available as the built-in function besseli. The drawback of the Gaver–Stehfest algorithm is that it requires high-precision arithmetic because the involved constants \(a_k(n)\) are alternating and become huge and difficult to evaluate. For practical implementations, this prevents the use of large \(n\), which would theoretically be desirable due to the convergence result of [11]. Nevertheless, our empirical investigation shows that \(n=10\) is still feasible on a standard PC without further precision arithmetic considerations and yields reasonable results for the considered parameterization. However, for larger values of \(r\), the algorithm is less stable as can be seen at the end of Sect. 5.
The obtained values of \(\theta (r,x)\) are visualized in Fig. 3. Comparing them to the brute force implementation in Fig. 2, the error for small \(x\) becomes significantly smaller.
5 Evaluation via a Complex Laplace Inversion Method for the Bondesson Class
As already mentioned in the introduction, the Hartman–Watson law is in the Bondesson class which allows to apply a Laplace inversion algorithm specifically derived for such distributions in [4]. Furthermore, this method has the advantage that it immediately implies as a corollary a similar formula for the distribution function \(F_r\). To be precise, we have the formula
with arbitrary parameters \(a,b>0\) and \(M>2/(a\,x)\), and this integral is a proper Riemannian integral, since the integrand vanishes for \(v \downarrow 0\), see [4]. Regarding the choice of the parameters, [4] have shown that \(a=1/x, \, M=3\) is usually a good choice and we will use these parameters. Concerning the remaining parameter \(b\), we choose \(b=a\). For the evaluation of the distribution function \(F_r\), it is also shown in [4] that
with the same parameter restrictions as above. One particular challenge with this method is that the modified Bessel function \(I_{\nu }\) needs to be evaluated for complex \(\nu \). A straightforward implementation sufficient for our needs is achieved by using the partial sums related to the representation in Eq. (2). It has the advantage that error bounds can be computed, as for \(r>0\) and \(S_{n}^{\nu }(r):=\sum _{m=0}^{n}\frac{1}{m!\,\Gamma (m\,+\,\nu \,+\,1)}\,( \frac{r}{2})^{2\,m\,+\,\nu }\), one can compute
Using the Gamma functional equation \(\Gamma (z+1)=\Gamma (z)\,z\), it is easy to see that \(\vert \Gamma (z+1) \vert \ge \vert \Gamma (z) \vert \) for \(\vert z \vert \ge 1\). Thus, for \(n\ge -\mathrm{Re }(\nu )-1\), the sequence \(\{\vert \Gamma (m+\nu +1)\vert \}_{m=n+1,n+2,\ldots }\) is increasing, yielding
where the series term is the residual of the Taylor expansion of \(\exp (-r^{2}/4)\), which allows for a closed-form estimate. Consequently, one is able to choose \(n\) such that the modified Bessel function is approximated up to a given accuracy. Using the Gamma functional equation, one has to compute the complex Gamma function only once which further increases efficiency. The complex Gamma function is computed using the Lanczos approximation, see [12].Footnote 1
Figure 4 shows the resulting values of \(\theta (r,x)\), where the modified Bessel function is approximated with accuracy \(10^{-6}\). Formula (4) is evaluated in MATLAB applying the built-in adaptive quadrature routine quadgk. Comparing the results to the Gaver–Stehfest inversion, the error for small \(x\) is again significantly reduced and the results can be even improved by further increasing the accuracy of the modified Bessel function.
A second comparison of the presented methods is included for a larger value of \(r\). The Laplace inversion method for the Bondesson class represents the most stable and accurate algorithm as can be seen in Fig. 5, which visualizes the values of \(\theta (r,x)\) for small \(x\) and \(r=3\). Whereas the straightforward implementation based on Formula (1) fails due to numerical problems and the choice \(n=10\) is not ideal for the Gaver–Stehfest Laplace inversion, the Bondesson method yields stable results.
6 Conclusion
We compared three different methods to numerically evaluate the density of the Hartman–Watson law. We found that Laplace inversion algorithms significantly outperform direct implementation of Yor‘s formula (1). Moreover, a dedicated algorithm for distributions of the Bondesson class was proposed to numerically evaluate the distribution function of the Hartman–Watson law efficiently.
Notes
- 1.
We use the implementation of P. Godfrey published on http://www.mathworks.com/matlabcentral/fileexchange/3572-gamma.
References
Atlan, M., Leblanc, B.: Hybrid equity-credit modelling. Risk Magazine August: 61–66 (2005)
Barrieu, P., Rouault, A., Yor, M.: A study of the Hartman-Watson distribution motivated by numerical problems related to the pricing of Asian options. J. Appl. Probab. 41, 1049–1058 (2004)
Bernhart, G., Mai, J.-F.: On convexity adjustments for stock derivatives due to stochastic repo margins. Working paper (2014)
Bernhart, G., Mai, J.-F., Schenk, S., Scherer M.: The density for distributions of the Bondesson class. J. Comput. Financ. (2014, to appear)
Bondesson, L.: Classes of infinitely divisible distributions and densities: Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete 57, 39–71 (1981)
Gerhold, S.: The Hartman–Watson distribution revisited: asymptotics for pricing Asian options. J. Appl. Probab. 48(3), 892–899 (2011)
Hartman, P.: Completely monotone families of solutions of nth order linear differential equations and infinitely divisible distributions. Ann. Scuola Norm. Sup. Pisa 4(3), 267–287 (1976)
Hartman, P., Watson, G.: “Normal” distribution functions on spheres and the modified Bessel functions. Ann. Probab. 5, 582–585 (1974)
Ishiyama, K.: Methods for evaluating density functions of exponential functionals represented as integrals of geometric Brownian motion. Methodol. Comput. Appl. Probab. 7, 271–283 (2005)
Kent, J.T.: The spectral decomposition of a diffusion hitting time. Ann. Probab. 10(1), 207–219 (1982)
Kuznetsov, A.: On the convergence of the Gaver–Stehfest algorithm. SIAM J. Numer. Anal. (2013, forthcoming)
Lanczos, C.: A precision approximation of the gamma function. J. Soc. Ind. Appl. Math. Ser. B Numer. Anal. 1, 86–96 (1964)
Schilling, R.L., Song, R., Vondracek Z. Bernstein Functions. Studies in Mathematics, Vol. 37, de Gruyter, Berlin. (2010)
Yor, M.: On some exponential functionals of Brownian motion. Adv. Appl. Probab. 24(3), 509–531 (1992)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Open Access This chapter is distributed under the terms of the Creative Commons Attribution Noncommercial License, which permits any noncommercial use, distribution, and reproduction in any medium, provided the original author(s) and source are credited.
Copyright information
© 2015 The Author(s)
About this paper
Cite this paper
Bernhart, G., Mai, JF. (2015). A Note on the Numerical Evaluation of the Hartman–Watson Density and Distribution Function. In: Glau, K., Scherer, M., Zagst, R. (eds) Innovations in Quantitative Risk Management. Springer Proceedings in Mathematics & Statistics, vol 99. Springer, Cham. https://doi.org/10.1007/978-3-319-09114-3_19
Download citation
DOI: https://doi.org/10.1007/978-3-319-09114-3_19
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-09113-6
Online ISBN: 978-3-319-09114-3
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)