hquantlib-0.0.5.1: HQuantLib is a port of essencial parts of QuantLib to Haskell
Safe HaskellNone
LanguageHaskell2010

QuantLib.Stochastic

Synopsis

Documentation

data BoxMuller a Source #

Box-Muller method

Instances

Instances details
RandomGenerator a => NormalGenerator (BoxMuller a) Source # 
Instance details

Defined in QuantLib.Stochastic.Random

mkNormalGen :: RandomGenerator a => IO (BoxMuller a) Source #

class NormalGenerator a where Source #

Normally distributed generator

Minimal complete definition

ngGetNext, ngMkNew, ngSplitWithSeed

Methods

ngGetNext :: a -> (Double, a) Source #

ngMkNew :: a -> IO a Source #

ngSplit :: a -> (a, a) Source #

ngSplitWithSeed :: Integer -> a -> (a, a) Source #

data InverseNormal a Source #

Normal number generation using inverse cummulative normal distribution

mkInverseNormal :: RandomGenerator a => IO (InverseNormal a) Source #

data EndEuler Source #

Euler end-point discretization of stochastic processes

Constructors

EndEuler 

Fields

Instances

Instances details
Eq EndEuler Source # 
Instance details

Defined in QuantLib.Stochastic.Discretize

Show EndEuler Source # 
Instance details

Defined in QuantLib.Stochastic.Discretize

Discretize EndEuler Source # 
Instance details

Defined in QuantLib.Stochastic.Discretize

data Euler Source #

Euler discretization of stochastic processes

Constructors

Euler 

Fields

Instances

Instances details
Eq Euler Source # 
Instance details

Defined in QuantLib.Stochastic.Discretize

Methods

(==) :: Euler -> Euler -> Bool #

(/=) :: Euler -> Euler -> Bool #

Show Euler Source # 
Instance details

Defined in QuantLib.Stochastic.Discretize

Methods

showsPrec :: Int -> Euler -> ShowS #

show :: Euler -> String #

showList :: [Euler] -> ShowS #

Discretize Euler Source # 
Instance details

Defined in QuantLib.Stochastic.Discretize

data BlackScholesProcess Source #

Generalized Black-Scholes process

data ItoProcess Source #

Ito process

Constructors

ItoProcess 

Fields

Instances

Instances details
StochasticProcess ItoProcess Source # 
Instance details

Defined in QuantLib.Stochastic.Process

type Path = [Dot] Source #

Path as list of Dots

data Dot Source #

Dot. t and x pair

Constructors

Dot 

Fields

Instances

Instances details
Eq Dot Source # 
Instance details

Defined in QuantLib.Stochastic.Process

Methods

(==) :: Dot -> Dot -> Bool #

(/=) :: Dot -> Dot -> Bool #

Show Dot Source # 
Instance details

Defined in QuantLib.Stochastic.Process

Methods

showsPrec :: Int -> Dot -> ShowS #

show :: Dot -> String #

showList :: [Dot] -> ShowS #

class StochasticProcess a where Source #

1D Stochastic process

Minimal complete definition

drift, diff

Methods

drift :: a -> Dot -> Double Source #

diff :: a -> Dot -> Double Source #

evolve :: Discretize b => b -> a -> Dot -> Double -> Dot Source #

class Discretize b where Source #

Discretization of stochastic process over given interval

Methods

dDrift :: StochasticProcess a => a -> b -> Dot -> Double Source #

dDiff :: StochasticProcess a => a -> b -> Dot -> Double Source #

dDt :: StochasticProcess a => a -> b -> Dot -> Double Source #

Instances

Instances details
Discretize EndEuler Source # 
Instance details

Defined in QuantLib.Stochastic.Discretize

Discretize Euler Source # 
Instance details

Defined in QuantLib.Stochastic.Discretize

generatePath :: (StochasticProcess a, NormalGenerator b, Discretize c) => b -> c -> a -> Int -> Dot -> Path Source #

Generates sample path for given stochastic process under discretization and normal generator for given amount of steps, starting from x0