Safe Haskell | None |
---|
- class PathPricer p => Summary m p | m -> p where
- sSummarize :: m -> [p] -> m
- sNorm :: m -> m -> Double
- class PathGenerator m where
- pgMkNew :: m -> IO m
- pgGenerate :: m -> IO Path
- class PathPricer m where
- ppPrice :: m -> Path -> m
- monteCarlo :: (Summary s p, PathPricer p, PathGenerator g) => PathMonteCarlo s p g -> Int -> IO s
- monteCarloParallel :: (Summary s p, PathPricer p, PathGenerator g) => PathMonteCarlo s p g -> Int -> IO s
- data PathMonteCarlo s p g = PathMonteCarlo {
- pmcSummary :: s
- pmcPricer :: p
- pmcGenerator :: g
- data LastPointPricer = LastPointPricer Dot
- data ProcessGenerator sp b d = ProcessGenerator {
- pgStart :: Dot
- pgLength :: Int
- pgProcess :: sp
- pgGenerator :: b
- pgDiscretize :: d
Documentation
class PathPricer p => Summary m p | m -> p whereSource
Summary type class aggregates all priced values of paths
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
(StochasticProcess sp, NormalGenerator b, Discretize d) => PathGenerator (ProcessGenerator sp b d) |
class PathPricer m whereSource
Path pricer provides a price for given path
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
PathMonteCarlo | |
|
data ProcessGenerator sp b d Source
Stochastic process generator
ProcessGenerator | |
|
(StochasticProcess sp, NormalGenerator b, Discretize d) => PathGenerator (ProcessGenerator sp b d) |