Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- dDrift :: StochasticProcess a => a -> b -> Dot -> Double
- dDiff :: StochasticProcess a => a -> b -> Dot -> Double
- dDt :: StochasticProcess a => a -> b -> Dot -> Double
- generatePath :: (StochasticProcess a, NormalGenerator b, Discretize c) => b -> c -> a -> Int -> Dot -> Path
Documentation
Box-Muller method
Instances
RandomGenerator a => NormalGenerator (BoxMuller a) Source # | |
mkNormalGen :: RandomGenerator a => IO (BoxMuller a) Source #
class NormalGenerator a where Source #
Normally distributed generator
ngGetNext :: a -> (Double, a) Source #
ngSplit :: a -> (a, a) Source #
ngSplitWithSeed :: Integer -> a -> (a, a) Source #
Instances
RandomGenerator a => NormalGenerator (InverseNormal a) Source # | |
Defined in QuantLib.Stochastic.Random ngGetNext :: InverseNormal a -> (Double, InverseNormal a) Source # ngMkNew :: InverseNormal a -> IO (InverseNormal a) Source # ngSplit :: InverseNormal a -> (InverseNormal a, InverseNormal a) Source # ngSplitWithSeed :: Integer -> InverseNormal a -> (InverseNormal a, InverseNormal a) Source # | |
RandomGenerator a => NormalGenerator (BoxMuller a) Source # | |
data InverseNormal a Source #
Normal number generation using inverse cummulative normal distribution
Instances
RandomGenerator a => NormalGenerator (InverseNormal a) Source # | |
Defined in QuantLib.Stochastic.Random ngGetNext :: InverseNormal a -> (Double, InverseNormal a) Source # ngMkNew :: InverseNormal a -> IO (InverseNormal a) Source # ngSplit :: InverseNormal a -> (InverseNormal a, InverseNormal a) Source # ngSplitWithSeed :: Integer -> InverseNormal a -> (InverseNormal a, InverseNormal a) Source # |
mkInverseNormal :: RandomGenerator a => IO (InverseNormal a) Source #
Euler end-point discretization of stochastic processes
Euler discretization of stochastic processes
data BlackScholesProcess Source #
Generalized Black-Scholes process
BlackScholesProcess | |
|
Instances
StochasticProcess BlackScholesProcess Source # | |
Defined in QuantLib.Stochastic.Process drift :: BlackScholesProcess -> Dot -> Double Source # diff :: BlackScholesProcess -> Dot -> Double Source # evolve :: Discretize b => b -> BlackScholesProcess -> Dot -> Double -> Dot Source # |
data OrnsteinUhlenbeckProcess Source #
Ornstein-Uhlenbeck process
Instances
Show OrnsteinUhlenbeckProcess Source # | |
Defined in QuantLib.Stochastic.Process showsPrec :: Int -> OrnsteinUhlenbeckProcess -> ShowS # show :: OrnsteinUhlenbeckProcess -> String # showList :: [OrnsteinUhlenbeckProcess] -> ShowS # | |
StochasticProcess OrnsteinUhlenbeckProcess Source # | |
Defined in QuantLib.Stochastic.Process drift :: OrnsteinUhlenbeckProcess -> Dot -> Double Source # diff :: OrnsteinUhlenbeckProcess -> Dot -> Double Source # evolve :: Discretize b => b -> OrnsteinUhlenbeckProcess -> Dot -> Double -> Dot Source # |
data SquareRootProcess Source #
Square-root process
Instances
Show SquareRootProcess Source # | |
Defined in QuantLib.Stochastic.Process showsPrec :: Int -> SquareRootProcess -> ShowS # show :: SquareRootProcess -> String # showList :: [SquareRootProcess] -> ShowS # | |
StochasticProcess SquareRootProcess Source # | |
Defined in QuantLib.Stochastic.Process drift :: SquareRootProcess -> Dot -> Double Source # diff :: SquareRootProcess -> Dot -> Double Source # evolve :: Discretize b => b -> SquareRootProcess -> Dot -> Double -> Dot Source # |
data ItoProcess Source #
Ito process
Instances
StochasticProcess ItoProcess Source # | |
Defined in QuantLib.Stochastic.Process drift :: ItoProcess -> Dot -> Double Source # diff :: ItoProcess -> Dot -> Double Source # evolve :: Discretize b => b -> ItoProcess -> Dot -> Double -> Dot Source # |
data GeometricBrownian Source #
Geometric Brownian motion
Instances
Show GeometricBrownian Source # | |
Defined in QuantLib.Stochastic.Process showsPrec :: Int -> GeometricBrownian -> ShowS # show :: GeometricBrownian -> String # showList :: [GeometricBrownian] -> ShowS # | |
StochasticProcess GeometricBrownian Source # | |
Defined in QuantLib.Stochastic.Process drift :: GeometricBrownian -> Dot -> Double Source # diff :: GeometricBrownian -> Dot -> Double Source # evolve :: Discretize b => b -> GeometricBrownian -> Dot -> Double -> Dot Source # |
Dot. t and x pair
class StochasticProcess a where Source #
1D Stochastic process
drift :: a -> Dot -> Double Source #
diff :: a -> Dot -> Double Source #
evolve :: Discretize b => b -> a -> Dot -> Double -> Dot Source #
Instances
class Discretize b where Source #
Discretization of stochastic process over given interval
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
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