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

Safe HaskellNone
LanguageHaskell2010

QuantLib.Methods.MonteCarlo

Synopsis

Documentation

class PathPricer p => Summary m p | m -> p where Source #

Summary type class aggregates all priced values of paths

Minimal complete definition

sSummarize, sNorm

Methods

sSummarize :: m -> [p] -> m Source #

Updates summary with given priced pathes

sNorm :: m -> m -> Double Source #

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

class PathGenerator m where Source #

Path generator is a stochastic path generator

Minimal complete definition

pgMkNew, pgGenerate

Methods

pgMkNew :: m -> IO m Source #

pgGenerate :: Integer -> m -> Path Source #

Instances

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

Methods

pgMkNew :: ProcessGenerator sp b d -> IO (ProcessGenerator sp b d) Source #

pgGenerate :: Integer -> ProcessGenerator sp b d -> Path Source #

class PathPricer m where Source #

Path pricer provides a price for given path

Minimal complete definition

ppPrice

Methods

ppPrice :: m -> Path -> m Source #

monteCarlo :: (Summary s p, PathGenerator g) => PathMonteCarlo s p g -> Int -> s Source #

Monte Carlo engine function

monteCarloParallel :: (Summary s p, PathGenerator g) => PathMonteCarlo s p g -> Int -> s Source #

Monte Carlo engine function. Parallelized version

data PathMonteCarlo s p g Source #

Path-dependant Monte Carlo engine

Constructors

PathMonteCarlo 

Fields

data ProcessGenerator sp b d Source #

Stochastic process generator

Constructors

ProcessGenerator 

Fields

Instances

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

Methods

pgMkNew :: ProcessGenerator sp b d -> IO (ProcessGenerator sp b d) Source #

pgGenerate :: Integer -> ProcessGenerator sp b d -> Path Source #