hquantlib-0.0.2.3: HQuantLib is a port of essencial parts of QuantLib to Haskell

Safe HaskellSafe-Infered

QuantLib.Methods.MonteCarlo

Synopsis

Documentation

class PathPricer p => Summary m p | m -> p whereSource

Summary type class aggregates all priced values of paths

Methods

sSummarize :: m -> [p] -> mSource

Updates summary with given priced pathes

sNorm :: m -> m -> DoubleSource

Defines a metric, i.e. calculate distance between 2 summaries

class PathGenerator m whereSource

Path generator is a stochastic path generator

Methods

pgMkNew :: m -> IO mSource

pgGenerate :: m -> IO PathSource

Instances

(StochasticProcess sp, NormalGenerator b, Discretize d) => PathGenerator (ProcessGenerator sp b d) 

class PathPricer m whereSource

Path pricer provides a price for given path

Methods

ppPrice :: m -> Path -> mSource

monteCarlo :: (Summary s p, PathPricer p, PathGenerator g) => PathMonteCarlo s p g -> Int -> IO sSource

Monte Carlo engine function

monteCarloParallel :: (Summary s p, PathPricer p, PathGenerator g) => PathMonteCarlo s p g -> Int -> IO sSource

Monte Carlo engine function. Parallelized version

data PathMonteCarlo s p g Source

Path-dependant Monte Carlo engine

Constructors

PathMonteCarlo 

Fields

pmcSummary :: s
 
pmcPricer :: p
 
pmcGenerator :: g
 

data LastPointPricer Source

This pricer gets the last point of path

Constructors

LastPointPricer Dot 

data ProcessGenerator sp b d Source

Stochastic process generator

Constructors

ProcessGenerator 

Fields

pgStart :: Dot
 
pgLength :: Int
 
pgProcess :: sp
 
pgGenerator :: b
 
pgDiscretize :: d
 

Instances

(StochasticProcess sp, NormalGenerator b, Discretize d) => PathGenerator (ProcessGenerator sp b d)