| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.Stochastic
Synopsis
- data PureMT
- newPureMT :: IO PureMT
- randomDouble :: PureMT -> (Double, PureMT)
- splitMT :: PureMT -> (PureMT, PureMT)
- splitMTwithSeed :: Integer -> PureMT -> (PureMT, PureMT)
- data BoxMuller a
- mkNormalGen :: RandomGenerator a => IO (BoxMuller a)
- class NormalGenerator a where
- data InverseNormal a
- mkInverseNormal :: RandomGenerator a => IO (InverseNormal a)
- data EndEuler = EndEuler {}
- data Euler = Euler {}
- data BlackScholesProcess = BlackScholesProcess {
- bspRiskFree :: Double -> Double
- bspDividend :: Double -> Double
- bspBlackVol :: Dot -> Double
- data OrnsteinUhlenbeckProcess = OrnsteinUhlenbeckProcess {}
- data SquareRootProcess = SquareRootProcess {}
- data ItoProcess = ItoProcess {}
- data GeometricBrownian = GeometricBrownian {}
- type Path = [Dot]
- data Dot = Dot {}
- class StochasticProcess a where
- class Discretize b where
- generatePath :: (StochasticProcess a, NormalGenerator b, Discretize c) => b -> c -> a -> Int -> Dot -> Path
Documentation
randomDouble :: PureMT -> (Double, PureMT) #
Box-Muller method
Instances
| RandomGenerator a => NormalGenerator (BoxMuller a) # | |
mkNormalGen :: RandomGenerator a => IO (BoxMuller a) #
class NormalGenerator a where #
Normally distributed generator
Minimal complete definition
Instances
| RandomGenerator a => NormalGenerator (InverseNormal a) # | |
Defined in QuantLib.Stochastic.Random Methods ngGetNext :: InverseNormal a -> (Double, InverseNormal a) # ngMkNew :: InverseNormal a -> IO (InverseNormal a) # ngSplit :: InverseNormal a -> (InverseNormal a, InverseNormal a) # ngSplitWithSeed :: Integer -> InverseNormal a -> (InverseNormal a, InverseNormal a) # | |
| RandomGenerator a => NormalGenerator (BoxMuller a) # | |
data InverseNormal a #
Normal number generation using inverse cummulative normal distribution
Instances
| RandomGenerator a => NormalGenerator (InverseNormal a) # | |
Defined in QuantLib.Stochastic.Random Methods ngGetNext :: InverseNormal a -> (Double, InverseNormal a) # ngMkNew :: InverseNormal a -> IO (InverseNormal a) # ngSplit :: InverseNormal a -> (InverseNormal a, InverseNormal a) # ngSplitWithSeed :: Integer -> InverseNormal a -> (InverseNormal a, InverseNormal a) # | |
mkInverseNormal :: RandomGenerator a => IO (InverseNormal a) #
Euler end-point discretization of stochastic processes
Instances
| Eq EndEuler # | |
| Show EndEuler # | |
| Discretize EndEuler # | |
Defined in QuantLib.Stochastic.Discretize | |
Euler discretization of stochastic processes
Instances
| Eq Euler # | |
| Show Euler # | |
| Discretize Euler # | |
Defined in QuantLib.Stochastic.Discretize | |
data BlackScholesProcess #
Generalized Black-Scholes process
Constructors
| BlackScholesProcess | |
Fields
| |
Instances
| StochasticProcess BlackScholesProcess # | |
Defined in QuantLib.Stochastic.Process Methods drift :: BlackScholesProcess -> Dot -> Double # diff :: BlackScholesProcess -> Dot -> Double # evolve :: Discretize b => b -> BlackScholesProcess -> Dot -> Double -> Dot # | |
data OrnsteinUhlenbeckProcess #
Ornstein-Uhlenbeck process
Instances
| Show OrnsteinUhlenbeckProcess # | |
Defined in QuantLib.Stochastic.Process Methods showsPrec :: Int -> OrnsteinUhlenbeckProcess -> ShowS # show :: OrnsteinUhlenbeckProcess -> String # showList :: [OrnsteinUhlenbeckProcess] -> ShowS # | |
| StochasticProcess OrnsteinUhlenbeckProcess # | |
Defined in QuantLib.Stochastic.Process Methods drift :: OrnsteinUhlenbeckProcess -> Dot -> Double # diff :: OrnsteinUhlenbeckProcess -> Dot -> Double # evolve :: Discretize b => b -> OrnsteinUhlenbeckProcess -> Dot -> Double -> Dot # | |
data SquareRootProcess #
Square-root process
Instances
| Show SquareRootProcess # | |
Defined in QuantLib.Stochastic.Process Methods showsPrec :: Int -> SquareRootProcess -> ShowS # show :: SquareRootProcess -> String # showList :: [SquareRootProcess] -> ShowS # | |
| StochasticProcess SquareRootProcess # | |
Defined in QuantLib.Stochastic.Process Methods drift :: SquareRootProcess -> Dot -> Double # diff :: SquareRootProcess -> Dot -> Double # evolve :: Discretize b => b -> SquareRootProcess -> Dot -> Double -> Dot # | |
data ItoProcess #
Ito process
Instances
| StochasticProcess ItoProcess # | |
Defined in QuantLib.Stochastic.Process Methods drift :: ItoProcess -> Dot -> Double # diff :: ItoProcess -> Dot -> Double # evolve :: Discretize b => b -> ItoProcess -> Dot -> Double -> Dot # | |
data GeometricBrownian #
Geometric Brownian motion
Constructors
| GeometricBrownian | |
Instances
| Show GeometricBrownian # | |
Defined in QuantLib.Stochastic.Process Methods showsPrec :: Int -> GeometricBrownian -> ShowS # show :: GeometricBrownian -> String # showList :: [GeometricBrownian] -> ShowS # | |
| StochasticProcess GeometricBrownian # | |
Defined in QuantLib.Stochastic.Process Methods drift :: GeometricBrownian -> Dot -> Double # diff :: GeometricBrownian -> Dot -> Double # evolve :: Discretize b => b -> GeometricBrownian -> Dot -> Double -> Dot # | |
Dot. t and x pair
class StochasticProcess a where #
1D Stochastic process
Methods
Instances
class Discretize b where #
Discretization of stochastic process over given interval
Methods
dDrift :: StochasticProcess a => a -> b -> Dot -> Double #
dDiff :: StochasticProcess a => a -> b -> Dot -> Double #
dDt :: StochasticProcess a => a -> b -> Dot -> Double #
Instances
| Discretize EndEuler # | |
Defined in QuantLib.Stochastic.Discretize | |
| Discretize Euler # | |
Defined in QuantLib.Stochastic.Discretize | |
generatePath :: (StochasticProcess a, NormalGenerator b, Discretize c) => b -> c -> a -> Int -> Dot -> Path #
Generates sample path for given stochastic process under discretization and normal generator for given amount of steps, starting from x0