Hostname: page-component-76fb5796d-vvkck Total loading time: 0 Render date: 2024-04-25T11:06:20.797Z Has data issue: false hasContentIssue false

Quantile mechanics II: changes of variables in Monte Carlo methods and GPU-optimised normal quantiles

Published online by Cambridge University Press:  24 January 2014

WILLIAM T. SHAW
Affiliation:
Department of Mathematics, University College London, Gower Street, London WC1E 6BT, UK email: w.shaw@ucl.ac.uk
THOMAS LUU
Affiliation:
Department of Mathematics, University College London, Gower Street, London WC1E 6BT, UK email: t.luu@ucl.ac.uk
NICK BRICKMAN
Affiliation:
20 Racton Road London SW6 1LP, UK email: nick@taylorbrickman.co.uk

Abstract

With financial modelling requiring a better understanding of model risk, it is helpful to be able to vary assumptions about underlying probability distributions in an efficient manner, preferably without the noise induced by resampling distributions managed by Monte Carlo methods. This paper presents differential equations and solution methods for the functions of the form Q(x) = F−1(G(x)), where F and G are cumulative distribution functions. Such functions allow the direct recycling of Monte Carlo samples from one distribution into samples from another. The method may be developed analytically for certain special cases, and illuminate the idea that it is a more precise form of the traditional Cornish–Fisher expansion. In this manner the model risk of distributional risk may be assessed free of the Monte Carlo noise associated with resampling. The method may also be regarded as providing both analytical and numerical bases for doing more precise Cornish–Fisher transformations. Examples are given of equations for converting normal samples to Student t, and converting exponential to normal. In the case of the normal distribution, the change of variables employed allows the sampling to take place to good accuracy based on a single rational approximation over a very wide range of sample space. The avoidance of branching statements is of use in optimal graphics processing unit (GPU) computations as it avoids the effect of branch divergence. We give a branch-free normal quantile that offers performance improvements in a GPU environment while retaining the best precision characteristics of well-known methods. We also offer models with low probability branch divergence. Comparisons of new and existing forms are made on Nvidia GeForce GTX Titan and Tesla C2050 GPUs. We argue that in both single- and double-precisions, the change-of-variables approach offers the most GPU-optimal Gaussian quantile yet, working faster than the Cuda 5.5 built-in function.

Type
Papers
Copyright
Copyright © Cambridge University Press 2014 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

[1]Acklam, P. J. (2003) An algorithm for computing the inverse normal cumulative distribution function [online]. URL: http://home.online.no/~pjacklam/notes/invnorm/. Accessed on 7 January 2009.Google Scholar
[2]Abramowitz, M. & Stegun, I. A. (1975) Handbook of Mathematical Functions, Dover, New York.Google Scholar
[3]Albanese, C., Ziegler, G., Sayers, D. & Giles, M. (November 2008) Presentations of workshop on GPU computing in finance, King's College London [online]. Workshop home page URL: http://www.level3finance.com/gpuworkshop.html. Accessed on 8 January 2009.Google Scholar
[4]Fergusson, K. & Platen, E. (March 2006) On the distributional characterization of daily log-returns of a world stock index. Appl. Math. Finance 13 (1), 1938.Google Scholar
[5]Gilchrist, W. (2000) Statistical Modelling with Quantile Functions, CRC Press, Boca Raton, FL.CrossRefGoogle Scholar
[6]Giles, M. B. (2011) Approximating the erfinv function. In: Hwu, Wen-mei W. (editor), GPU Computing Gems, Vol. 2, Morgan Kaufmann, Burlington, MA, pp. 109116.Google Scholar
[7]Glasserman, P. (2004) Monte Carlo Methods in Financial Engineering, Springer, New York, NY.Google Scholar
[8]Hill, G. W. & Davis, A. W. (1968) Generalized asymptotic expansions of Cornish-Fisher type. Ann. Math. Stat. 39 (4), 12641273.Google Scholar
[9]Mikosch, T. (2006) Copulas: Tales and facts. Extremes 9, 320.Google Scholar
[10]Moro, B. (1995) The full monte. RISK 8(February), 5758.Google Scholar
[11]Nvidia, C. (2013) CUDA C Programming Guide[online]. URL: http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html. Accessed on 7 October 2013.Google Scholar
[12]Nvidia, C. (2013) CUDA Parallel Computing [online]. URL: http://www.nvidia.co.uk/object/cuda-parallel-computing-uk.html. Accessed on 7 October 2013.Google Scholar
[13]Ralston, A. & Rabinowitz, P. (1987) First Course in Numerical Analysis, McGraw-Hill, New York, NY.Google Scholar
[14]Shaw, W. T. (2006) Sampling Student's T distribution – use of the inverse cumulative distribution function. J. Comput. Finance 9 (4), 3773.Google Scholar
[15]Shaw, W. T. (2007) Refinement of the normal quantile, simple improvements to the Beasley-Springer-Moro method of simulating the normal distribution, and a comparison with Acklam's method and Wichura's AS241 [online]. URL: http://www.mth.kcl.ac.uk/~shaww/web_page/papers/NormalQuantile1.pdf. Accessed on 15 February 2009.Google Scholar
[16]Shaw, W. T. & Brickman, N. (2009) [online]. URL: http://arxiv.org/abs/0901.0638v3. Accessed on 2 December 2011.Google Scholar
[17]Shaw, W. T. & Buckley, I. R. C. (March 2007) The alchemy of probability distributions: Beyond Gram-Charlier expansions, and a skew-kurtotic-normal distribution from a rank transmutation map. Presented at the First IMA Conference on Computational Finance[online]. URL: http://arxiv.org/abs/0901.0434v1. Accessed on 10 December 2008.Google Scholar
[18]Steinbrecher, G. & Shaw, W. T. (2008) Quantile mechanics. Eur. J. Appl. Math. 19 (2), 87112.Google Scholar
[19]Wichura, M. J. (1988) Algorithm AS 241: The percentage points of the normal distribution. Appl. Stat. 37, 477484.CrossRefGoogle Scholar
[20]Wikipedia. (2008) “Quantile function” [online]. URL: http://en.wikipedia.org/wiki/Quantile_function. Accessed on 5 November 2008.Google Scholar
[21]Wikipedia. (2009) “Probit” [online]. URL: http://en.wikipedia.org/wiki/Probit. Accessed on 6 January 2009.Google Scholar