Skip to content
/ levy Public

Sample random number from Levy stable distribution

Notifications You must be signed in to change notification settings

cpgr/levy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

README

levy is a python code to generate a random number drawn from the Levy stable distribution L. It is based on the algorithm presented in Mantegna, Fast, accurate algorithm for numerical simulation of Levy stable stochastic processes, Phys Rev E, 49 (1994).

Usage

Import the levy method using

from levy import levy

and use it as

levy(alpha, gamma, n)

where alpha is the Levy index, gamma is the shape, and n is the number of averages to use (default is one). For example, to sample for a Levy distribution L(1.5, 1), where alpha = 1.5 and gamma = 1, simply call

levy(1.5, 1)

About

Sample random number from Levy stable distribution

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published