Quantitative Finance Collector is a blog on Quantitative finance analysis, financial engineering methods in mathematical finance focusing on derivative pricing, quantitative trading and quantitative risk management. Random thoughts on financial markets and personal staff are posted at the sub personal blog.

Sep 19

Peter J Acklam inverse normal cumulative distribution

Posted by abiao at 13:23 | Code » Code site | Comments(0) | Reads(24195)
Random number generation is essential for Monte Carlo simulation, among random numbers, normal distributed numbers are undoubtedly the most widely used ones, here comes the problem, for a given uniform random numbers series, how do you compute the inverse normal cumulative distribution function?

I once introduced Moro inverse normal function for this purpose, here is another power function named Peter J Acklam inverse normal cumulative distribution, for my study and work i have tried both but couldnot decide which one is better, here i quote the sentence from the book "Monte carlo methos in finance" by Peter Jackel: Equally, for the inverse cumulative normal function z = N'(p), there are several numerical implementations providing different degrees of accuracy and efficiency. A very fast and accurate approximation is the one given by Boris Moro in [Mor95]. The most accurate whilst still highly efficient implementation currently freely available, however, is probably the algorithm by Peter Acklam. when allowing for an additional evaluation of a machine-accurate cumulative normal distribution function, Acklam’s procedure is able to produce the inverse cumulative normal function to full machine accuracy by applying a second stage refinement using Halley’s method.

Good, here is the page for Peter J Acklam inverse normal cumulative distribution codes in several languages, http://home.online.no/~pjacklam/notes/invnorm/index.html#The_algorithm, enjoy.
Tags: ,
Jul 26

Mersenne Twister random number generator

Posted by abiao at 08:21 | Code » C++ | Comments(0) | Reads(11583)
SFMT is a new variant of Mersenne Twister (MT) introduced by Mutsuo Saito and Makoto Matsumoto in 2006. The algorithm was reported at MCQMC 2006.  The article will apper in the proceedings of MCQMC2006. (see Prof. Matsumoto's  Papers on random number generation.) SFMT is a Linear Feedbacked Shift Register (LFSR) generator that generates a 128-bit pseudorandom integer at one step. SFMT is designed with recent parallelism of modern CPUs, such as multi-stage pipelining and SIMD (e.g. 128-bit integer) instructions. It supports 32-bit and 64-bit integers, as well as double precision floating point as output.

Tags:
Pages: 1/1 1 [ View by Articles | List ]