NAME

Math::Random::Normal::Leva - generate normally distributed PRN using Leva method

VERSION

This document describes Math::Random::Normal::Leva version 0.02

SYNOPSIS

use Math::Random::Normal::Leva;
my @normal = map { random_normal() } 1..1000;

DESCRIPTION

Generates normally distributed pseudorandom numbers using algorithm described in the paper "A Fast Normal Random Number Generator", Joseph L. Leva, 1992 (http://saluc.engr.uconn.edu/refs/crypto/rng/leva92afast.pdf)

FUNCTIONS

random_normal($rand)

Returns a random number sampled from the normal distribution.

$rand

is the value of the stock initially

gbm_sample($price, $vol, $t, $r, $q, $rand)

Generates a random sample price of a stock following Geometric Brownian Motion after t years.

$price

is the value of the stock initially

$vol

is the annual volatility of the stock

$t

is the time elapsed in years

$r

is the annualized drift rate

$q

is the annualized dividend rate

$rand

custom rand generated if not passed will use Math::Random::Secure::rand

note: all rates are taken as decimals (.06 for 6%)

BUGS

Please report any bugs or feature requests via GitHub bug tracker at http://github.com/binary-com/perl-Math-Random-Normal-Leva/issues.

AUTHOR

Binary.com <binary at cpan.org>

LICENSE AND COPYRIGHT

Copyright (C) 2014 Binary.com

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.