{-# LINE 1 "./QuantLib/PricingEngine.chs" #-}
{-# LANGUAGE FlexibleInstances #-}
module QuantLib.PricingEngine
(
PricingEngine
, FdmQuantoHelper
, GenBlackCalculator
, BlackCalculator
, BlackScholesCalculator
, BachelierCalculator
, BlackDeltaCalculator
, CashAnnuityModel(..)
, Probabilities(..)
, CashDividendModel(..)
, NumericalFix(..)
, AccrualBias(..)
, ForwardsInCouponPeriod(..)
, SolverType(..)
, FixedPointEquation(..)
, QdFpScheme(..)
, IntegrationControl(..)
, LatticeTime(..)
, FdmGrid(..)
, OperatorSplittingOrder(..)
, PerpetualFuturesInterpolationType(..)
, StrikeSpec(..)
, discountingBondEngine
, riskyBondEngine
, discountingSwapEngine
, discountingFxForwardEngine
, discountingConstNotionalCrossCurrencySwapEngine
, counterpartyAdjSwapEngine
, discountingPerpetualFuturesEngine
, analyticBarrierEngine
, analyticTwoAssetBarrierEngine
, analyticSoftBarrierEngine
, analyticPartialTimeBarrierOptionEngine
, analyticBinaryBarrierEngine
, analyticSimpleChooserEngine
, analyticComplexChooserEngine
, analyticTwoAssetCorrelationEngine
, analyticEuropeanMargrabeEngine
, analyticAmericanMargrabeEngine
, analyticWriterExtensibleOptionEngine
, analyticHolderExtensibleOptionEngine
, fdBlackScholesBarrierEngine
, fdHestonBarrierEngine
, binomialBarrierEngine
, vannaVolgaBarrierEngine
, analyticDoubleBarrierEngine
, fdHestonDoubleBarrierEngine
, vannaVolgaDoubleBarrierEngine
, binomialDoubleBarrierEngine
, mcDoubleBarrierEngine
, analyticCliquetEngine
, analyticCompoundOptionEngine
, analyticContinuousFixedLookbackEngine
, analyticContinuousFloatingLookbackEngine
, analyticContinuousPartialFloatingLookbackEngine
, analyticContinuousPartialFixedLookbackEngine
, analyticContinuousGeometricAveragePriceAsianEngine
, analyticContinuousGeometricAveragePriceAsianHestonEngine
, analyticDiscreteGeometricAveragePriceAsianHestonEngine
, mcLookbackFixedEngine
, mcLookbackFloatingEngine
, mcLookbackPartialFixedEngine
, mcLookbackPartialFloatingEngine
, analyticDigitalAmericanEngine
, analyticDigitalAmericanKoEngine
, analyticDiscreteGeometricAveragePriceAsianEngine
, analyticDiscreteGeometricAverageStrikeAsianEngine
, turnbullWakemanAsianEngine
, fdBlackScholesAsianEngine
, analyticDividendEuropeanEngine
, analyticEuropeanEngine
, analyticPerformanceEngine
, forwardEuropeanEngine
, forwardBaroneAdesiWhaleyEngine
, forwardBjerksundStenslandEngine
, forwardFdBlackScholesVanillaEngine
, mcForwardEuropeanBsEngine
, mcForwardEuropeanHestonEngine
, analyticHestonForwardEuropeanEngine
, quantoEuropeanEngine
, quantoForwardEuropeanEngine
, quantoForwardPerformanceEuropeanEngine
, quantoBarrierEngine
, quantoDoubleBarrierEngine
, blackCapFloorEngineFromVolatilityStructure
, blackCapFloorEngine
, blackSwaptionEngine
, haganIrregularSwaptionEngine
, blackSwaptionEngineFromVolatilityStructure
, bachelierCapFloorEngineFromVolatilityStructure
, bachelierCapFloorEngine
, yoyInflationBlackCapFloorEngine
, yoyInflationUnitDisplacedBlackCapFloorEngine
, yoyInflationBachelierCapFloorEngine
, interpolatingCpiCapFloorEngine
, bachelierSwaptionEngine
, bachelierSwaptionEngineFromVolatilityStructure
, analyticBsmHullWhiteEngine
, analyticCapFloorEngine
, gaussian1dCapFloorEngine
, analyticGjrGarchEngine
, analyticHestonEngine
, analyticHestonHullWhiteEngine
, batesEngine
, fftVanillaEngine
, g2SwaptionEngine
, jumpDiffusionEngine
, treeCapFloorEngine
, treeSwaptionEngine
, treeVanillaSwapEngine
, varianceGammaEngine
, analyticHestonEngineOptimalControlVariate
, mcHestonHullWhiteEngine
, mcAmericanEngine
, mcBarrierEngine
, mcDigitalEngine
, mcDiscreteArithmeticApEngine
, mcDiscreteArithmeticAsEngine
, mcDiscreteGeometricApEngine
, mcDiscreteArithmeticApHestonEngine
, mcDiscreteGeometricApHestonEngine
, mcEuropeanEngine
, mcEuropeanGjrGarchEngine
, mcEuropeanHestonEngine
, integralHestonVarianceOptionEngine
, mcHullWhiteCapFloorEngine
, mcHimalayaEngine
, mcPagodaEngine
, mcEuropeanBasketEngine
, mcEverestEngine
, mcAmericanBasketEngine
, mcPerformanceEngine
, mcVarianceSwapEngine
, baroneAdesiWhaleyApproximationEngine
, batesDetJumpEngine
, batesDoubleExpDetJumpEngine
, batesDoubleExpEngine
, bjerksundStenslandApproximationEngine
, qdPlusAmericanEngine
, qdFpAmericanEngine
, continuousArithmeticAsianVecerEngine
, integralCdsEngine
, integralEngine
, isdaCdsEngine
, jamshidianSwaptionEngine
, gaussian1dSwaptionEngine
, gaussian1dNonstandardSwaptionEngine
, gaussian1dFloatFloatSwaptionEngine
, gaussian1dJamshidianSwaptionEngine
, juQuadraticApproximationEngine
, kirkEngine
, midPointCdsEngine
, midPointCdoEngine
, integralCdoEngine
, integralNtdEngine
, replicatingVarianceSwapEngine
, stulzEngine
, bjerksundStenslandSpreadEngine
, operatorSplittingSpreadEngine
, pearsonSpreadEngine
, gaussianCopulaSpreadEngine
, fd2dBlackScholesVanillaEngine
, choiBasketEngine
, dengLiZhouBasketEngine
, fdndimBlackScholesVanillaEngine
, singleFactorBsmBasketEngine
, lfmSwaptionEngine
, fdG2SwaptionEngine
, fdHullWhiteSwaptionEngine
, binomialVanillaEngine
, fdBlackScholesVanillaEngine
, fdBlackScholesVanillaEngineQuanto
, fdmQuantoHelper
, quantoAdjustment
, fdHestonVanillaEngine
, cosHestonEngine
, analyticPdfHestonEngine
, fdBatesVanillaEngine
, fdBlackScholesShoutEngine
, fdHestonVanillaEngineQuanto
, fdHestonHullWhiteVanillaEngine
, binomialConvertibleEngine
, blackCallableFixedRateBondEngineFromVolatilityStructure
, blackCallableFixedRateBondEngine
, blackCallableZeroCouponBondEngineFromVolatilityStructure
, blackCallableZeroCouponBondEngine
, treeCallableFixedRateBondEngine
, treeCallableZeroCouponBondEngine
, asBlackCalculator
, blackCalculator
, blackScholesCalculator
, bachelierCalculator
, blackDeltaCalculator
, HasOptionCalculator(..)
, blackVanna
, blackScholesDelta
, blackScholesElasticity
, blackScholesGamma
, blackScholesTheta
, blackScholesThetaPerDay
, bachelierVanna
, deltaFromStrike
, strikeFromDelta
, atmStrike
, blackFormula
, blackCashItmProbability
, blackImpliedStdDev
, blackImpliedStdDevApproximation
, blackStdDevDerivative
, blackVolDerivative
, bachelierBlackFormula
, blackForwardDerivative
, blackImpliedStdDevChambers
, blackImpliedStdDevApproximationRs
, blackImpliedStdDevLiRs
, blackAssetItmProbability
, blackStdDevSecondDerivative
, bachelierForwardDerivative
, bachelierImpliedVol
, bachelierImpliedVolChoi
, bachelierStdDevDerivative
, bachelierAssetItmProbability
, defaultThetaPerDay
, unsafeSabrLogNormalVolatility
, unsafeShiftedSabrVolatility
, unsafeSabrNormalVolatility
, unsafeSabrVolatility
, sabrVolatility
, shiftedSabrVolatility
, sabrFlochKennedyVolatility
, validateSabrParameters
, sabrGuess
) where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.ForeignPtr as C2HSImp
import qualified Foreign.Marshal.Utils as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import qualified System.IO.Unsafe as C2HSImp
import QuantLib.Internal
import QuantLib.Internal.Type
import QuantLib.InterestRate(VolatilityType)
import QuantLib.Math
{-# LINE 273 "./QuantLib/PricingEngine.chs" #-}
import QuantLib.Quote(DeltaType, AtmType)
import QuantLib.Instrument.Option hiding(itmCashProbability, deltaForward, strikeSensitivity, dividendRho, rho, vega)
import QuantLib.Internal.Common
import Data.List.NonEmpty(NonEmpty, toList)
data CashAnnuityModel = SwapRate
| DiscountCurve
deriving (Enum,Show,Eq,Read)
{-# LINE 279 "./QuantLib/PricingEngine.chs" #-}
data IntegrationControl
= IntegrationOrder Word
| IntegrationTolerance Double Word
deriving (Eq, Show)
data StrikeSpec
= Strike !OptionType !Double
| StrikePayoff !StrikedPayoff
data LatticeTime
= TimeSteps Word
| ExplicitTimeGrid TimeGrid
data FdmGrid
= UniformGrid Word
| AxisGrids (NonEmpty Word)
deriving (FdmGrid -> FdmGrid -> Bool
(FdmGrid -> FdmGrid -> Bool)
-> (FdmGrid -> FdmGrid -> Bool) -> Eq FdmGrid
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FdmGrid -> FdmGrid -> Bool
== :: FdmGrid -> FdmGrid -> Bool
$c/= :: FdmGrid -> FdmGrid -> Bool
/= :: FdmGrid -> FdmGrid -> Bool
Eq, Int -> FdmGrid -> ShowS
[FdmGrid] -> ShowS
FdmGrid -> String
(Int -> FdmGrid -> ShowS)
-> (FdmGrid -> String) -> ([FdmGrid] -> ShowS) -> Show FdmGrid
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FdmGrid -> ShowS
showsPrec :: Int -> FdmGrid -> ShowS
$cshow :: FdmGrid -> String
show :: FdmGrid -> String
$cshowList :: [FdmGrid] -> ShowS
showList :: [FdmGrid] -> ShowS
Show)
data Probabilities = None
| Naive
| Digital
deriving (Enum,Show,Eq,Read)
{-# LINE 302 "./QuantLib/PricingEngine.chs" #-}
data CashDividendModel = CashDividendSpot
| CashDividendEscrowed
deriving (Enum,Show,Eq,Read)
{-# LINE 303 "./QuantLib/PricingEngine.chs" #-}
data NumericalFix = NumericalFixNone
| NumericalFixTaylor
deriving (Enum,Show,Eq,Read)
{-# LINE 304 "./QuantLib/PricingEngine.chs" #-}
data AccrualBias = HalfDayBias
| NoBias
deriving (Enum,Show,Eq,Read)
{-# LINE 305 "./QuantLib/PricingEngine.chs" #-}
data ForwardsInCouponPeriod = Flat
| Piecewise
deriving (Enum,Show,Eq,Read)
{-# LINE 306 "./QuantLib/PricingEngine.chs" #-}
data SolverType = Brent
| Newton
| Ridder
| Halley
| SuperHalley
deriving (Int -> OperatorSplittingOrder
Int -> SolverType
Int -> QdFpScheme -> ShowS
[QdFpScheme] -> ShowS
OperatorSplittingOrder -> Int
OperatorSplittingOrder -> [OperatorSplittingOrder]
OperatorSplittingOrder -> OperatorSplittingOrder
OperatorSplittingOrder
-> OperatorSplittingOrder -> [OperatorSplittingOrder]
OperatorSplittingOrder
-> OperatorSplittingOrder
-> OperatorSplittingOrder
-> [OperatorSplittingOrder]
QdFpScheme -> String
SolverType -> Int
SolverType -> [SolverType]
SolverType -> SolverType
SolverType -> SolverType -> [SolverType]
SolverType -> SolverType -> SolverType -> [SolverType]
(Int -> QdFpScheme -> ShowS)
-> (QdFpScheme -> String)
-> ([QdFpScheme] -> ShowS)
-> Show QdFpScheme
(OperatorSplittingOrder -> OperatorSplittingOrder)
-> (OperatorSplittingOrder -> OperatorSplittingOrder)
-> (Int -> OperatorSplittingOrder)
-> (OperatorSplittingOrder -> Int)
-> (OperatorSplittingOrder -> [OperatorSplittingOrder])
-> (OperatorSplittingOrder
-> OperatorSplittingOrder -> [OperatorSplittingOrder])
-> (OperatorSplittingOrder
-> OperatorSplittingOrder -> [OperatorSplittingOrder])
-> (OperatorSplittingOrder
-> OperatorSplittingOrder
-> OperatorSplittingOrder
-> [OperatorSplittingOrder])
-> Enum OperatorSplittingOrder
(SolverType -> SolverType)
-> (SolverType -> SolverType)
-> (Int -> SolverType)
-> (SolverType -> Int)
-> (SolverType -> [SolverType])
-> (SolverType -> SolverType -> [SolverType])
-> (SolverType -> SolverType -> [SolverType])
-> (SolverType -> SolverType -> SolverType -> [SolverType])
-> Enum SolverType
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$csucc :: OperatorSplittingOrder -> OperatorSplittingOrder
succ :: OperatorSplittingOrder -> OperatorSplittingOrder
$cpred :: OperatorSplittingOrder -> OperatorSplittingOrder
pred :: OperatorSplittingOrder -> OperatorSplittingOrder
$ctoEnum :: Int -> OperatorSplittingOrder
toEnum :: Int -> OperatorSplittingOrder
$cfromEnum :: OperatorSplittingOrder -> Int
fromEnum :: OperatorSplittingOrder -> Int
$cenumFrom :: OperatorSplittingOrder -> [OperatorSplittingOrder]
enumFrom :: OperatorSplittingOrder -> [OperatorSplittingOrder]
$cenumFromThen :: OperatorSplittingOrder
-> OperatorSplittingOrder -> [OperatorSplittingOrder]
enumFromThen :: OperatorSplittingOrder
-> OperatorSplittingOrder -> [OperatorSplittingOrder]
$cenumFromTo :: OperatorSplittingOrder
-> OperatorSplittingOrder -> [OperatorSplittingOrder]
enumFromTo :: OperatorSplittingOrder
-> OperatorSplittingOrder -> [OperatorSplittingOrder]
$cenumFromThenTo :: OperatorSplittingOrder
-> OperatorSplittingOrder
-> OperatorSplittingOrder
-> [OperatorSplittingOrder]
enumFromThenTo :: OperatorSplittingOrder
-> OperatorSplittingOrder
-> OperatorSplittingOrder
-> [OperatorSplittingOrder]
$cshowsPrec :: Int -> QdFpScheme -> ShowS
showsPrec :: Int -> QdFpScheme -> ShowS
$cshow :: QdFpScheme -> String
show :: QdFpScheme -> String
$cshowList :: [QdFpScheme] -> ShowS
showList :: [QdFpScheme] -> ShowS
$csucc :: SolverType -> SolverType
succ :: SolverType -> SolverType
$cpred :: SolverType -> SolverType
pred :: SolverType -> SolverType
$ctoEnum :: Int -> SolverType
toEnum :: Int -> SolverType
$cfromEnum :: SolverType -> Int
fromEnum :: SolverType -> Int
$cenumFrom :: SolverType -> [SolverType]
enumFrom :: SolverType -> [SolverType]
$cenumFromThen :: SolverType -> SolverType -> [SolverType]
enumFromThen :: SolverType -> SolverType -> [SolverType]
$cenumFromTo :: SolverType -> SolverType -> [SolverType]
enumFromTo :: SolverType -> SolverType -> [SolverType]
$cenumFromThenTo :: SolverType -> SolverType -> SolverType -> [SolverType]
enumFromThenTo :: SolverType -> SolverType -> SolverType -> [SolverType]
Enum,Int -> OperatorSplittingOrder -> ShowS
Int -> SolverType -> ShowS
[OperatorSplittingOrder] -> ShowS
[SolverType] -> ShowS
OperatorSplittingOrder -> String
SolverType -> String
(Int -> OperatorSplittingOrder -> ShowS)
-> (OperatorSplittingOrder -> String)
-> ([OperatorSplittingOrder] -> ShowS)
-> Show OperatorSplittingOrder
(Int -> SolverType -> ShowS)
-> (SolverType -> String)
-> ([SolverType] -> ShowS)
-> Show SolverType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OperatorSplittingOrder -> ShowS
showsPrec :: Int -> OperatorSplittingOrder -> ShowS
$cshow :: OperatorSplittingOrder -> String
show :: OperatorSplittingOrder -> String
$cshowList :: [OperatorSplittingOrder] -> ShowS
showList :: [OperatorSplittingOrder] -> ShowS
$cshowsPrec :: Int -> SolverType -> ShowS
showsPrec :: Int -> SolverType -> ShowS
$cshow :: SolverType -> String
show :: SolverType -> String
$cshowList :: [SolverType] -> ShowS
showList :: [SolverType] -> ShowS
Show,Eq,ReadPrec [OperatorSplittingOrder]
ReadPrec [SolverType]
ReadPrec OperatorSplittingOrder
ReadPrec SolverType
Int -> ReadS OperatorSplittingOrder
Int -> ReadS SolverType
ReadS [OperatorSplittingOrder]
ReadS [SolverType]
(Int -> ReadS OperatorSplittingOrder)
-> ReadS [OperatorSplittingOrder]
-> ReadPrec OperatorSplittingOrder
-> ReadPrec [OperatorSplittingOrder]
-> Read OperatorSplittingOrder
(Int -> ReadS SolverType)
-> ReadS [SolverType]
-> ReadPrec SolverType
-> ReadPrec [SolverType]
-> Read SolverType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS OperatorSplittingOrder
readsPrec :: Int -> ReadS OperatorSplittingOrder
$creadList :: ReadS [OperatorSplittingOrder]
readList :: ReadS [OperatorSplittingOrder]
$creadPrec :: ReadPrec OperatorSplittingOrder
readPrec :: ReadPrec OperatorSplittingOrder
$creadListPrec :: ReadPrec [OperatorSplittingOrder]
readListPrec :: ReadPrec [OperatorSplittingOrder]
$creadsPrec :: Int -> ReadS SolverType
readsPrec :: Int -> ReadS SolverType
$creadList :: ReadS [SolverType]
readList :: ReadS [SolverType]
$creadPrec :: ReadPrec SolverType
readPrec :: ReadPrec SolverType
$creadListPrec :: ReadPrec [SolverType]
readListPrec :: ReadPrec [SolverType]
Read)
{-# LINE 307 "./QuantLib/PricingEngine.chs" #-}
data FixedPointEquation = FP_A
| FP_B
| Auto
deriving (Enum,Show,Eq,Read)
{-# LINE 308 "./QuantLib/PricingEngine.chs" #-}
data QdFpScheme = FastScheme
| AccurateScheme
| HighPrecisionScheme
deriving (Show,Eq,Read)
instance Enum QdFpScheme where
succ FastScheme = AccurateScheme
succ AccurateScheme = HighPrecisionScheme
succ HighPrecisionScheme = error "QdFpScheme.succ: HighPrecisionScheme has no successor"
pred AccurateScheme = FastScheme
pred HighPrecisionScheme = AccurateScheme
pred FastScheme = error "QdFpScheme.pred: FastScheme has no predecessor"
enumFromTo from to = go from
where
end = fromEnum to
go v = case compare (fromEnum v) end of
LT -> v : go (succ v)
EQ -> [v]
GT -> []
enumFrom from = enumFromTo from HighPrecisionScheme
fromEnum FastScheme = 0
fromEnum AccurateScheme = 1
fromEnum HighPrecisionScheme = 2
toEnum 0 = FastScheme
toEnum 1 = AccurateScheme
toEnum 2 = HighPrecisionScheme
toEnum unmatched = error ("QdFpScheme.toEnum: Cannot match " ++ show unmatched)
{-# LINE 309 "./QuantLib/PricingEngine.chs" #-}
data OperatorSplittingOrder = First
| Second
deriving (Enum,Show,Eq,Read)
{-# LINE 310 "./QuantLib/PricingEngine.chs" #-}
data PerpetualFuturesInterpolationType = PerpetualFuturesPiecewiseConstant
| PerpetualFuturesLinearInterpolation
| PerpetualFuturesCubicSpline
deriving (Show,Eq,Read)
instance Enum PerpetualFuturesInterpolationType where
succ PerpetualFuturesPiecewiseConstant = PerpetualFuturesLinearInterpolation
succ PerpetualFuturesLinearInterpolation = PerpetualFuturesCubicSpline
succ PerpetualFuturesCubicSpline = error "PerpetualFuturesInterpolationType.succ: PerpetualFuturesCubicSpline has no successor"
pred PerpetualFuturesLinearInterpolation = PerpetualFuturesPiecewiseConstant
pred PerpetualFuturesCubicSpline = PerpetualFuturesLinearInterpolation
pred PerpetualFuturesPiecewiseConstant = error "PerpetualFuturesInterpolationType.pred: PerpetualFuturesPiecewiseConstant has no predecessor"
enumFromTo from to = go from
where
end = fromEnum to
go v = case compare (fromEnum v) end of
LT -> v : go (succ v)
EQ -> [v]
GT -> []
enumFrom from = enumFromTo from PerpetualFuturesCubicSpline
fromEnum PerpetualFuturesPiecewiseConstant = 0
fromEnum PerpetualFuturesLinearInterpolation = 1
fromEnum PerpetualFuturesCubicSpline = 2
toEnum 0 = PerpetualFuturesPiecewiseConstant
toEnum 1 = PerpetualFuturesLinearInterpolation
toEnum 2 = PerpetualFuturesCubicSpline
toEnum unmatched = error ("PerpetualFuturesInterpolationType.toEnum: Cannot match " ++ show unmatched)
{-# LINE 311 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 313 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 314 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 315 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 316 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 317 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 318 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 319 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 320 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 321 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 322 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 323 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 324 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 325 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 326 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 327 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 328 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 329 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 330 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 331 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 332 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 333 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 334 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 335 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 336 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 337 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 338 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 339 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 340 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 341 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 342 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 343 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 344 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 345 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 346 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 347 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 348 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 349 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 350 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 351 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 352 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 353 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 354 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 355 "./QuantLib/PricingEngine.chs" #-}
{-# LINE 356 "./QuantLib/PricingEngine.chs" #-}
discountingBondEngine :: (GenYieldTermStructure y) -> (Maybe Bool)
-> IO ((PricingEngine))
discountingBondEngine :: forall y. GenYieldTermStructure y -> Maybe Bool -> IO PricingEngine
discountingBondEngine GenYieldTermStructure y
a1 Maybe Bool
a2 =
GenYieldTermStructure y
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall y b.
GenYieldTermStructure y
-> (Ptr CYieldTermStructure' -> IO b) -> IO b
withYieldTermStructure GenYieldTermStructure y
a1 ((Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CYieldTermStructure'
a1' ->
let {a2' :: CInt
a2' = Maybe Bool -> CInt
fromMaybeBool Maybe Bool
a2} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a3' ->
Ptr CYieldTermStructure'
-> CInt -> Ptr (Ptr CChar) -> IO (Ptr CPricingEngine)
discountingBondEngine'_ Ptr CYieldTermStructure'
a1' CInt
a2' Ptr (Ptr CChar)
a3' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a3'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 360 "./QuantLib/PricingEngine.chs" #-}
discountingPerpetualFuturesEngine
:: GenYieldTermStructure y1 -> GenYieldTermStructure y2 -> GenQuote q
-> NonEmpty (Double, Double, Double)
-> PerpetualFuturesInterpolationType -> Double -> IO PricingEngine
discountingPerpetualFuturesEngine domestic foreignCurve spot funding interpolation maxT =
qlDiscountingPerpetualFuturesEngine domestic foreignCurve spot times rates diffs interpolation maxT
where (times, rates, diffs) = unzip3 (toList funding)
qlDiscountingPerpetualFuturesEngine :: (GenYieldTermStructure y1)
-> (GenYieldTermStructure y2)
-> (GenQuote q)
-> ([Double])
-> ([Double])
-> ([Double])
-> (PerpetualFuturesInterpolationType)
-> (Double)
-> IO ((PricingEngine))
qlDiscountingPerpetualFuturesEngine :: forall y1 y2 q.
GenYieldTermStructure y1
-> GenYieldTermStructure y2
-> GenQuote q
-> [Double]
-> [Double]
-> [Double]
-> PerpetualFuturesInterpolationType
-> Double
-> IO PricingEngine
qlDiscountingPerpetualFuturesEngine GenYieldTermStructure y1
a1 GenYieldTermStructure y2
a2 GenQuote q
a3 [Double]
a4 [Double]
a5 [Double]
a6 PerpetualFuturesInterpolationType
a7 Double
a8 =
GenYieldTermStructure y1
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall y b.
GenYieldTermStructure y
-> (Ptr CYieldTermStructure' -> IO b) -> IO b
withYieldTermStructure GenYieldTermStructure y1
a1 ((Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CYieldTermStructure'
a1' ->
GenYieldTermStructure y2
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall y b.
GenYieldTermStructure y
-> (Ptr CYieldTermStructure' -> IO b) -> IO b
withYieldTermStructure GenYieldTermStructure y2
a2 ((Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CYieldTermStructure'
a2' ->
GenQuote q -> (Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine
forall q b. GenQuote q -> (Ptr CQuote' -> IO b) -> IO b
withQuote GenQuote q
a3 ((Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CQuote'
a3' ->
[Double]
-> ((CUInt, Ptr CDouble) -> IO PricingEngine) -> IO PricingEngine
forall b. [Double] -> ((CUInt, Ptr CDouble) -> IO b) -> IO b
withDoubleArray [Double]
a4 (((CUInt, Ptr CDouble) -> IO PricingEngine) -> IO PricingEngine)
-> ((CUInt, Ptr CDouble) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \(CUInt
a4'1, Ptr CDouble
a4'2) ->
withDoubleArray a5 $ \(a5'1, a5'2) ->
withDoubleArray a6 $ \(a6'1, a6'2) ->
let {a7' = fromEnumC a7} in
let {a8' = realToFrac a8} in
preErrorCheck $ \a9' ->
qlDiscountingPerpetualFuturesEngine'_ a1' a2' a3' a4'1 a4'2 a5'1 a5'2 a6'1 a6'2 a7' a8' a9' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a9'>>
return (res')
{-# LINE 383 "./QuantLib/PricingEngine.chs" #-}
riskyBondEngine :: (GenDefaultProbabilityTermStructure d) -> (Double)
-> (GenYieldTermStructure y) -> IO ((PricingEngine))
riskyBondEngine a1 a2 a3 =
withDefaultProbabilityTermStructure a1 $ \a1' ->
let {a2' = realToFrac a2} in
withYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
riskyBondEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 388 "./QuantLib/PricingEngine.chs" #-}
discountingSwapEngine :: (GenYieldTermStructure y) -> (Maybe Bool)
-> (Maybe Day)
-> (Maybe Day)
-> IO ((PricingEngine))
discountingSwapEngine a1 a2 a3 a4 =
withYieldTermStructure a1 $ \a1' ->
let {a2' = fromMaybeBool a2} in
withMaybeDay a3 $ \a3' ->
withMaybeDay a4 $ \a4' ->
preErrorCheck $ \a5' ->
discountingSwapEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 394 "./QuantLib/PricingEngine.chs" #-}
discountingFxForwardEngine :: (GenYieldTermStructure y1)
-> (GenYieldTermStructure y2)
-> (GenQuote q)
-> IO ((PricingEngine))
discountingFxForwardEngine a1 a2 a3 =
withYieldTermStructure a1 $ \a1' ->
withYieldTermStructure a2 $ \a2' ->
withQuote a3 $ \a3' ->
preErrorCheck $ \a4' ->
discountingFxForwardEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 400 "./QuantLib/PricingEngine.chs" #-}
discountingConstNotionalCrossCurrencySwapEngine :: (Currency)
-> (GenYieldTermStructure y1)
-> (Currency)
-> (GenYieldTermStructure y2)
-> (GenQuote q)
-> (Maybe Bool)
-> (Maybe Day)
-> (Maybe Day)
-> (Maybe Day)
-> IO ((PricingEngine))
discountingConstNotionalCrossCurrencySwapEngine :: forall y1 y2 q.
Currency
-> GenYieldTermStructure y1
-> Currency
-> GenYieldTermStructure y2
-> GenQuote q
-> Maybe Bool
-> Maybe Day
-> Maybe Day
-> Maybe Day
-> IO PricingEngine
discountingConstNotionalCrossCurrencySwapEngine Currency
a1 GenYieldTermStructure y1
a2 Currency
a3 GenYieldTermStructure y2
a4 GenQuote q
a5 Maybe Bool
a6 Maybe Day
a7 Maybe Day
a8 Maybe Day
a9 =
Currency -> (Ptr CCurrency -> IO PricingEngine) -> IO PricingEngine
forall b. Currency -> (Ptr CCurrency -> IO b) -> IO b
withCurrency Currency
a1 ((Ptr CCurrency -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CCurrency -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CCurrency
a1' ->
GenYieldTermStructure y1
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall y b.
GenYieldTermStructure y
-> (Ptr CYieldTermStructure' -> IO b) -> IO b
withYieldTermStructure GenYieldTermStructure y1
a2 ((Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CYieldTermStructure'
a2' ->
Currency -> (Ptr CCurrency -> IO PricingEngine) -> IO PricingEngine
forall b. Currency -> (Ptr CCurrency -> IO b) -> IO b
withCurrency Currency
a3 ((Ptr CCurrency -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CCurrency -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CCurrency
a3' ->
GenYieldTermStructure y2
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall y b.
GenYieldTermStructure y
-> (Ptr CYieldTermStructure' -> IO b) -> IO b
withYieldTermStructure GenYieldTermStructure y2
a4 ((Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CYieldTermStructure'
a4' ->
GenQuote q -> (Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine
forall q b. GenQuote q -> (Ptr CQuote' -> IO b) -> IO b
withQuote GenQuote q
a5 ((Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CQuote'
a5' ->
let {a6' :: CInt
a6' = Maybe Bool -> CInt
fromMaybeBool Maybe Bool
a6} in
Maybe Day -> (CInt -> IO PricingEngine) -> IO PricingEngine
forall a. Maybe Day -> (CInt -> IO a) -> IO a
withMaybeDay Maybe Day
a7 ((CInt -> IO PricingEngine) -> IO PricingEngine)
-> (CInt -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \CInt
a7' ->
Maybe Day -> (CInt -> IO PricingEngine) -> IO PricingEngine
forall a. Maybe Day -> (CInt -> IO a) -> IO a
withMaybeDay Maybe Day
a8 ((CInt -> IO PricingEngine) -> IO PricingEngine)
-> (CInt -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \CInt
a8' ->
Maybe Day -> (CInt -> IO PricingEngine) -> IO PricingEngine
forall a. Maybe Day -> (CInt -> IO a) -> IO a
withMaybeDay Maybe Day
a9 ((CInt -> IO PricingEngine) -> IO PricingEngine)
-> (CInt -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \CInt
a9' ->
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a10' ->
Ptr CCurrency
-> Ptr CYieldTermStructure'
-> Ptr CCurrency
-> Ptr CYieldTermStructure'
-> Ptr CQuote'
-> CInt
-> CInt
-> CInt
-> CInt
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
discountingConstNotionalCrossCurrencySwapEngine'_ Ptr CCurrency
a1' Ptr CYieldTermStructure'
a2' Ptr CCurrency
a3' Ptr CYieldTermStructure'
a4' Ptr CQuote'
a5' CInt
a6' CInt
a7' CInt
a8' CInt
a9' Ptr (Ptr CChar)
a10' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a10'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 416 "./QuantLib/PricingEngine.chs" #-}
counterpartyAdjSwapEngine :: (GenYieldTermStructure y)
-> (GenQuote q)
-> (GenDefaultProbabilityTermStructure d1)
-> (Double)
-> (Maybe (GenDefaultProbabilityTermStructure d2))
-> (Double)
-> IO ((PricingEngine))
counterpartyAdjSwapEngine a1 a2 a3 a4 a5 a6 =
withYieldTermStructure a1 $ \a1' ->
withQuote a2 $ \a2' ->
withDefaultProbabilityTermStructure a3 $ \a3' ->
let {a4' = realToFrac a4} in
withMaybeDefaultProbabilityTermStructure a5 $ \a5' ->
let {a6' = realToFrac a6} in
preErrorCheck $ \a7' ->
counterpartyAdjSwapEngine'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a7'>>
return (res')
{-# LINE 428 "./QuantLib/PricingEngine.chs" #-}
analyticBarrierEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticBarrierEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticBarrierEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 431 "./QuantLib/PricingEngine.chs" #-}
analyticTwoAssetBarrierEngine :: (GeneralizedBlackScholesProcess)
-> (GeneralizedBlackScholesProcess)
-> (GenQuote q)
-> IO ((PricingEngine))
analyticTwoAssetBarrierEngine a1 a2 a3 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withGeneralizedBlackScholesProcess a2 $ \a2' ->
withQuote a3 $ \a3' ->
preErrorCheck $ \a4' ->
analyticTwoAssetBarrierEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 437 "./QuantLib/PricingEngine.chs" #-}
analyticSoftBarrierEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticSoftBarrierEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticSoftBarrierEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 440 "./QuantLib/PricingEngine.chs" #-}
analyticSimpleChooserEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticSimpleChooserEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticSimpleChooserEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 443 "./QuantLib/PricingEngine.chs" #-}
analyticComplexChooserEngine :: (GeneralizedBlackScholesProcess)
-> IO ((PricingEngine))
analyticComplexChooserEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticComplexChooserEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 447 "./QuantLib/PricingEngine.chs" #-}
analyticTwoAssetCorrelationEngine :: (GeneralizedBlackScholesProcess)
-> (GeneralizedBlackScholesProcess)
-> (GenQuote q)
-> IO ((PricingEngine))
analyticTwoAssetCorrelationEngine a1 a2 a3 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withGeneralizedBlackScholesProcess a2 $ \a2' ->
withQuote a3 $ \a3' ->
preErrorCheck $ \a4' ->
analyticTwoAssetCorrelationEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 453 "./QuantLib/PricingEngine.chs" #-}
analyticEuropeanMargrabeEngine :: (GeneralizedBlackScholesProcess)
-> (GeneralizedBlackScholesProcess)
-> (Double)
-> IO ((PricingEngine))
analyticEuropeanMargrabeEngine a1 a2 a3 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withGeneralizedBlackScholesProcess a2 $ \a2' ->
let {a3' = realToFrac a3} in
preErrorCheck $ \a4' ->
analyticEuropeanMargrabeEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 461 "./QuantLib/PricingEngine.chs" #-}
analyticAmericanMargrabeEngine :: (GeneralizedBlackScholesProcess)
-> (GeneralizedBlackScholesProcess)
-> (Double)
-> IO ((PricingEngine))
analyticAmericanMargrabeEngine a1 a2 a3 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withGeneralizedBlackScholesProcess a2 $ \a2' ->
let {a3' = realToFrac a3} in
preErrorCheck $ \a4' ->
analyticAmericanMargrabeEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 469 "./QuantLib/PricingEngine.chs" #-}
analyticWriterExtensibleOptionEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticWriterExtensibleOptionEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticWriterExtensibleOptionEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 472 "./QuantLib/PricingEngine.chs" #-}
analyticHolderExtensibleOptionEngine :: (GeneralizedBlackScholesProcess)
-> IO ((PricingEngine))
analyticHolderExtensibleOptionEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticHolderExtensibleOptionEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 476 "./QuantLib/PricingEngine.chs" #-}
analyticPartialTimeBarrierOptionEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticPartialTimeBarrierOptionEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticPartialTimeBarrierOptionEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 479 "./QuantLib/PricingEngine.chs" #-}
analyticBinaryBarrierEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticBinaryBarrierEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticBinaryBarrierEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 482 "./QuantLib/PricingEngine.chs" #-}
binomialBarrierEngine :: (BinomialTree) -> (GeneralizedBlackScholesProcess) -> (Word)
-> (Word)
-> IO ((PricingEngine))
binomialBarrierEngine a1 a2 a3 a4 =
let {a1' = (fromIntegral . fromEnum) a1} in
withGeneralizedBlackScholesProcess a2 $ \a2' ->
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
preErrorCheck $ \a5' ->
binomialBarrierEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 488 "./QuantLib/PricingEngine.chs" #-}
vannaVolgaBarrierEngine :: (DeltaVolQuote)
-> (DeltaVolQuote)
-> (DeltaVolQuote)
-> (GenQuote q)
-> (GenYieldTermStructure y1)
-> (GenYieldTermStructure y2)
-> (Bool)
-> (Double)
-> IO ((PricingEngine))
vannaVolgaBarrierEngine a1 a2 a3 a4 a5 a6 a7 a8 =
withGenQuote a1 $ \a1' ->
withGenQuote a2 $ \a2' ->
withGenQuote a3 $ \a3' ->
withQuote a4 $ \a4' ->
withYieldTermStructure a5 $ \a5' ->
withYieldTermStructure a6 $ \a6' ->
let {a7' = C2HSImp.fromBool a7} in
let {a8' = realToFrac a8} in
preErrorCheck $ \a9' ->
vannaVolgaBarrierEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a9'>>
return (res')
{-# LINE 499 "./QuantLib/PricingEngine.chs" #-}
analyticDoubleBarrierEngine :: (GeneralizedBlackScholesProcess) -> (Int)
-> IO ((PricingEngine))
analyticDoubleBarrierEngine a1 a2 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
let {a2' = fromIntegral a2} in
preErrorCheck $ \a3' ->
analyticDoubleBarrierEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 503 "./QuantLib/PricingEngine.chs" #-}
vannaVolgaDoubleBarrierEngine :: (DeltaVolQuote)
-> (DeltaVolQuote)
-> (DeltaVolQuote)
-> (GenQuote q)
-> (GenYieldTermStructure y1)
-> (GenYieldTermStructure y2)
-> (Bool)
-> (Double)
-> (Int)
-> IO ((PricingEngine))
vannaVolgaDoubleBarrierEngine :: forall q y1 y2.
DeltaVolQuote
-> DeltaVolQuote
-> DeltaVolQuote
-> GenQuote q
-> GenYieldTermStructure y1
-> GenYieldTermStructure y2
-> Bool
-> Double
-> Int
-> IO PricingEngine
vannaVolgaDoubleBarrierEngine DeltaVolQuote
a1 DeltaVolQuote
a2 DeltaVolQuote
a3 GenQuote q
a4 GenYieldTermStructure y1
a5 GenYieldTermStructure y2
a6 Bool
a7 Double
a8 Int
a9 =
DeltaVolQuote
-> (Ptr CDeltaVolQuote' -> IO PricingEngine) -> IO PricingEngine
forall q b. GenQuote (ForeignPtr q) -> (Ptr q -> IO b) -> IO b
withGenQuote DeltaVolQuote
a1 ((Ptr CDeltaVolQuote' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CDeltaVolQuote' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CDeltaVolQuote'
a1' ->
DeltaVolQuote
-> (Ptr CDeltaVolQuote' -> IO PricingEngine) -> IO PricingEngine
forall q b. GenQuote (ForeignPtr q) -> (Ptr q -> IO b) -> IO b
withGenQuote DeltaVolQuote
a2 ((Ptr CDeltaVolQuote' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CDeltaVolQuote' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CDeltaVolQuote'
a2' ->
DeltaVolQuote
-> (Ptr CDeltaVolQuote' -> IO PricingEngine) -> IO PricingEngine
forall q b. GenQuote (ForeignPtr q) -> (Ptr q -> IO b) -> IO b
withGenQuote DeltaVolQuote
a3 ((Ptr CDeltaVolQuote' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CDeltaVolQuote' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CDeltaVolQuote'
a3' ->
GenQuote q -> (Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine
forall q b. GenQuote q -> (Ptr CQuote' -> IO b) -> IO b
withQuote GenQuote q
a4 ((Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CQuote'
a4' ->
GenYieldTermStructure y1
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall y b.
GenYieldTermStructure y
-> (Ptr CYieldTermStructure' -> IO b) -> IO b
withYieldTermStructure GenYieldTermStructure y1
a5 ((Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CYieldTermStructure'
a5' ->
GenYieldTermStructure y2
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall y b.
GenYieldTermStructure y
-> (Ptr CYieldTermStructure' -> IO b) -> IO b
withYieldTermStructure GenYieldTermStructure y2
a6 ((Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CYieldTermStructure'
a6' ->
let {a7' :: CInt
a7' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a7} in
let {a8' :: CDouble
a8' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a8} in
let {a9' :: CInt
a9' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a9} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a10' ->
Ptr CDeltaVolQuote'
-> Ptr CDeltaVolQuote'
-> Ptr CDeltaVolQuote'
-> Ptr CQuote'
-> Ptr CYieldTermStructure'
-> Ptr CYieldTermStructure'
-> CInt
-> CDouble
-> CInt
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
vannaVolgaDoubleBarrierEngine'_ Ptr CDeltaVolQuote'
a1' Ptr CDeltaVolQuote'
a2' Ptr CDeltaVolQuote'
a3' a4' a5' a6' a7' a8' a9' a10' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a10'>>
return (res')
{-# LINE 515 "./QuantLib/PricingEngine.chs" #-}
binomialDoubleBarrierEngine :: (BinomialTree) -> (GeneralizedBlackScholesProcess) -> (Word)
-> IO ((PricingEngine))
binomialDoubleBarrierEngine a1 a2 a3 =
let {a1' = (fromIntegral . fromEnum) a1} in
withGeneralizedBlackScholesProcess a2 $ \a2' ->
let {a3' = fromIntegral a3} in
preErrorCheck $ \a4' ->
binomialDoubleBarrierEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 519 "./QuantLib/PricingEngine.chs" #-}
mcDoubleBarrierEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcDoubleBarrierEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = C2HSImp.fromBool a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromMaybeDouble a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = fromIntegral a11} in
preErrorCheck $ \a12' ->
mcDoubleBarrierEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 530 "./QuantLib/PricingEngine.chs" #-}
analyticCliquetEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticCliquetEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticCliquetEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 533 "./QuantLib/PricingEngine.chs" #-}
analyticCompoundOptionEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticCompoundOptionEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticCompoundOptionEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 536 "./QuantLib/PricingEngine.chs" #-}
analyticContinuousFixedLookbackEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticContinuousFixedLookbackEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticContinuousFixedLookbackEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 539 "./QuantLib/PricingEngine.chs" #-}
analyticContinuousFloatingLookbackEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticContinuousFloatingLookbackEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticContinuousFloatingLookbackEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 542 "./QuantLib/PricingEngine.chs" #-}
analyticContinuousPartialFloatingLookbackEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticContinuousPartialFloatingLookbackEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticContinuousPartialFloatingLookbackEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 545 "./QuantLib/PricingEngine.chs" #-}
analyticContinuousPartialFixedLookbackEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticContinuousPartialFixedLookbackEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticContinuousPartialFixedLookbackEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 548 "./QuantLib/PricingEngine.chs" #-}
analyticContinuousGeometricAveragePriceAsianEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticContinuousGeometricAveragePriceAsianEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticContinuousGeometricAveragePriceAsianEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 551 "./QuantLib/PricingEngine.chs" #-}
analyticContinuousGeometricAveragePriceAsianHestonEngine :: (GenHestonProcess hp) -> (Word)
-> (Double)
-> IO ((PricingEngine))
analyticContinuousGeometricAveragePriceAsianHestonEngine :: forall hp.
GenHestonProcess hp -> Word -> Double -> IO PricingEngine
analyticContinuousGeometricAveragePriceAsianHestonEngine GenHestonProcess hp
a1 Word
a2 Double
a3 =
GenHestonProcess hp
-> (Ptr CHestonProcess' -> IO PricingEngine) -> IO PricingEngine
forall hp b.
GenHestonProcess hp -> (Ptr CHestonProcess' -> IO b) -> IO b
withHestonProcess GenHestonProcess hp
a1 ((Ptr CHestonProcess' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CHestonProcess' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CHestonProcess'
a1' ->
let {a2' :: CUInt
a2' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a2} in
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a4' ->
Ptr CHestonProcess'
-> CUInt -> CDouble -> Ptr (Ptr CChar) -> IO (Ptr CPricingEngine)
analyticContinuousGeometricAveragePriceAsianHestonEngine'_ Ptr CHestonProcess'
a1' CUInt
a2' CDouble
a3' Ptr (Ptr CChar)
a4' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a4'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 561 "./QuantLib/PricingEngine.chs" #-}
analyticDiscreteGeometricAveragePriceAsianHestonEngine :: (GenHestonProcess hp) -> (Double)
-> IO ((PricingEngine))
analyticDiscreteGeometricAveragePriceAsianHestonEngine a1 a2 =
withHestonProcess a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
analyticDiscreteGeometricAveragePriceAsianHestonEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 570 "./QuantLib/PricingEngine.chs" #-}
mcLookbackFixedEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcLookbackFixedEngine :: RngTrait
-> StatisticsTrait
-> GeneralizedBlackScholesProcess
-> Maybe Word
-> Maybe Word
-> Bool
-> Bool
-> Maybe Word
-> Maybe Double
-> Maybe Word
-> Word
-> IO PricingEngine
mcLookbackFixedEngine RngTrait
a1 StatisticsTrait
a2 GeneralizedBlackScholesProcess
a3 Maybe Word
a4 Maybe Word
a5 Bool
a6 Bool
a7 Maybe Word
a8 Maybe Double
a9 Maybe Word
a10 Word
a11 =
let {a1' :: CInt
a1' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (RngTrait -> Int) -> RngTrait -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RngTrait -> Int
forall a. Enum a => a -> Int
fromEnum) RngTrait
a1} in
let {a2' :: CInt
a2' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (StatisticsTrait -> Int) -> StatisticsTrait -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StatisticsTrait -> Int
forall a. Enum a => a -> Int
fromEnum) StatisticsTrait
a2} in
GeneralizedBlackScholesProcess
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
GenGeneralizedBlackScholesProcess gbs
-> (Ptr CGeneralizedBlackScholesProcess' -> IO b) -> IO b
withGeneralizedBlackScholesProcess GeneralizedBlackScholesProcess
a3 ((Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CGeneralizedBlackScholesProcess'
a3' ->
let {a4' :: CUInt
a4' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a4} in
let {a5' :: CUInt
a5' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a5} in
let {a6' :: CInt
a6' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a6} in
let {a7' :: CInt
a7' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a7} in
let {a8' :: CUInt
a8' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a8} in
let {a9' :: CDouble
a9' = Maybe Double -> CDouble
fromMaybeDouble Maybe Double
a9} in
let {a10' :: CUInt
a10' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a10} in
let {a11' :: CUInt
a11' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a11} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a12' ->
CInt
-> CInt
-> Ptr CGeneralizedBlackScholesProcess'
-> CUInt
-> CUInt
-> CInt
-> CInt
-> CUInt
-> CDouble
-> CUInt
-> CUInt
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
mcLookbackFixedEngine'_ CInt
a1' CInt
a2' Ptr CGeneralizedBlackScholesProcess'
a3' CUInt
a4' CUInt
a5' CInt
a6' CInt
a7' CUInt
a8' CDouble
a9' CUInt
a10' CUInt
a11' Ptr (Ptr CChar)
a12' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a12'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 582 "./QuantLib/PricingEngine.chs" #-}
mcLookbackFloatingEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcLookbackFloatingEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = C2HSImp.fromBool a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromMaybeDouble a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = fromIntegral a11} in
preErrorCheck $ \a12' ->
mcLookbackFloatingEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 594 "./QuantLib/PricingEngine.chs" #-}
mcLookbackPartialFixedEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcLookbackPartialFixedEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = C2HSImp.fromBool a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromMaybeDouble a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = fromIntegral a11} in
preErrorCheck $ \a12' ->
mcLookbackPartialFixedEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 606 "./QuantLib/PricingEngine.chs" #-}
mcLookbackPartialFloatingEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcLookbackPartialFloatingEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = C2HSImp.fromBool a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromMaybeDouble a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = fromIntegral a11} in
preErrorCheck $ \a12' ->
mcLookbackPartialFloatingEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 618 "./QuantLib/PricingEngine.chs" #-}
analyticDigitalAmericanEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticDigitalAmericanEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticDigitalAmericanEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 621 "./QuantLib/PricingEngine.chs" #-}
analyticDigitalAmericanKoEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticDigitalAmericanKoEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticDigitalAmericanKoEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 624 "./QuantLib/PricingEngine.chs" #-}
analyticDiscreteGeometricAveragePriceAsianEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticDiscreteGeometricAveragePriceAsianEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticDiscreteGeometricAveragePriceAsianEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 627 "./QuantLib/PricingEngine.chs" #-}
analyticDiscreteGeometricAverageStrikeAsianEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticDiscreteGeometricAverageStrikeAsianEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticDiscreteGeometricAverageStrikeAsianEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 630 "./QuantLib/PricingEngine.chs" #-}
turnbullWakemanAsianEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
turnbullWakemanAsianEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
turnbullWakemanAsianEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 633 "./QuantLib/PricingEngine.chs" #-}
analyticDividendEuropeanEngine :: (GeneralizedBlackScholesProcess) -> ([Dividend]) -> IO ((PricingEngine))
analyticDividendEuropeanEngine a1 a2 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withDividendArray a2 $ \(a2'1, a2'2) ->
preErrorCheck $ \a3' ->
analyticDividendEuropeanEngine'_ a1' a2'1 a2'2 a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 636 "./QuantLib/PricingEngine.chs" #-}
analyticEuropeanEngine :: (GeneralizedBlackScholesProcess) -> (Maybe (GenYieldTermStructure y))
-> IO ((PricingEngine))
analyticEuropeanEngine a1 a2 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withMaybeYieldTermStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
analyticEuropeanEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 641 "./QuantLib/PricingEngine.chs" #-}
analyticPerformanceEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
analyticPerformanceEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticPerformanceEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 644 "./QuantLib/PricingEngine.chs" #-}
forwardEuropeanEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
forwardEuropeanEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
forwardEuropeanEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 647 "./QuantLib/PricingEngine.chs" #-}
forwardBaroneAdesiWhaleyEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
forwardBaroneAdesiWhaleyEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
forwardBaroneAdesiWhaleyEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 650 "./QuantLib/PricingEngine.chs" #-}
forwardBjerksundStenslandEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
forwardBjerksundStenslandEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
forwardBjerksundStenslandEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 653 "./QuantLib/PricingEngine.chs" #-}
forwardFdBlackScholesVanillaEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
forwardFdBlackScholesVanillaEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
forwardFdBlackScholesVanillaEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 656 "./QuantLib/PricingEngine.chs" #-}
mcForwardEuropeanBsEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcForwardEuropeanBsEngine :: RngTrait
-> StatisticsTrait
-> GeneralizedBlackScholesProcess
-> Maybe Word
-> Maybe Word
-> Bool
-> Bool
-> Maybe Word
-> Maybe Double
-> Maybe Word
-> Word
-> IO PricingEngine
mcForwardEuropeanBsEngine RngTrait
a1 StatisticsTrait
a2 GeneralizedBlackScholesProcess
a3 Maybe Word
a4 Maybe Word
a5 Bool
a6 Bool
a7 Maybe Word
a8 Maybe Double
a9 Maybe Word
a10 Word
a11 =
let {a1' :: CInt
a1' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (RngTrait -> Int) -> RngTrait -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RngTrait -> Int
forall a. Enum a => a -> Int
fromEnum) RngTrait
a1} in
let {a2' :: CInt
a2' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (StatisticsTrait -> Int) -> StatisticsTrait -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StatisticsTrait -> Int
forall a. Enum a => a -> Int
fromEnum) StatisticsTrait
a2} in
GeneralizedBlackScholesProcess
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
GenGeneralizedBlackScholesProcess gbs
-> (Ptr CGeneralizedBlackScholesProcess' -> IO b) -> IO b
withGeneralizedBlackScholesProcess GeneralizedBlackScholesProcess
a3 ((Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CGeneralizedBlackScholesProcess'
a3' ->
let {a4' :: CUInt
a4' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a4} in
let {a5' :: CUInt
a5' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a5} in
let {a6' :: CInt
a6' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a6} in
let {a7' :: CInt
a7' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a7} in
let {a8' :: CUInt
a8' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a8} in
let {a9' :: CDouble
a9' = Maybe Double -> CDouble
fromMaybeDouble Maybe Double
a9} in
let {a10' :: CUInt
a10' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a10} in
let {a11' :: CUInt
a11' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a11} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a12' ->
CInt
-> CInt
-> Ptr CGeneralizedBlackScholesProcess'
-> CUInt
-> CUInt
-> CInt
-> CInt
-> CUInt
-> CDouble
-> CUInt
-> CUInt
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
mcForwardEuropeanBsEngine'_ CInt
a1' CInt
a2' Ptr CGeneralizedBlackScholesProcess'
a3' CUInt
a4' CUInt
a5' CInt
a6' CInt
a7' CUInt
a8' CDouble
a9' CUInt
a10' CUInt
a11' Ptr (Ptr CChar)
a12' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a12'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 667 "./QuantLib/PricingEngine.chs" #-}
mcForwardEuropeanHestonEngine :: (RngTrait)
-> (StatisticsTrait)
-> (GenHestonProcess hp)
-> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> (Bool)
-> IO ((PricingEngine))
mcForwardEuropeanHestonEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withHestonProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = fromMaybeInt a7} in
let {a8' = fromMaybeDouble a8} in
let {a9' = fromMaybeInt a9} in
let {a10' = fromIntegral a10} in
let {a11' = C2HSImp.fromBool a11} in
preErrorCheck $ \a12' ->
mcForwardEuropeanHestonEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 681 "./QuantLib/PricingEngine.chs" #-}
analyticHestonForwardEuropeanEngine :: (GenHestonProcess hp) -> (Word)
-> IO ((PricingEngine))
analyticHestonForwardEuropeanEngine a1 a2 =
withHestonProcess a1 $ \a1' ->
let {a2' = fromIntegral a2} in
preErrorCheck $ \a3' ->
analyticHestonForwardEuropeanEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 685 "./QuantLib/PricingEngine.chs" #-}
quantoEuropeanEngine :: (GeneralizedBlackScholesProcess) -> (GenYieldTermStructure y)
-> (GenBlackVolTermStructure bv)
-> (GenQuote q)
-> IO ((PricingEngine))
quantoEuropeanEngine a1 a2 a3 a4 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withYieldTermStructure a2 $ \a2' ->
withBlackVolTermStructure a3 $ \a3' ->
withQuote a4 $ \a4' ->
preErrorCheck $ \a5' ->
quantoEuropeanEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 692 "./QuantLib/PricingEngine.chs" #-}
quantoForwardEuropeanEngine :: (GeneralizedBlackScholesProcess) -> (GenYieldTermStructure y)
-> (GenBlackVolTermStructure bv)
-> (GenQuote q)
-> IO ((PricingEngine))
quantoForwardEuropeanEngine a1 a2 a3 a4 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withYieldTermStructure a2 $ \a2' ->
withBlackVolTermStructure a3 $ \a3' ->
withQuote a4 $ \a4' ->
preErrorCheck $ \a5' ->
quantoForwardEuropeanEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 699 "./QuantLib/PricingEngine.chs" #-}
quantoForwardPerformanceEuropeanEngine :: (GeneralizedBlackScholesProcess) -> (GenYieldTermStructure y)
-> (GenBlackVolTermStructure bv)
-> (GenQuote q)
-> IO ((PricingEngine))
quantoForwardPerformanceEuropeanEngine a1 a2 a3 a4 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withYieldTermStructure a2 $ \a2' ->
withBlackVolTermStructure a3 $ \a3' ->
withQuote a4 $ \a4' ->
preErrorCheck $ \a5' ->
quantoForwardPerformanceEuropeanEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 706 "./QuantLib/PricingEngine.chs" #-}
quantoBarrierEngine :: (GeneralizedBlackScholesProcess) -> (GenYieldTermStructure y)
-> (GenBlackVolTermStructure bv)
-> (GenQuote q)
-> IO ((PricingEngine))
quantoBarrierEngine a1 a2 a3 a4 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withYieldTermStructure a2 $ \a2' ->
withBlackVolTermStructure a3 $ \a3' ->
withQuote a4 $ \a4' ->
preErrorCheck $ \a5' ->
quantoBarrierEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 713 "./QuantLib/PricingEngine.chs" #-}
quantoDoubleBarrierEngine :: (GeneralizedBlackScholesProcess) -> (GenYieldTermStructure y)
-> (GenBlackVolTermStructure bv)
-> (GenQuote q)
-> IO ((PricingEngine))
quantoDoubleBarrierEngine a1 a2 a3 a4 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withYieldTermStructure a2 $ \a2' ->
withBlackVolTermStructure a3 $ \a3' ->
withQuote a4 $ \a4' ->
preErrorCheck $ \a5' ->
quantoDoubleBarrierEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 720 "./QuantLib/PricingEngine.chs" #-}
blackCapFloorEngineFromVolatilityStructure :: (GenYieldTermStructure y) -> (GenOptionletVolatilityStructure ov) -> IO ((PricingEngine))
blackCapFloorEngineFromVolatilityStructure a1 a2 =
withYieldTermStructure a1 $ \a1' ->
withOptionletVolatilityStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
blackCapFloorEngineFromVolatilityStructure'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 723 "./QuantLib/PricingEngine.chs" #-}
blackCapFloorEngine :: (GenYieldTermStructure y) -> (GenQuote q) -> (DayCounter) -> (Double)
-> IO ((PricingEngine))
blackCapFloorEngine a1 a2 a3 a4 =
withYieldTermStructure a1 $ \a1' ->
withQuote a2 $ \a2' ->
withDayCounter a3 $ \a3' ->
let {a4' = realToFrac a4} in
preErrorCheck $ \a5' ->
blackCapFloorEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 728 "./QuantLib/PricingEngine.chs" #-}
blackSwaptionEngine :: (GenYieldTermStructure y) -> (GenQuote q) -> (DayCounter) -> (Double)
-> (CashAnnuityModel)
-> IO ((PricingEngine))
blackSwaptionEngine a1 a2 a3 a4 a5 =
withYieldTermStructure a1 $ \a1' ->
withQuote a2 $ \a2' ->
withDayCounter a3 $ \a3' ->
let {a4' = realToFrac a4} in
let {a5' = (fromIntegral . fromEnum) a5} in
preErrorCheck $ \a6' ->
blackSwaptionEngine'_ a1' a2' a3' a4' a5' a6' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a6'>>
return (res')
{-# LINE 734 "./QuantLib/PricingEngine.chs" #-}
haganIrregularSwaptionEngine :: (GenSwaptionVolatilityStructure sv) -> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
haganIrregularSwaptionEngine a1 a2 =
withSwaptionVolatilityStructure a1 $ \a1' ->
withMaybeYieldTermStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
haganIrregularSwaptionEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 735 "./QuantLib/PricingEngine.chs" #-}
blackSwaptionEngineFromVolatilityStructure :: (GenYieldTermStructure y) -> (GenSwaptionVolatilityStructure sv) -> IO ((PricingEngine))
blackSwaptionEngineFromVolatilityStructure a1 a2 =
withYieldTermStructure a1 $ \a1' ->
withSwaptionVolatilityStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
blackSwaptionEngineFromVolatilityStructure'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 738 "./QuantLib/PricingEngine.chs" #-}
bachelierCapFloorEngineFromVolatilityStructure :: (GenYieldTermStructure y) -> (GenOptionletVolatilityStructure ov) -> IO ((PricingEngine))
bachelierCapFloorEngineFromVolatilityStructure a1 a2 =
withYieldTermStructure a1 $ \a1' ->
withOptionletVolatilityStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
bachelierCapFloorEngineFromVolatilityStructure'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 741 "./QuantLib/PricingEngine.chs" #-}
bachelierCapFloorEngine :: (GenYieldTermStructure y) -> (GenQuote q) -> (DayCounter) -> IO ((PricingEngine))
bachelierCapFloorEngine a1 a2 a3 =
withYieldTermStructure a1 $ \a1' ->
withQuote a2 $ \a2' ->
withDayCounter a3 $ \a3' ->
preErrorCheck $ \a4' ->
bachelierCapFloorEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 744 "./QuantLib/PricingEngine.chs" #-}
yoyInflationBlackCapFloorEngine :: (GenYoYInflationIndex yidx) -> (YoYOptionletVolatilitySurface)
-> (GenYieldTermStructure y)
-> IO ((PricingEngine))
yoyInflationBlackCapFloorEngine a1 a2 a3 =
withYoYInflationIndex a1 $ \a1' ->
withGenVolatilityTermStructure a2 $ \a2' ->
withYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
yoyInflationBlackCapFloorEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 752 "./QuantLib/PricingEngine.chs" #-}
yoyInflationUnitDisplacedBlackCapFloorEngine :: (GenYoYInflationIndex yidx) -> (YoYOptionletVolatilitySurface)
-> (GenYieldTermStructure y)
-> IO ((PricingEngine))
yoyInflationUnitDisplacedBlackCapFloorEngine a1 a2 a3 =
withYoYInflationIndex a1 $ \a1' ->
withGenVolatilityTermStructure a2 $ \a2' ->
withYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
yoyInflationUnitDisplacedBlackCapFloorEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 758 "./QuantLib/PricingEngine.chs" #-}
yoyInflationBachelierCapFloorEngine :: (GenYoYInflationIndex yidx) -> (YoYOptionletVolatilitySurface)
-> (GenYieldTermStructure y)
-> IO ((PricingEngine))
yoyInflationBachelierCapFloorEngine a1 a2 a3 =
withYoYInflationIndex a1 $ \a1' ->
withGenVolatilityTermStructure a2 $ \a2' ->
withYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
yoyInflationBachelierCapFloorEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 764 "./QuantLib/PricingEngine.chs" #-}
interpolatingCpiCapFloorEngine :: (CPICapFloorTermPriceSurface) -> IO ((PricingEngine))
interpolatingCpiCapFloorEngine a1 =
withGenTermStructure a1 $ \a1' ->
preErrorCheck $ \a2' ->
interpolatingCpiCapFloorEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 770 "./QuantLib/PricingEngine.chs" #-}
bachelierSwaptionEngine :: (GenYieldTermStructure y) -> (GenQuote q) -> (DayCounter) -> (CashAnnuityModel)
-> IO ((PricingEngine))
bachelierSwaptionEngine a1 a2 a3 a4 =
withYieldTermStructure a1 $ \a1' ->
withQuote a2 $ \a2' ->
withDayCounter a3 $ \a3' ->
let {a4' = (fromIntegral . fromEnum) a4} in
preErrorCheck $ \a5' ->
bachelierSwaptionEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 774 "./QuantLib/PricingEngine.chs" #-}
bachelierSwaptionEngineFromVolatilityStructure :: (GenYieldTermStructure y) -> (GenSwaptionVolatilityStructure sv) -> IO ((PricingEngine))
bachelierSwaptionEngineFromVolatilityStructure a1 a2 =
withYieldTermStructure a1 $ \a1' ->
withSwaptionVolatilityStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
bachelierSwaptionEngineFromVolatilityStructure'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 777 "./QuantLib/PricingEngine.chs" #-}
analyticBsmHullWhiteEngine :: (Double) -> (GeneralizedBlackScholesProcess) -> (HullWhite) -> IO ((PricingEngine))
analyticBsmHullWhiteEngine a1 a2 a3 =
let {a1' = realToFrac a1} in
withGeneralizedBlackScholesProcess a2 $ \a2' ->
withHullWhite a3 $ \a3' ->
preErrorCheck $ \a4' ->
analyticBsmHullWhiteEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 780 "./QuantLib/PricingEngine.chs" #-}
analyticCapFloorEngine :: (AffineModel) -> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
analyticCapFloorEngine a1 a2 =
withStandalone a1 $ \a1' ->
withMaybeYieldTermStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
analyticCapFloorEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 783 "./QuantLib/PricingEngine.chs" #-}
gaussian1dCapFloorEngine :: (Gaussian1dModel) -> (Int)
-> (Double)
-> (Bool)
-> (Bool)
-> (Maybe (GenYieldTermStructure y))
-> IO ((PricingEngine))
gaussian1dCapFloorEngine :: forall y.
Gaussian1dModel
-> Int
-> Double
-> Bool
-> Bool
-> Maybe (GenYieldTermStructure y)
-> IO PricingEngine
gaussian1dCapFloorEngine Gaussian1dModel
a1 Int
a2 Double
a3 Bool
a4 Bool
a5 Maybe (GenYieldTermStructure y)
a6 =
Gaussian1dModel
-> (Ptr CGaussian1dModel' -> IO PricingEngine) -> IO PricingEngine
forall a b. Standalone a -> (Ptr a -> IO b) -> IO b
withStandalone Gaussian1dModel
a1 ((Ptr CGaussian1dModel' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CGaussian1dModel' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CGaussian1dModel'
a1' ->
let {a2' :: CInt
a2' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a2} in
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
let {a4' :: CInt
a4' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a4} in
let {a5' :: CInt
a5' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a5} in
Maybe (GenYieldTermStructure y)
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall y b.
Maybe (GenYieldTermStructure y)
-> (Ptr CYieldTermStructure' -> IO b) -> IO b
withMaybeYieldTermStructure Maybe (GenYieldTermStructure y)
a6 ((Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CYieldTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CYieldTermStructure'
a6' ->
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a7' ->
Ptr CGaussian1dModel'
-> CInt
-> CDouble
-> CInt
-> CInt
-> Ptr CYieldTermStructure'
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
gaussian1dCapFloorEngine'_ Ptr CGaussian1dModel'
a1' CInt
a2' CDouble
a3' CInt
a4' CInt
a5' Ptr CYieldTermStructure'
a6' Ptr (Ptr CChar)
a7' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a7'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 794 "./QuantLib/PricingEngine.chs" #-}
analyticGjrGarchEngine :: (GJRGARCHModel) -> IO ((PricingEngine))
analyticGjrGarchEngine a1 =
withGenCalibratedModel a1 $ \a1' ->
preErrorCheck $ \a2' ->
analyticGjrGarchEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 797 "./QuantLib/PricingEngine.chs" #-}
analyticHestonEngineTolerance :: (GenHestonModel hm) -> (Double)
-> (Word)
-> IO ((PricingEngine))
analyticHestonEngineTolerance a1 a2 a3 =
withHestonModel a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = fromIntegral a3} in
preErrorCheck $ \a4' ->
analyticHestonEngineTolerance'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 802 "./QuantLib/PricingEngine.chs" #-}
analyticHestonHullWhiteEngineOrder :: (GenHestonModel hm) -> (HullWhite) -> (Word)
-> IO ((PricingEngine))
analyticHestonHullWhiteEngineOrder a1 a2 a3 =
withHestonModel a1 $ \a1' ->
withHullWhite a2 $ \a2' ->
let {a3' = fromIntegral a3} in
preErrorCheck $ \a4' ->
analyticHestonHullWhiteEngineOrder'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 807 "./QuantLib/PricingEngine.chs" #-}
batesEngineOrder :: (GenBatesModel bm) -> (Word)
-> IO ((PricingEngine))
batesEngineOrder a1 a2 =
withBatesModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
preErrorCheck $ \a3' ->
batesEngineOrder'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 812 "./QuantLib/PricingEngine.chs" #-}
fftVanillaEngine :: (GeneralizedBlackScholesProcess) -> (Double)
-> IO ((PricingEngine))
fftVanillaEngine a1 a2 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
fftVanillaEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 816 "./QuantLib/PricingEngine.chs" #-}
g2SwaptionEngine :: (G2) -> (Double)
-> (Word)
-> IO ((PricingEngine))
g2SwaptionEngine a1 a2 a3 =
withG2 a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = fromIntegral a3} in
preErrorCheck $ \a4' ->
g2SwaptionEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 821 "./QuantLib/PricingEngine.chs" #-}
jumpDiffusionEngine :: (Merton76Process) -> (Double)
-> (Word)
-> IO ((PricingEngine))
jumpDiffusionEngine a1 a2 a3 =
withGenStochasticProcess1D a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = fromIntegral a3} in
preErrorCheck $ \a4' ->
jumpDiffusionEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 827 "./QuantLib/PricingEngine.chs" #-}
treeCapFloorEngineTimeSteps :: (GenShortRateModel sm) -> (Word)
-> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
treeCapFloorEngineTimeSteps a1 a2 a3 =
withShortRateModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
withMaybeYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
treeCapFloorEngineTimeSteps'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 831 "./QuantLib/PricingEngine.chs" #-}
treeSwaptionEngineTimeSteps :: (GenShortRateModel sm) -> (Word)
-> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
treeSwaptionEngineTimeSteps a1 a2 a3 =
withShortRateModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
withMaybeYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
treeSwaptionEngineTimeSteps'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 835 "./QuantLib/PricingEngine.chs" #-}
treeVanillaSwapEngineTimeSteps :: (GenShortRateModel sm) -> (Word)
-> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
treeVanillaSwapEngineTimeSteps a1 a2 a3 =
withShortRateModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
withMaybeYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
treeVanillaSwapEngineTimeSteps'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 839 "./QuantLib/PricingEngine.chs" #-}
varianceGammaEngine :: (VarianceGammaProcess) -> (Double)
-> IO ((PricingEngine))
varianceGammaEngine a1 a2 =
withGenStochasticProcess1D a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
varianceGammaEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 844 "./QuantLib/PricingEngine.chs" #-}
analyticHestonEngineOrder :: (GenHestonModel hm) -> (Word)
-> IO ((PricingEngine))
analyticHestonEngineOrder a1 a2 =
withHestonModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
preErrorCheck $ \a3' ->
analyticHestonEngineOrder'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 848 "./QuantLib/PricingEngine.chs" #-}
analyticHestonEngine :: GenHestonModel hm -> IntegrationControl -> IO PricingEngine
analyticHestonEngine model control =
case control of
IntegrationOrder order -> analyticHestonEngineOrder model order
IntegrationTolerance tolerance evaluations -> analyticHestonEngineTolerance model tolerance evaluations
analyticHestonEngineOptimalControlVariate :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (ComplexLogFormula)
analyticHestonEngineOptimalControlVariate :: Double
-> Double
-> Double
-> Double
-> Double
-> Double
-> ComplexLogFormula
analyticHestonEngineOptimalControlVariate Double
a1 Double
a2 Double
a3 Double
a4 Double
a5 Double
a6 =
IO ComplexLogFormula -> ComplexLogFormula
forall a. IO a -> a
C2HSImp.unsafePerformIO (IO ComplexLogFormula -> ComplexLogFormula)
-> IO ComplexLogFormula -> ComplexLogFormula
forall a b. (a -> b) -> a -> b
$
let {a1' :: CDouble
a1' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a1} in
let {a2' :: CDouble
a2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a2} in
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
let {a4' :: CDouble
a4' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a4} in
let {a5' :: CDouble
a5' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a5} in
let {a6' :: CDouble
a6' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a6} in
CDouble
-> CDouble -> CDouble -> CDouble -> CDouble -> CDouble -> IO CInt
analyticHestonEngineOptimalControlVariate'_ CDouble
a1' CDouble
a2' CDouble
a3' CDouble
a4' CDouble
a5' CDouble
a6' IO CInt -> (CInt -> IO ComplexLogFormula) -> IO ComplexLogFormula
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CInt
res ->
let {res' :: ComplexLogFormula
res' = (Int -> ComplexLogFormula
forall a. Enum a => Int -> a
toEnum (Int -> ComplexLogFormula)
-> (CInt -> Int) -> CInt -> ComplexLogFormula
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
res} in
ComplexLogFormula -> IO ComplexLogFormula
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (ComplexLogFormula
res')
{-# LINE 866 "./QuantLib/PricingEngine.chs" #-}
analyticHestonHullWhiteEngineTolerance :: (GenHestonModel hm) -> (HullWhite) -> (Double)
-> (Word)
-> IO ((PricingEngine))
analyticHestonHullWhiteEngineTolerance a1 a2 a3 a4 =
withHestonModel a1 $ \a1' ->
withHullWhite a2 $ \a2' ->
let {a3' = realToFrac a3} in
let {a4' = fromIntegral a4} in
preErrorCheck $ \a5' ->
analyticHestonHullWhiteEngineTolerance'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 871 "./QuantLib/PricingEngine.chs" #-}
analyticHestonHullWhiteEngine :: GenHestonModel hm -> HullWhite -> IntegrationControl -> IO PricingEngine
analyticHestonHullWhiteEngine heston hullWhite control =
case control of
IntegrationOrder order -> analyticHestonHullWhiteEngineOrder heston hullWhite order
IntegrationTolerance tolerance evaluations -> analyticHestonHullWhiteEngineTolerance heston hullWhite tolerance evaluations
batesEngineTolerance :: (GenBatesModel bm) -> (Double)
-> (Word)
-> IO ((PricingEngine))
batesEngineTolerance :: forall bm. GenBatesModel bm -> Double -> Word -> IO PricingEngine
batesEngineTolerance GenBatesModel bm
a1 Double
a2 Word
a3 =
GenBatesModel bm
-> (Ptr CBatesModel' -> IO PricingEngine) -> IO PricingEngine
forall bm b. GenBatesModel bm -> (Ptr CBatesModel' -> IO b) -> IO b
withBatesModel GenBatesModel bm
a1 ((Ptr CBatesModel' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CBatesModel' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CBatesModel'
a1' ->
let {a2' :: CDouble
a2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a2} in
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a4' ->
Ptr CBatesModel'
-> CDouble -> CUInt -> Ptr (Ptr CChar) -> IO (Ptr CPricingEngine)
batesEngineTolerance'_ Ptr CBatesModel'
a1' CDouble
a2' CUInt
a3' Ptr (Ptr CChar)
a4' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a4'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 883 "./QuantLib/PricingEngine.chs" #-}
batesEngine :: GenBatesModel bm -> IntegrationControl -> IO PricingEngine
batesEngine model control =
case control of
IntegrationOrder order -> batesEngineOrder model order
IntegrationTolerance tolerance evaluations -> batesEngineTolerance model tolerance evaluations
baroneAdesiWhaleyApproximationEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
baroneAdesiWhaleyApproximationEngine :: GeneralizedBlackScholesProcess -> IO PricingEngine
baroneAdesiWhaleyApproximationEngine GeneralizedBlackScholesProcess
a1 =
GeneralizedBlackScholesProcess
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
GenGeneralizedBlackScholesProcess gbs
-> (Ptr CGeneralizedBlackScholesProcess' -> IO b) -> IO b
withGeneralizedBlackScholesProcess GeneralizedBlackScholesProcess
a1 ((Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CGeneralizedBlackScholesProcess'
a1' ->
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a2' ->
Ptr CGeneralizedBlackScholesProcess'
-> Ptr (Ptr CChar) -> IO (Ptr CPricingEngine)
baroneAdesiWhaleyApproximationEngine'_ Ptr CGeneralizedBlackScholesProcess'
a1' Ptr (Ptr CChar)
a2' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a2'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 893 "./QuantLib/PricingEngine.chs" #-}
batesDetJumpEngineTolerance :: (BatesDetJumpModel) -> (Double)
-> (Word)
-> IO ((PricingEngine))
batesDetJumpEngineTolerance a1 a2 a3 =
withBatesDetJumpModel a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = fromIntegral a3} in
preErrorCheck $ \a4' ->
batesDetJumpEngineTolerance'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 897 "./QuantLib/PricingEngine.chs" #-}
batesDetJumpEngineOrder :: (BatesDetJumpModel) -> (Word)
-> IO ((PricingEngine))
batesDetJumpEngineOrder a1 a2 =
withBatesDetJumpModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
preErrorCheck $ \a3' ->
batesDetJumpEngineOrder'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 900 "./QuantLib/PricingEngine.chs" #-}
batesDetJumpEngine :: BatesDetJumpModel -> IntegrationControl -> IO PricingEngine
batesDetJumpEngine model control =
case control of
IntegrationOrder order -> batesDetJumpEngineOrder model order
IntegrationTolerance tolerance evaluations -> batesDetJumpEngineTolerance model tolerance evaluations
batesDoubleExpDetJumpEngineTolerance :: (BatesDoubleExpDetJumpModel) -> (Double)
-> (Word)
-> IO ((PricingEngine))
batesDoubleExpDetJumpEngineTolerance :: BatesDoubleExpDetJumpModel -> Double -> Word -> IO PricingEngine
batesDoubleExpDetJumpEngineTolerance BatesDoubleExpDetJumpModel
a1 Double
a2 Word
a3 =
BatesDoubleExpDetJumpModel
-> (Ptr CBatesDoubleExpDetJumpModel' -> IO PricingEngine)
-> IO PricingEngine
forall b.
BatesDoubleExpDetJumpModel
-> (Ptr CBatesDoubleExpDetJumpModel' -> IO b) -> IO b
withBatesDoubleExpDetJumpModel BatesDoubleExpDetJumpModel
a1 ((Ptr CBatesDoubleExpDetJumpModel' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CBatesDoubleExpDetJumpModel' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CBatesDoubleExpDetJumpModel'
a1' ->
let {a2' :: CDouble
a2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a2} in
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a4' ->
Ptr CBatesDoubleExpDetJumpModel'
-> CDouble -> CUInt -> Ptr (Ptr CChar) -> IO (Ptr CPricingEngine)
batesDoubleExpDetJumpEngineTolerance'_ Ptr CBatesDoubleExpDetJumpModel'
a1' CDouble
a2' CUInt
a3' Ptr (Ptr CChar)
a4' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a4'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
return (res')
{-# LINE 911 "./QuantLib/PricingEngine.chs" #-}
batesDoubleExpDetJumpEngineOrder :: (BatesDoubleExpDetJumpModel) -> (Word)
-> IO ((PricingEngine))
batesDoubleExpDetJumpEngineOrder a1 a2 =
withBatesDoubleExpDetJumpModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
preErrorCheck $ \a3' ->
batesDoubleExpDetJumpEngineOrder'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 914 "./QuantLib/PricingEngine.chs" #-}
batesDoubleExpDetJumpEngine :: BatesDoubleExpDetJumpModel -> IntegrationControl -> IO PricingEngine
batesDoubleExpDetJumpEngine model control =
case control of
IntegrationOrder order -> batesDoubleExpDetJumpEngineOrder model order
IntegrationTolerance tolerance evaluations -> batesDoubleExpDetJumpEngineTolerance model tolerance evaluations
batesDoubleExpEngineTolerance :: (GenBatesDoubleExpModel bdem) -> (Double)
-> (Word)
-> IO ((PricingEngine))
batesDoubleExpEngineTolerance :: forall bdem.
GenBatesDoubleExpModel bdem -> Double -> Word -> IO PricingEngine
batesDoubleExpEngineTolerance GenBatesDoubleExpModel bdem
a1 Double
a2 Word
a3 =
GenBatesDoubleExpModel bdem
-> (Ptr CBatesDoubleExpModel' -> IO PricingEngine)
-> IO PricingEngine
forall bdem b.
GenBatesDoubleExpModel bdem
-> (Ptr CBatesDoubleExpModel' -> IO b) -> IO b
withBatesDoubleExpModel GenBatesDoubleExpModel bdem
a1 ((Ptr CBatesDoubleExpModel' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CBatesDoubleExpModel' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CBatesDoubleExpModel'
a1' ->
let {a2' :: CDouble
a2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a2} in
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a4' ->
Ptr CBatesDoubleExpModel'
-> CDouble -> CUInt -> Ptr (Ptr CChar) -> IO (Ptr CPricingEngine)
batesDoubleExpEngineTolerance'_ Ptr CBatesDoubleExpModel'
a1' CDouble
a2' CUInt
a3' Ptr (Ptr CChar)
a4' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a4'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 925 "./QuantLib/PricingEngine.chs" #-}
batesDoubleExpEngineOrder :: (GenBatesDoubleExpModel bdem) -> (Word)
-> IO ((PricingEngine))
batesDoubleExpEngineOrder a1 a2 =
withBatesDoubleExpModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
preErrorCheck $ \a3' ->
batesDoubleExpEngineOrder'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 928 "./QuantLib/PricingEngine.chs" #-}
batesDoubleExpEngine :: GenBatesDoubleExpModel bdem -> IntegrationControl -> IO PricingEngine
batesDoubleExpEngine model control =
case control of
IntegrationOrder order -> batesDoubleExpEngineOrder model order
IntegrationTolerance tolerance evaluations -> batesDoubleExpEngineTolerance model tolerance evaluations
bjerksundStenslandApproximationEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
bjerksundStenslandApproximationEngine :: GeneralizedBlackScholesProcess -> IO PricingEngine
bjerksundStenslandApproximationEngine GeneralizedBlackScholesProcess
a1 =
GeneralizedBlackScholesProcess
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
GenGeneralizedBlackScholesProcess gbs
-> (Ptr CGeneralizedBlackScholesProcess' -> IO b) -> IO b
withGeneralizedBlackScholesProcess GeneralizedBlackScholesProcess
a1 ((Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CGeneralizedBlackScholesProcess'
a1' ->
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a2' ->
Ptr CGeneralizedBlackScholesProcess'
-> Ptr (Ptr CChar) -> IO (Ptr CPricingEngine)
bjerksundStenslandApproximationEngine'_ Ptr CGeneralizedBlackScholesProcess'
a1' Ptr (Ptr CChar)
a2' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a2'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 938 "./QuantLib/PricingEngine.chs" #-}
qdPlusAmericanEngine :: (GeneralizedBlackScholesProcess) -> (Word)
-> (SolverType)
-> (Double)
-> (Maybe Word)
-> IO ((PricingEngine))
qdPlusAmericanEngine :: GeneralizedBlackScholesProcess
-> Word -> SolverType -> Double -> Maybe Word -> IO PricingEngine
qdPlusAmericanEngine GeneralizedBlackScholesProcess
a1 Word
a2 SolverType
a3 Double
a4 Maybe Word
a5 =
GeneralizedBlackScholesProcess
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
GenGeneralizedBlackScholesProcess gbs
-> (Ptr CGeneralizedBlackScholesProcess' -> IO b) -> IO b
withGeneralizedBlackScholesProcess GeneralizedBlackScholesProcess
a1 ((Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CGeneralizedBlackScholesProcess'
a1' ->
let {a2' :: CUInt
a2' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a2} in
let {a3' :: CInt
a3' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (SolverType -> Int) -> SolverType -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SolverType -> Int
forall a. Enum a => a -> Int
fromEnum) SolverType
a3} in
let {a4' :: CDouble
a4' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a4} in
let {a5' :: CUInt
a5' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a5} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a6' ->
Ptr CGeneralizedBlackScholesProcess'
-> CUInt
-> CInt
-> CDouble
-> CUInt
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
qdPlusAmericanEngine'_ Ptr CGeneralizedBlackScholesProcess'
a1' CUInt
a2' CInt
a3' CDouble
a4' CUInt
a5' Ptr (Ptr CChar)
a6' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a6'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 948 "./QuantLib/PricingEngine.chs" #-}
qdFpAmericanEngine :: (GeneralizedBlackScholesProcess) -> (QdFpScheme)
-> (FixedPointEquation)
-> IO ((PricingEngine))
qdFpAmericanEngine a1 a2 a3 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
let {a2' = (fromIntegral . fromEnum) a2} in
let {a3' = (fromIntegral . fromEnum) a3} in
preErrorCheck $ \a4' ->
qdFpAmericanEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 957 "./QuantLib/PricingEngine.chs" #-}
continuousArithmeticAsianVecerEngine :: (GeneralizedBlackScholesProcess) -> (Maybe (GenQuote q))
-> (Day)
-> (Word)
-> (Word)
-> (Double)
-> (Double)
-> IO ((PricingEngine))
continuousArithmeticAsianVecerEngine :: forall q.
GeneralizedBlackScholesProcess
-> Maybe (GenQuote q)
-> Day
-> Word
-> Word
-> Double
-> Double
-> IO PricingEngine
continuousArithmeticAsianVecerEngine GeneralizedBlackScholesProcess
a1 Maybe (GenQuote q)
a2 Day
a3 Word
a4 Word
a5 Double
a6 Double
a7 =
GeneralizedBlackScholesProcess
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
GenGeneralizedBlackScholesProcess gbs
-> (Ptr CGeneralizedBlackScholesProcess' -> IO b) -> IO b
withGeneralizedBlackScholesProcess GeneralizedBlackScholesProcess
a1 ((Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CGeneralizedBlackScholesProcess'
a1' ->
Maybe (GenQuote q)
-> (Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine
forall q b. Maybe (GenQuote q) -> (Ptr CQuote' -> IO b) -> IO b
withMaybeQuote Maybe (GenQuote q)
a2 ((Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CQuote' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CQuote'
a2' ->
Day -> (CInt -> IO PricingEngine) -> IO PricingEngine
forall a. Day -> (CInt -> IO a) -> IO a
withDay Day
a3 ((CInt -> IO PricingEngine) -> IO PricingEngine)
-> (CInt -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \CInt
a3' ->
let {a4' :: CUInt
a4' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a4} in
let {a5' :: CUInt
a5' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a5} in
let {a6' :: CDouble
a6' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a6} in
let {a7' :: CDouble
a7' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a7} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a8' ->
Ptr CGeneralizedBlackScholesProcess'
-> Ptr CQuote'
-> CInt
-> CUInt
-> CUInt
-> CDouble
-> CDouble
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
continuousArithmeticAsianVecerEngine'_ Ptr CGeneralizedBlackScholesProcess'
a1' Ptr CQuote'
a2' CInt
a3' CUInt
a4' CUInt
a5' CDouble
a6' CDouble
a7' Ptr (Ptr CChar)
a8' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a8'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 972 "./QuantLib/PricingEngine.chs" #-}
integralCdsEngine :: ((Word,TimeUnit))
-> (GenDefaultProbabilityTermStructure d) -> (Double)
-> (GenYieldTermStructure y)
-> (Maybe Bool)
-> IO ((PricingEngine))
integralCdsEngine a1 a2 a3 a4 a5 =
let {(a1'1, a1'2) = fromEnumQuantity a1} in
withDefaultProbabilityTermStructure a2 $ \a2' ->
let {a3' = realToFrac a3} in
withYieldTermStructure a4 $ \a4' ->
let {a5' = fromMaybeBool a5} in
preErrorCheck $ \a6' ->
integralCdsEngine'_ a1'1 a1'2 a2' a3' a4' a5' a6' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a6'>>
return (res')
{-# LINE 979 "./QuantLib/PricingEngine.chs" #-}
integralEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
integralEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
integralEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 982 "./QuantLib/PricingEngine.chs" #-}
jamshidianSwaptionEngine :: (GenOneFactorAffineModel om) -> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
jamshidianSwaptionEngine a1 a2 =
withOneFactorAffineModel a1 $ \a1' ->
withMaybeYieldTermStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
jamshidianSwaptionEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 985 "./QuantLib/PricingEngine.chs" #-}
gaussian1dSwaptionEngine :: (Gaussian1dModel) -> (Int)
-> (Double)
-> (Bool)
-> (Bool)
-> (Maybe (GenYieldTermStructure y))
-> (Probabilities)
-> IO ((PricingEngine))
gaussian1dSwaptionEngine a1 a2 a3 a4 a5 a6 a7 =
withStandalone a1 $ \a1' ->
let {a2' = fromIntegral a2} in
let {a3' = realToFrac a3} in
let {a4' = C2HSImp.fromBool a4} in
let {a5' = C2HSImp.fromBool a5} in
withMaybeYieldTermStructure a6 $ \a6' ->
let {a7' = (fromIntegral . fromEnum) a7} in
preErrorCheck $ \a8' ->
gaussian1dSwaptionEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a8'>>
return (res')
{-# LINE 995 "./QuantLib/PricingEngine.chs" #-}
gaussian1dNonstandardSwaptionEngine :: (Gaussian1dModel) -> (Int)
-> (Double)
-> (Bool)
-> (Bool)
-> (Maybe (GenQuote q))
-> (Maybe (GenYieldTermStructure y))
-> (Probabilities)
-> IO ((PricingEngine))
gaussian1dNonstandardSwaptionEngine a1 a2 a3 a4 a5 a6 a7 a8 =
withStandalone a1 $ \a1' ->
let {a2' = fromIntegral a2} in
let {a3' = realToFrac a3} in
let {a4' = C2HSImp.fromBool a4} in
let {a5' = C2HSImp.fromBool a5} in
withMaybeQuote a6 $ \a6' ->
withMaybeYieldTermStructure a7 $ \a7' ->
let {a8' = (fromIntegral . fromEnum) a8} in
preErrorCheck $ \a9' ->
gaussian1dNonstandardSwaptionEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a9'>>
return (res')
{-# LINE 1008 "./QuantLib/PricingEngine.chs" #-}
gaussian1dFloatFloatSwaptionEngine :: (Gaussian1dModel) -> (Int)
-> (Double)
-> (Bool)
-> (Bool)
-> (Maybe (GenQuote q))
-> (Maybe (GenYieldTermStructure y))
-> (Bool)
-> (Probabilities)
-> IO ((PricingEngine))
gaussian1dFloatFloatSwaptionEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 =
withStandalone a1 $ \a1' ->
let {a2' = fromIntegral a2} in
let {a3' = realToFrac a3} in
let {a4' = C2HSImp.fromBool a4} in
let {a5' = C2HSImp.fromBool a5} in
withMaybeQuote a6 $ \a6' ->
withMaybeYieldTermStructure a7 $ \a7' ->
let {a8' = C2HSImp.fromBool a8} in
let {a9' = (fromIntegral . fromEnum) a9} in
preErrorCheck $ \a10' ->
gaussian1dFloatFloatSwaptionEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a10'>>
return (res')
{-# LINE 1022 "./QuantLib/PricingEngine.chs" #-}
gaussian1dJamshidianSwaptionEngine :: (Gaussian1dModel) -> IO ((PricingEngine))
gaussian1dJamshidianSwaptionEngine a1 =
withStandalone a1 $ \a1' ->
preErrorCheck $ \a2' ->
gaussian1dJamshidianSwaptionEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 1026 "./QuantLib/PricingEngine.chs" #-}
juQuadraticApproximationEngine :: (GeneralizedBlackScholesProcess) -> IO ((PricingEngine))
juQuadraticApproximationEngine a1 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
juQuadraticApproximationEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 1029 "./QuantLib/PricingEngine.chs" #-}
kirkEngine :: (BlackProcess) -> (BlackProcess) -> (Double)
-> IO ((PricingEngine))
kirkEngine a1 a2 a3 =
withBlackProcess a1 $ \a1' ->
withBlackProcess a2 $ \a2' ->
let {a3' = realToFrac a3} in
preErrorCheck $ \a4' ->
kirkEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1033 "./QuantLib/PricingEngine.chs" #-}
midPointCdsEngine :: (GenDefaultProbabilityTermStructure d) -> (Double)
-> (GenYieldTermStructure y) -> (Maybe Bool)
-> IO ((PricingEngine))
midPointCdsEngine a1 a2 a3 a4 =
withDefaultProbabilityTermStructure a1 $ \a1' ->
let {a2' = realToFrac a2} in
withYieldTermStructure a3 $ \a3' ->
let {a4' = fromMaybeBool a4} in
preErrorCheck $ \a5' ->
midPointCdsEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 1039 "./QuantLib/PricingEngine.chs" #-}
midPointCdoEngine :: (GenYieldTermStructure y)
-> IO ((PricingEngine))
midPointCdoEngine a1 =
withYieldTermStructure a1 $ \a1' ->
preErrorCheck $ \a2' ->
midPointCdoEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 1045 "./QuantLib/PricingEngine.chs" #-}
integralCdoEngine :: (GenYieldTermStructure y)
-> ((Word,TimeUnit))
-> IO ((PricingEngine))
integralCdoEngine a1 a2 =
withYieldTermStructure a1 $ \a1' ->
let {(a2'1, a2'2) = fromEnumQuantity a2} in
preErrorCheck $ \a3' ->
integralCdoEngine'_ a1' a2'1 a2'2 a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 1051 "./QuantLib/PricingEngine.chs" #-}
integralNtdEngine :: ((Word,TimeUnit))
-> (GenYieldTermStructure y)
-> IO ((PricingEngine))
integralNtdEngine a1 a2 =
let {(a1'1, a1'2) = fromEnumQuantity a1} in
withYieldTermStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
integralNtdEngine'_ a1'1 a1'2 a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 1057 "./QuantLib/PricingEngine.chs" #-}
isdaCdsEngine :: (GenDefaultProbabilityTermStructure d) -> (Double)
-> (GenYieldTermStructure y) -> (Maybe Bool)
-> (NumericalFix)
-> (AccrualBias)
-> (ForwardsInCouponPeriod)
-> IO ((PricingEngine))
isdaCdsEngine a1 a2 a3 a4 a5 a6 a7 =
withDefaultProbabilityTermStructure a1 $ \a1' ->
let {a2' = realToFrac a2} in
withYieldTermStructure a3 $ \a3' ->
let {a4' = fromMaybeBool a4} in
let {a5' = (fromIntegral . fromEnum) a5} in
let {a6' = (fromIntegral . fromEnum) a6} in
let {a7' = (fromIntegral . fromEnum) a7} in
preErrorCheck $ \a8' ->
isdaCdsEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a8'>>
return (res')
{-# LINE 1066 "./QuantLib/PricingEngine.chs" #-}
replicatingVarianceSwapEngine :: (GeneralizedBlackScholesProcess) -> (Double)
-> (NonEmpty Double)
-> (NonEmpty Double)
-> IO ((PricingEngine))
replicatingVarianceSwapEngine a1 a2 a3 a4 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
let {a2' = realToFrac a2} in
withNonEmptyDoubleArray a3 $ \(a3'1, a3'2) ->
withNonEmptyDoubleArray a4 $ \(a4'1, a4'2) ->
preErrorCheck $ \a5' ->
replicatingVarianceSwapEngine'_ a1' a2' a3'1 a3'2 a4'1 a4'2 a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 1072 "./QuantLib/PricingEngine.chs" #-}
stulzEngine :: (GeneralizedBlackScholesProcess) -> (GeneralizedBlackScholesProcess) -> (Double)
-> IO ((PricingEngine))
stulzEngine a1 a2 a3 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withGeneralizedBlackScholesProcess a2 $ \a2' ->
let {a3' = realToFrac a3} in
preErrorCheck $ \a4' ->
stulzEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1076 "./QuantLib/PricingEngine.chs" #-}
bjerksundStenslandSpreadEngine :: (GeneralizedBlackScholesProcess) -> (GeneralizedBlackScholesProcess) -> (Double)
-> IO ((PricingEngine))
bjerksundStenslandSpreadEngine a1 a2 a3 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withGeneralizedBlackScholesProcess a2 $ \a2' ->
let {a3' = realToFrac a3} in
preErrorCheck $ \a4' ->
bjerksundStenslandSpreadEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1080 "./QuantLib/PricingEngine.chs" #-}
operatorSplittingSpreadEngine :: (GeneralizedBlackScholesProcess) -> (GeneralizedBlackScholesProcess) -> (Double)
-> (OperatorSplittingOrder)
-> IO ((PricingEngine))
operatorSplittingSpreadEngine a1 a2 a3 a4 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withGeneralizedBlackScholesProcess a2 $ \a2' ->
let {a3' = realToFrac a3} in
let {a4' = (fromIntegral . fromEnum) a4} in
preErrorCheck $ \a5' ->
operatorSplittingSpreadEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 1085 "./QuantLib/PricingEngine.chs" #-}
pearsonSpreadEngine :: (GeneralizedBlackScholesProcess) -> (GeneralizedBlackScholesProcess) -> (Double)
-> (Double)
-> (Word)
-> (Double)
-> IO ((PricingEngine))
pearsonSpreadEngine a1 a2 a3 a4 a5 a6 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withGeneralizedBlackScholesProcess a2 $ \a2' ->
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = fromIntegral a5} in
let {a6' = realToFrac a6} in
preErrorCheck $ \a7' ->
pearsonSpreadEngine'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a7'>>
return (res')
{-# LINE 1092 "./QuantLib/PricingEngine.chs" #-}
gaussianCopulaSpreadEngine :: (GeneralizedBlackScholesProcess) -> (GeneralizedBlackScholesProcess) -> (Double)
-> (Word)
-> IO ((PricingEngine))
gaussianCopulaSpreadEngine a1 a2 a3 a4 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withGeneralizedBlackScholesProcess a2 $ \a2' ->
let {a3' = realToFrac a3} in
let {a4' = fromIntegral a4} in
preErrorCheck $ \a5' ->
gaussianCopulaSpreadEngine'_ a1' a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 1097 "./QuantLib/PricingEngine.chs" #-}
choiBasketEngine :: NonEmpty GeneralizedBlackScholesProcess -> Matrix Double
-> Double
-> Word
-> Bool
-> Bool
-> IO PricingEngine
choiBasketEngine ps (Matrix mr mc md) = qlChoiBasketEngine (toList ps) mr mc md
qlChoiBasketEngine :: ([GeneralizedBlackScholesProcess]) -> (Word) -> (Word) -> ([Double]) -> (Double)
-> (Word)
-> (Bool)
-> (Bool)
-> IO ((PricingEngine))
qlChoiBasketEngine :: [GeneralizedBlackScholesProcess]
-> Word
-> Word
-> [Double]
-> Double
-> Word
-> Bool
-> Bool
-> IO PricingEngine
qlChoiBasketEngine [GeneralizedBlackScholesProcess]
a1 Word
a2 Word
a3 [Double]
a4 Double
a5 Word
a6 Bool
a7 Bool
a8 =
[GeneralizedBlackScholesProcess]
-> ((CUInt, Ptr (Ptr CGeneralizedBlackScholesProcess'))
-> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
[GenGeneralizedBlackScholesProcess gbs]
-> ((CUInt, Ptr (Ptr CGeneralizedBlackScholesProcess')) -> IO b)
-> IO b
withGeneralizedBlackScholesProcessArray [GeneralizedBlackScholesProcess]
a1 (((CUInt, Ptr (Ptr CGeneralizedBlackScholesProcess'))
-> IO PricingEngine)
-> IO PricingEngine)
-> ((CUInt, Ptr (Ptr CGeneralizedBlackScholesProcess'))
-> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \(CUInt
a1'1, Ptr (Ptr CGeneralizedBlackScholesProcess')
a1'2) ->
let {a2' :: CUInt
a2' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a2} in
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
[Double] -> (Ptr CDouble -> IO PricingEngine) -> IO PricingEngine
forall b. [Double] -> (Ptr CDouble -> IO b) -> IO b
withDoubleArrayRaw [Double]
a4 ((Ptr CDouble -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CDouble -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CDouble
a4' ->
let {a5' :: CDouble
a5' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a5} in
let {a6' :: CUInt
a6' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a6} in
let {a7' :: CInt
a7' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a7} in
let {a8' :: CInt
a8' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a8} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a9' ->
CUInt
-> Ptr (Ptr CGeneralizedBlackScholesProcess')
-> CUInt
-> CUInt
-> Ptr CDouble
-> CDouble
-> CUInt
-> CInt
-> CInt
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
qlChoiBasketEngine'_ CUInt
a1'1 Ptr (Ptr CGeneralizedBlackScholesProcess')
a1'2 CUInt
a2' CUInt
a3' Ptr CDouble
a4' CDouble
a5' CUInt
a6' CInt
a7' CInt
a8' Ptr (Ptr CChar)
a9' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a9'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1114 "./QuantLib/PricingEngine.chs" #-}
dengLiZhouBasketEngine :: NonEmpty GeneralizedBlackScholesProcess -> Matrix Double
-> IO PricingEngine
dengLiZhouBasketEngine ps (Matrix mr mc md) = qlDengLiZhouBasketEngine (toList ps) mr mc md
qlDengLiZhouBasketEngine :: ([GeneralizedBlackScholesProcess]) -> (Word) -> (Word) -> ([Double]) -> IO ((PricingEngine))
qlDengLiZhouBasketEngine a1 a2 a3 a4 =
withGeneralizedBlackScholesProcessArray a1 $ \(a1'1, a1'2) ->
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
withDoubleArrayRaw a4 $ \a4' ->
preErrorCheck $ \a5' ->
qlDengLiZhouBasketEngine'_ a1'1 a1'2 a2' a3' a4' a5' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 1123 "./QuantLib/PricingEngine.chs" #-}
singleFactorBsmBasketEngine :: NonEmpty GeneralizedBlackScholesProcess
-> Double
-> IO PricingEngine
singleFactorBsmBasketEngine ps = qlSingleFactorBsmBasketEngine (toList ps)
qlSingleFactorBsmBasketEngine :: ([GeneralizedBlackScholesProcess]) -> (Double)
-> IO ((PricingEngine))
qlSingleFactorBsmBasketEngine a1 a2 =
withGeneralizedBlackScholesProcessArray a1 $ \(a1'1, a1'2) ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlSingleFactorBsmBasketEngine'_ a1'1 a1'2 a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 1132 "./QuantLib/PricingEngine.chs" #-}
lfmSwaptionEngine :: (LiborForwardModel) -> (GenYieldTermStructure y) -> IO ((PricingEngine))
lfmSwaptionEngine a1 a2 =
withGenCalibratedModel a1 $ \a1' ->
withYieldTermStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
lfmSwaptionEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 1135 "./QuantLib/PricingEngine.chs" #-}
treeCapFloorEngineTimeGrid :: (GenShortRateModel sm) -> (TimeGrid) -> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
treeCapFloorEngineTimeGrid a1 a2 a3 =
withShortRateModel a1 $ \a1' ->
withTimeGrid a2 $ \a2' ->
withMaybeYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
treeCapFloorEngineTimeGrid'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1138 "./QuantLib/PricingEngine.chs" #-}
treeSwaptionEngineTimeGrid :: (GenShortRateModel sm) -> (TimeGrid) -> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
treeSwaptionEngineTimeGrid a1 a2 a3 =
withShortRateModel a1 $ \a1' ->
withTimeGrid a2 $ \a2' ->
withMaybeYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
treeSwaptionEngineTimeGrid'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1141 "./QuantLib/PricingEngine.chs" #-}
treeVanillaSwapEngineTimeGrid :: (GenShortRateModel sm) -> (TimeGrid) -> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
treeVanillaSwapEngineTimeGrid a1 a2 a3 =
withShortRateModel a1 $ \a1' ->
withTimeGrid a2 $ \a2' ->
withMaybeYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
treeVanillaSwapEngineTimeGrid'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1144 "./QuantLib/PricingEngine.chs" #-}
treeCapFloorEngine :: GenShortRateModel sm -> LatticeTime -> Maybe (GenYieldTermStructure y) -> IO PricingEngine
treeCapFloorEngine model latticeTime curve =
case latticeTime of
TimeSteps steps -> treeCapFloorEngineTimeSteps model steps curve
ExplicitTimeGrid grid -> treeCapFloorEngineTimeGrid model grid curve
treeSwaptionEngine :: GenShortRateModel sm -> LatticeTime -> Maybe (GenYieldTermStructure y) -> IO PricingEngine
treeSwaptionEngine model latticeTime curve =
case latticeTime of
TimeSteps steps -> treeSwaptionEngineTimeSteps model steps curve
ExplicitTimeGrid grid -> treeSwaptionEngineTimeGrid model grid curve
treeVanillaSwapEngine :: GenShortRateModel sm -> LatticeTime -> Maybe (GenYieldTermStructure y) -> IO PricingEngine
treeVanillaSwapEngine :: forall sm y.
GenShortRateModel sm
-> LatticeTime
-> Maybe (GenYieldTermStructure y)
-> IO PricingEngine
treeVanillaSwapEngine GenShortRateModel sm
model LatticeTime
latticeTime Maybe (GenYieldTermStructure y)
curve =
case LatticeTime
latticeTime of
TimeSteps Word
steps -> GenShortRateModel sm
-> Word -> Maybe (GenYieldTermStructure y) -> IO PricingEngine
forall sm y.
GenShortRateModel sm
-> Word -> Maybe (GenYieldTermStructure y) -> IO PricingEngine
treeVanillaSwapEngineTimeSteps GenShortRateModel sm
model Word
steps Maybe (GenYieldTermStructure y)
curve
ExplicitTimeGrid TimeGrid
grid -> GenShortRateModel sm
-> TimeGrid -> Maybe (GenYieldTermStructure y) -> IO PricingEngine
forall sm y.
GenShortRateModel sm
-> TimeGrid -> Maybe (GenYieldTermStructure y) -> IO PricingEngine
treeVanillaSwapEngineTimeGrid GenShortRateModel sm
model TimeGrid
grid Maybe (GenYieldTermStructure y)
curve
fdmQuantoHelper :: (GenYieldTermStructure y1)
-> (GenYieldTermStructure y2)
-> (GenBlackVolTermStructure bv)
-> (Double)
-> (Double)
-> IO ((FdmQuantoHelper))
fdmQuantoHelper :: forall y1 y2 bv.
GenYieldTermStructure y1
-> GenYieldTermStructure y2
-> GenBlackVolTermStructure bv
-> Double
-> Double
-> IO FdmQuantoHelper
fdmQuantoHelper GenYieldTermStructure y1
a1 GenYieldTermStructure y2
a2 GenBlackVolTermStructure bv
a3 Double
a4 Double
a5 =
GenYieldTermStructure y1
-> (Ptr CYieldTermStructure' -> IO FdmQuantoHelper)
-> IO FdmQuantoHelper
forall y b.
GenYieldTermStructure y
-> (Ptr CYieldTermStructure' -> IO b) -> IO b
withYieldTermStructure GenYieldTermStructure y1
a1 ((Ptr CYieldTermStructure' -> IO FdmQuantoHelper)
-> IO FdmQuantoHelper)
-> (Ptr CYieldTermStructure' -> IO FdmQuantoHelper)
-> IO FdmQuantoHelper
forall a b. (a -> b) -> a -> b
$ \Ptr CYieldTermStructure'
a1' ->
GenYieldTermStructure y2
-> (Ptr CYieldTermStructure' -> IO FdmQuantoHelper)
-> IO FdmQuantoHelper
forall y b.
GenYieldTermStructure y
-> (Ptr CYieldTermStructure' -> IO b) -> IO b
withYieldTermStructure GenYieldTermStructure y2
a2 ((Ptr CYieldTermStructure' -> IO FdmQuantoHelper)
-> IO FdmQuantoHelper)
-> (Ptr CYieldTermStructure' -> IO FdmQuantoHelper)
-> IO FdmQuantoHelper
forall a b. (a -> b) -> a -> b
$ \Ptr CYieldTermStructure'
a2' ->
GenBlackVolTermStructure bv
-> (Ptr CBlackVolTermStructure' -> IO FdmQuantoHelper)
-> IO FdmQuantoHelper
forall bv b.
GenBlackVolTermStructure bv
-> (Ptr CBlackVolTermStructure' -> IO b) -> IO b
withBlackVolTermStructure GenBlackVolTermStructure bv
a3 ((Ptr CBlackVolTermStructure' -> IO FdmQuantoHelper)
-> IO FdmQuantoHelper)
-> (Ptr CBlackVolTermStructure' -> IO FdmQuantoHelper)
-> IO FdmQuantoHelper
forall a b. (a -> b) -> a -> b
$ \Ptr CBlackVolTermStructure'
a3' ->
let {a4' :: CDouble
a4' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a4} in
let {a5' :: CDouble
a5' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a5} in
(Ptr (Ptr CChar) -> IO FdmQuantoHelper) -> IO FdmQuantoHelper
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO FdmQuantoHelper) -> IO FdmQuantoHelper)
-> (Ptr (Ptr CChar) -> IO FdmQuantoHelper) -> IO FdmQuantoHelper
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a6' ->
Ptr CYieldTermStructure'
-> Ptr CYieldTermStructure'
-> Ptr CBlackVolTermStructure'
-> CDouble
-> CDouble
-> Ptr (Ptr CChar)
-> IO (Ptr CFdmQuantoHelper)
fdmQuantoHelper'_ Ptr CYieldTermStructure'
a1' Ptr CYieldTermStructure'
a2' Ptr CBlackVolTermStructure'
a3' CDouble
a4' CDouble
a5' Ptr (Ptr CChar)
a6' IO (Ptr CFdmQuantoHelper)
-> (Ptr CFdmQuantoHelper -> IO FdmQuantoHelper)
-> IO FdmQuantoHelper
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CFdmQuantoHelper
res ->
Ptr CFdmQuantoHelper -> IO FdmQuantoHelper
peekFdmQuantoHelper Ptr CFdmQuantoHelper
res IO FdmQuantoHelper
-> (FdmQuantoHelper -> IO FdmQuantoHelper) -> IO FdmQuantoHelper
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \FdmQuantoHelper
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a6'IO () -> IO FdmQuantoHelper -> IO FdmQuantoHelper
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
FdmQuantoHelper -> IO FdmQuantoHelper
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (FdmQuantoHelper
res')
{-# LINE 1175 "./QuantLib/PricingEngine.chs" #-}
quantoAdjustment :: (FdmQuantoHelper) -> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
quantoAdjustment a1 a2 a3 a4 =
withFdmQuantoHelper a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
preErrorCheck $ \a5' ->
quantoAdjustment'_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = realToFrac res} in
errorCheck a5'>>
return (res')
{-# LINE 1182 "./QuantLib/PricingEngine.chs" #-}
fd2dBlackScholesVanillaEngine :: (GeneralizedBlackScholesProcess) -> (GeneralizedBlackScholesProcess) -> (Double)
-> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme)
-> (Bool)
-> (Double)
-> IO ((PricingEngine))
fd2dBlackScholesVanillaEngine :: GeneralizedBlackScholesProcess
-> GeneralizedBlackScholesProcess
-> Double
-> Word
-> Word
-> Word
-> Word
-> FdmScheme
-> Bool
-> Double
-> IO PricingEngine
fd2dBlackScholesVanillaEngine GeneralizedBlackScholesProcess
a1 GeneralizedBlackScholesProcess
a2 Double
a3 Word
a4 Word
a5 Word
a6 Word
a7 FdmScheme
a8 Bool
a9 Double
a10 =
GeneralizedBlackScholesProcess
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
GenGeneralizedBlackScholesProcess gbs
-> (Ptr CGeneralizedBlackScholesProcess' -> IO b) -> IO b
withGeneralizedBlackScholesProcess GeneralizedBlackScholesProcess
a1 ((Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CGeneralizedBlackScholesProcess'
a1' ->
GeneralizedBlackScholesProcess
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
GenGeneralizedBlackScholesProcess gbs
-> (Ptr CGeneralizedBlackScholesProcess' -> IO b) -> IO b
withGeneralizedBlackScholesProcess GeneralizedBlackScholesProcess
a2 ((Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CGeneralizedBlackScholesProcess'
a2' ->
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
let {a4' :: CUInt
a4' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a4} in
let {a5' :: CUInt
a5' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a5} in
let {a6' :: CUInt
a6' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a6} in
let {a7' :: CUInt
a7' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a7} in
FdmScheme
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a. FdmScheme -> (Ptr CFdmSchemeDesc -> IO a) -> IO a
withFdmSchemeDesc FdmScheme
a8 ((Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CFdmSchemeDesc
a8' ->
let {a9' :: CInt
a9' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a9} in
let {a10' :: CDouble
a10' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a10} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a11' ->
Ptr CGeneralizedBlackScholesProcess'
-> Ptr CGeneralizedBlackScholesProcess'
-> CDouble
-> CUInt
-> CUInt
-> CUInt
-> CUInt
-> Ptr CFdmSchemeDesc
-> CInt
-> CDouble
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
fd2dBlackScholesVanillaEngine'_ Ptr CGeneralizedBlackScholesProcess'
a1' Ptr CGeneralizedBlackScholesProcess'
a2' CDouble
a3' CUInt
a4' CUInt
a5' CUInt
a6' CUInt
a7' Ptr CFdmSchemeDesc
a8' CInt
a9' CDouble
a10' Ptr (Ptr CChar)
a11' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a11'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1193 "./QuantLib/PricingEngine.chs" #-}
fdndimBlackScholesVanillaEngineAxisGrids :: NonEmpty GeneralizedBlackScholesProcess -> Matrix Double
-> NonEmpty Word
-> Word
-> Word
-> FdmScheme
-> IO PricingEngine
fdndimBlackScholesVanillaEngineAxisGrids ps (Matrix mr mc md) xGrids = qlFdndimBlackScholesVanillaEngine (toList ps) mr mc md (toList xGrids)
qlFdndimBlackScholesVanillaEngine :: ([GeneralizedBlackScholesProcess]) -> (Word) -> (Word) -> ([Double]) -> ([Word]) -> (Word)
-> (Word)
-> (FdmScheme) -> IO ((PricingEngine))
qlFdndimBlackScholesVanillaEngine a1 a2 a3 a4 a5 a6 a7 a8 =
withGeneralizedBlackScholesProcessArray a1 $ \(a1'1, a1'2) ->
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
withDoubleArrayRaw a4 $ \a4' ->
withIntArray a5 $ \(a5'1, a5'2) ->
let {a6' = fromIntegral a6} in
let {a7' = fromIntegral a7} in
withFdmSchemeDesc a8 $ \a8' ->
preErrorCheck $ \a9' ->
qlFdndimBlackScholesVanillaEngine'_ a1'1 a1'2 a2' a3' a4' a5'1 a5'2 a6' a7' a8' a9' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a9'>>
return (res')
{-# LINE 1210 "./QuantLib/PricingEngine.chs" #-}
fdndimBlackScholesVanillaEngineUniformGrid :: NonEmpty GeneralizedBlackScholesProcess -> Matrix Double
-> Word
-> Word
-> Word
-> FdmScheme
-> IO PricingEngine
fdndimBlackScholesVanillaEngineUniformGrid ps (Matrix mr mc md) = qlFdndimBlackScholesVanillaEngine1 (toList ps) mr mc md
qlFdndimBlackScholesVanillaEngine1 :: ([GeneralizedBlackScholesProcess]) -> (Word) -> (Word) -> ([Double]) -> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> IO ((PricingEngine))
qlFdndimBlackScholesVanillaEngine1 :: [GeneralizedBlackScholesProcess]
-> Word
-> Word
-> [Double]
-> Word
-> Word
-> Word
-> FdmScheme
-> IO PricingEngine
qlFdndimBlackScholesVanillaEngine1 [GeneralizedBlackScholesProcess]
a1 Word
a2 Word
a3 [Double]
a4 Word
a5 Word
a6 Word
a7 FdmScheme
a8 =
[GeneralizedBlackScholesProcess]
-> ((CUInt, Ptr (Ptr CGeneralizedBlackScholesProcess'))
-> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
[GenGeneralizedBlackScholesProcess gbs]
-> ((CUInt, Ptr (Ptr CGeneralizedBlackScholesProcess')) -> IO b)
-> IO b
withGeneralizedBlackScholesProcessArray [GeneralizedBlackScholesProcess]
a1 (((CUInt, Ptr (Ptr CGeneralizedBlackScholesProcess'))
-> IO PricingEngine)
-> IO PricingEngine)
-> ((CUInt, Ptr (Ptr CGeneralizedBlackScholesProcess'))
-> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \(CUInt
a1'1, Ptr (Ptr CGeneralizedBlackScholesProcess')
a1'2) ->
let {a2' :: CUInt
a2' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a2} in
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
[Double] -> (Ptr CDouble -> IO PricingEngine) -> IO PricingEngine
forall b. [Double] -> (Ptr CDouble -> IO b) -> IO b
withDoubleArrayRaw [Double]
a4 ((Ptr CDouble -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CDouble -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CDouble
a4' ->
let {a5' :: CUInt
a5' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a5} in
let {a6' :: CUInt
a6' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a6} in
let {a7' :: CUInt
a7' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a7} in
FdmScheme
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a. FdmScheme -> (Ptr CFdmSchemeDesc -> IO a) -> IO a
withFdmSchemeDesc FdmScheme
a8 ((Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CFdmSchemeDesc
a8' ->
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a9' ->
CUInt
-> Ptr (Ptr CGeneralizedBlackScholesProcess')
-> CUInt
-> CUInt
-> Ptr CDouble
-> CUInt
-> CUInt
-> CUInt
-> Ptr CFdmSchemeDesc
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
qlFdndimBlackScholesVanillaEngine1'_ CUInt
a1'1 Ptr (Ptr CGeneralizedBlackScholesProcess')
a1'2 CUInt
a2' CUInt
a3' Ptr CDouble
a4' CUInt
a5' CUInt
a6' CUInt
a7' Ptr CFdmSchemeDesc
a8' Ptr (Ptr CChar)
a9' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a9'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1227 "./QuantLib/PricingEngine.chs" #-}
fdndimBlackScholesVanillaEngine :: NonEmpty GeneralizedBlackScholesProcess -> Matrix Double
-> FdmGrid -> Word -> Word -> FdmScheme -> IO PricingEngine
fdndimBlackScholesVanillaEngine processes correlations grid =
case grid of
UniformGrid gridSize -> fdndimBlackScholesVanillaEngineUniformGrid processes correlations gridSize
AxisGrids sizes -> fdndimBlackScholesVanillaEngineAxisGrids processes correlations sizes
fdG2SwaptionEngine :: (G2) -> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (Double)
-> (FdmScheme) -> IO ((PricingEngine))
fdG2SwaptionEngine :: G2
-> Word
-> Word
-> Word
-> Word
-> Double
-> FdmScheme
-> IO PricingEngine
fdG2SwaptionEngine G2
a1 Word
a2 Word
a3 Word
a4 Word
a5 Double
a6 FdmScheme
a7 =
G2 -> (Ptr CG2' -> IO PricingEngine) -> IO PricingEngine
forall b. G2 -> (Ptr CG2' -> IO b) -> IO b
withG2 G2
a1 ((Ptr CG2' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CG2' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CG2'
a1' ->
let {a2' :: CUInt
a2' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a2} in
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
let {a4' :: CUInt
a4' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a4} in
let {a5' :: CUInt
a5' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a5} in
let {a6' :: CDouble
a6' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a6} in
FdmScheme
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a. FdmScheme -> (Ptr CFdmSchemeDesc -> IO a) -> IO a
withFdmSchemeDesc FdmScheme
a7 ((Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CFdmSchemeDesc
a7' ->
preErrorCheck $ \a8' ->
fdG2SwaptionEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a8'>>
return (res')
{-# LINE 1243 "./QuantLib/PricingEngine.chs" #-}
fdHullWhiteSwaptionEngine :: (HullWhite) -> (Word)
-> (Word)
-> (Word)
-> (Double)
-> (FdmScheme) -> IO ((PricingEngine))
fdHullWhiteSwaptionEngine a1 a2 a3 a4 a5 a6 =
withHullWhite a1 $ \a1' ->
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = realToFrac a5} in
withFdmSchemeDesc a6 $ \a6' ->
preErrorCheck $ \a7' ->
fdHullWhiteSwaptionEngine'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a7'>>
return (res')
{-# LINE 1250 "./QuantLib/PricingEngine.chs" #-}
fdBlackScholesBarrierEngine :: (GeneralizedBlackScholesProcess) -> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Bool)
-> (Double)
-> IO ((PricingEngine))
fdBlackScholesBarrierEngine a1 a2 a3 a4 a5 a6 a7 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
withFdmSchemeDesc a5 $ \a5' ->
let {a6' = C2HSImp.fromBool a6} in
let {a7' = realToFrac a7} in
preErrorCheck $ \a8' ->
fdBlackScholesBarrierEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a8'>>
return (res')
{-# LINE 1259 "./QuantLib/PricingEngine.chs" #-}
fdHestonBarrierEngineNoDividends :: (GenHestonModel hm) -> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Maybe (GenLocalVolTermStructure lv))
-> (Double)
-> IO ((PricingEngine))
fdHestonBarrierEngineNoDividends a1 a2 a3 a4 a5 a6 a7 a8 =
withHestonModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
withFdmSchemeDesc a6 $ \a6' ->
withMaybeLocalVolTermStructure a7 $ \a7' ->
let {a8' = realToFrac a8} in
preErrorCheck $ \a9' ->
fdHestonBarrierEngineNoDividends'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a9'>>
return (res')
{-# LINE 1269 "./QuantLib/PricingEngine.chs" #-}
fdHestonBarrierEngineWithDividends :: (GenHestonModel hm) -> ([Dividend]) -> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Maybe (GenLocalVolTermStructure lv))
-> (Double)
-> IO ((PricingEngine))
fdHestonBarrierEngineWithDividends a1 a2 a3 a4 a5 a6 a7 a8 a9 =
withHestonModel a1 $ \a1' ->
withDividendArray a2 $ \(a2'1, a2'2) ->
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
let {a6' = fromIntegral a6} in
withFdmSchemeDesc a7 $ \a7' ->
withMaybeLocalVolTermStructure a8 $ \a8' ->
let {a9' = realToFrac a9} in
preErrorCheck $ \a10' ->
fdHestonBarrierEngineWithDividends'_ a1' a2'1 a2'2 a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a10'>>
return (res')
{-# LINE 1280 "./QuantLib/PricingEngine.chs" #-}
fdHestonBarrierEngine :: GenHestonModel hm -> [Dividend] -> Word -> Word -> Word -> Word
-> FdmScheme -> Maybe (GenLocalVolTermStructure lv) -> Double -> IO PricingEngine
fdHestonBarrierEngine model dividends =
case dividends of
[] -> fdHestonBarrierEngineNoDividends model
_ -> fdHestonBarrierEngineWithDividends model dividends
fdHestonDoubleBarrierEngine :: (GenHestonModel hm) -> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Maybe (GenLocalVolTermStructure lv))
-> (Double)
-> IO ((PricingEngine))
fdHestonDoubleBarrierEngine :: forall hm lv.
GenHestonModel hm
-> Word
-> Word
-> Word
-> Word
-> FdmScheme
-> Maybe (GenLocalVolTermStructure lv)
-> Double
-> IO PricingEngine
fdHestonDoubleBarrierEngine GenHestonModel hm
a1 Word
a2 Word
a3 Word
a4 Word
a5 FdmScheme
a6 Maybe (GenLocalVolTermStructure lv)
a7 Double
a8 =
GenHestonModel hm
-> (Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine
forall hm b.
GenHestonModel hm -> (Ptr CHestonModel' -> IO b) -> IO b
withHestonModel GenHestonModel hm
a1 ((Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CHestonModel'
a1' ->
let {a2' :: CUInt
a2' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a2} in
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
let {a4' :: CUInt
a4' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a4} in
let {a5' :: CUInt
a5' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a5} in
FdmScheme
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a. FdmScheme -> (Ptr CFdmSchemeDesc -> IO a) -> IO a
withFdmSchemeDesc FdmScheme
a6 ((Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CFdmSchemeDesc
a6' ->
Maybe (GenLocalVolTermStructure lv)
-> (Ptr CLocalVolTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall lv b.
Maybe (GenLocalVolTermStructure lv)
-> (Ptr CLocalVolTermStructure' -> IO b) -> IO b
withMaybeLocalVolTermStructure Maybe (GenLocalVolTermStructure lv)
a7 ((Ptr CLocalVolTermStructure' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CLocalVolTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CLocalVolTermStructure'
a7' ->
let {a8' :: CDouble
a8' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a8} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a9' ->
Ptr CHestonModel'
-> CUInt
-> CUInt
-> CUInt
-> CUInt
-> Ptr CFdmSchemeDesc
-> Ptr CLocalVolTermStructure'
-> CDouble
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
fdHestonDoubleBarrierEngine'_ Ptr CHestonModel'
a1' CUInt
a2' CUInt
a3' CUInt
a4' CUInt
a5' Ptr CFdmSchemeDesc
a6' Ptr CLocalVolTermStructure'
a7' CDouble
a8' Ptr (Ptr CChar)
a9' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a9'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1298 "./QuantLib/PricingEngine.chs" #-}
mcHestonHullWhiteEngine :: (RngTrait) -> (StatisticsTrait) -> (HybridHestonHullWhiteProcess) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcHestonHullWhiteEngine :: RngTrait
-> StatisticsTrait
-> HybridHestonHullWhiteProcess
-> Maybe Word
-> Maybe Word
-> Bool
-> Bool
-> Maybe Word
-> Maybe Double
-> Maybe Word
-> Word
-> IO PricingEngine
mcHestonHullWhiteEngine RngTrait
a1 StatisticsTrait
a2 HybridHestonHullWhiteProcess
a3 Maybe Word
a4 Maybe Word
a5 Bool
a6 Bool
a7 Maybe Word
a8 Maybe Double
a9 Maybe Word
a10 Word
a11 =
let {a1' :: CInt
a1' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (RngTrait -> Int) -> RngTrait -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RngTrait -> Int
forall a. Enum a => a -> Int
fromEnum) RngTrait
a1} in
let {a2' :: CInt
a2' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (StatisticsTrait -> Int) -> StatisticsTrait -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StatisticsTrait -> Int
forall a. Enum a => a -> Int
fromEnum) StatisticsTrait
a2} in
HybridHestonHullWhiteProcess
-> (Ptr CHybridHestonHullWhiteProcess' -> IO PricingEngine)
-> IO PricingEngine
forall p b.
GenStochasticProcess (ForeignPtr p) -> (Ptr p -> IO b) -> IO b
withGenStochasticProcess HybridHestonHullWhiteProcess
a3 ((Ptr CHybridHestonHullWhiteProcess' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CHybridHestonHullWhiteProcess' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CHybridHestonHullWhiteProcess'
a3' ->
let {a4' :: CUInt
a4' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a4} in
let {a5' :: CUInt
a5' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a5} in
let {a6' :: CInt
a6' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a6} in
let {a7' :: CInt
a7' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a7} in
let {a8' :: CUInt
a8' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a8} in
let {a9' :: CDouble
a9' = Maybe Double -> CDouble
fromMaybeDouble Maybe Double
a9} in
let {a10' :: CUInt
a10' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a10} in
let {a11' :: CUInt
a11' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a11} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a12' ->
CInt
-> CInt
-> Ptr CHybridHestonHullWhiteProcess'
-> CUInt
-> CUInt
-> CInt
-> CInt
-> CUInt
-> CDouble
-> CUInt
-> CUInt
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
mcHestonHullWhiteEngine'_ CInt
a1' CInt
a2' Ptr CHybridHestonHullWhiteProcess'
a3' CUInt
a4' CUInt
a5' CInt
a6' CInt
a7' CUInt
a8' CDouble
a9' CUInt
a10' CUInt
a11' Ptr (Ptr CChar)
a12' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a12'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1313 "./QuantLib/PricingEngine.chs" #-}
mcAmericanEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Maybe Word) -> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> (Word)
-> (PolynomialType) -> (Maybe Word)
-> (Maybe Bool)
-> (Maybe Word)
-> IO ((PricingEngine))
mcAmericanEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = C2HSImp.fromBool a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromMaybeDouble a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = fromIntegral a11} in
let {a12' = fromIntegral a12} in
let {a13' = (fromIntegral . fromEnum) a13} in
let {a14' = fromMaybeInt a14} in
let {a15' = fromMaybeBool a15} in
let {a16' = fromMaybeInt a16} in
preErrorCheck $ \a17' ->
mcAmericanEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' a13' a14' a15' a16' a17' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a17'>>
return (res')
{-# LINE 1328 "./QuantLib/PricingEngine.chs" #-}
mcBarrierEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Bool)
-> (Word)
-> IO ((PricingEngine))
mcBarrierEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = C2HSImp.fromBool a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromMaybeDouble a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = C2HSImp.fromBool a11} in
let {a12' = fromIntegral a12} in
preErrorCheck $ \a13' ->
mcBarrierEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' a13' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a13'>>
return (res')
{-# LINE 1340 "./QuantLib/PricingEngine.chs" #-}
mcDigitalEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Maybe Word)
-> (Maybe Word) -> (Bool) -> (Bool) -> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcDigitalEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = C2HSImp.fromBool a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromMaybeDouble a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = fromIntegral a11} in
preErrorCheck $ \a12' ->
mcDigitalEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 1351 "./QuantLib/PricingEngine.chs" #-}
mcDiscreteArithmeticApEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Bool)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcDiscreteArithmeticApEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = C2HSImp.fromBool a4} in
let {a5' = C2HSImp.fromBool a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = fromMaybeInt a7} in
let {a8' = fromMaybeDouble a8} in
let {a9' = fromMaybeInt a9} in
let {a10' = fromIntegral a10} in
preErrorCheck $ \a11' ->
mcDiscreteArithmeticApEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a11'>>
return (res')
{-# LINE 1361 "./QuantLib/PricingEngine.chs" #-}
mcDiscreteArithmeticAsEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcDiscreteArithmeticAsEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = C2HSImp.fromBool a4} in
let {a5' = C2HSImp.fromBool a5} in
let {a6' = fromMaybeInt a6} in
let {a7' = fromMaybeDouble a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromIntegral a9} in
preErrorCheck $ \a10' ->
mcDiscreteArithmeticAsEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a10'>>
return (res')
{-# LINE 1370 "./QuantLib/PricingEngine.chs" #-}
mcDiscreteGeometricApEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcDiscreteGeometricApEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = C2HSImp.fromBool a4} in
let {a5' = C2HSImp.fromBool a5} in
let {a6' = fromMaybeInt a6} in
let {a7' = fromMaybeDouble a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromIntegral a9} in
preErrorCheck $ \a10' ->
mcDiscreteGeometricApEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a10'>>
return (res')
{-# LINE 1379 "./QuantLib/PricingEngine.chs" #-}
mcDiscreteArithmeticApHestonEngine :: (RngTrait) -> (StatisticsTrait) -> (GenHestonProcess hp) -> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> IO ((PricingEngine))
mcDiscreteArithmeticApHestonEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withHestonProcess a3 $ \a3' ->
let {a4' = C2HSImp.fromBool a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = fromMaybeDouble a6} in
let {a7' = fromMaybeInt a7} in
let {a8' = fromIntegral a8} in
let {a9' = fromMaybeInt a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = C2HSImp.fromBool a11} in
preErrorCheck $ \a12' ->
mcDiscreteArithmeticApHestonEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 1394 "./QuantLib/PricingEngine.chs" #-}
mcDiscreteGeometricApHestonEngine :: (RngTrait) -> (StatisticsTrait) -> (GenHestonProcess hp) -> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> (Maybe Word)
-> (Maybe Word)
-> IO ((PricingEngine))
mcDiscreteGeometricApHestonEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withHestonProcess a3 $ \a3' ->
let {a4' = C2HSImp.fromBool a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = fromMaybeDouble a6} in
let {a7' = fromMaybeInt a7} in
let {a8' = fromIntegral a8} in
let {a9' = fromMaybeInt a9} in
let {a10' = fromMaybeInt a10} in
preErrorCheck $ \a11' ->
mcDiscreteGeometricApHestonEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a11'>>
return (res')
{-# LINE 1407 "./QuantLib/PricingEngine.chs" #-}
mcEuropeanEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcEuropeanEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = C2HSImp.fromBool a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromMaybeDouble a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = fromIntegral a11} in
preErrorCheck $ \a12' ->
mcEuropeanEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 1418 "./QuantLib/PricingEngine.chs" #-}
mcEuropeanGjrGarchEngine :: (RngTrait) -> (StatisticsTrait) -> (GJRGARCHProcess) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcEuropeanGjrGarchEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGenStochasticProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = fromMaybeInt a7} in
let {a8' = fromMaybeDouble a8} in
let {a9' = fromMaybeInt a9} in
let {a10' = fromIntegral a10} in
preErrorCheck $ \a11' ->
mcEuropeanGjrGarchEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a11'>>
return (res')
{-# LINE 1428 "./QuantLib/PricingEngine.chs" #-}
mcEuropeanHestonEngine :: (RngTrait) -> (StatisticsTrait) -> (GenHestonProcess hp) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcEuropeanHestonEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withHestonProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = fromMaybeInt a7} in
let {a8' = fromMaybeDouble a8} in
let {a9' = fromMaybeInt a9} in
let {a10' = fromIntegral a10} in
preErrorCheck $ \a11' ->
mcEuropeanHestonEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a11'>>
return (res')
{-# LINE 1438 "./QuantLib/PricingEngine.chs" #-}
integralHestonVarianceOptionEngine :: (GenHestonProcess hp) -> IO ((PricingEngine))
integralHestonVarianceOptionEngine a1 =
withHestonProcess a1 $ \a1' ->
preErrorCheck $ \a2' ->
integralHestonVarianceOptionEngine'_ a1' a2' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a2'>>
return (res')
{-# LINE 1441 "./QuantLib/PricingEngine.chs" #-}
mcHullWhiteCapFloorEngine :: (RngTrait) -> (StatisticsTrait) -> (HullWhite) -> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcHullWhiteCapFloorEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withHullWhite a3 $ \a3' ->
let {a4' = C2HSImp.fromBool a4} in
let {a5' = C2HSImp.fromBool a5} in
let {a6' = fromMaybeInt a6} in
let {a7' = fromMaybeDouble a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromIntegral a9} in
preErrorCheck $ \a10' ->
mcHullWhiteCapFloorEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a10'>>
return (res')
{-# LINE 1450 "./QuantLib/PricingEngine.chs" #-}
mcHimalayaEngine :: (RngTrait) -> (StatisticsTrait) -> (StochasticProcessArray) -> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcHimalayaEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGenStochasticProcess a3 $ \a3' ->
let {a4' = C2HSImp.fromBool a4} in
let {a5' = C2HSImp.fromBool a5} in
let {a6' = fromMaybeInt a6} in
let {a7' = fromMaybeDouble a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromIntegral a9} in
preErrorCheck $ \a10' ->
mcHimalayaEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a10'>>
return (res')
{-# LINE 1459 "./QuantLib/PricingEngine.chs" #-}
mcPagodaEngine :: (RngTrait) -> (StatisticsTrait) -> (StochasticProcessArray) -> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcPagodaEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGenStochasticProcess a3 $ \a3' ->
let {a4' = C2HSImp.fromBool a4} in
let {a5' = C2HSImp.fromBool a5} in
let {a6' = fromMaybeInt a6} in
let {a7' = fromMaybeDouble a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromIntegral a9} in
preErrorCheck $ \a10' ->
mcPagodaEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a10'>>
return (res')
{-# LINE 1468 "./QuantLib/PricingEngine.chs" #-}
mcEuropeanBasketEngine :: (RngTrait) -> (StatisticsTrait) -> (StochasticProcessArray) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcEuropeanBasketEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGenStochasticProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = C2HSImp.fromBool a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromMaybeDouble a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = fromIntegral a11} in
preErrorCheck $ \a12' ->
mcEuropeanBasketEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 1479 "./QuantLib/PricingEngine.chs" #-}
mcEverestEngine :: (RngTrait) -> (StatisticsTrait) -> (StochasticProcessArray) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcEverestEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGenStochasticProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = C2HSImp.fromBool a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromMaybeDouble a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = fromIntegral a11} in
preErrorCheck $ \a12' ->
mcEverestEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 1490 "./QuantLib/PricingEngine.chs" #-}
mcAmericanBasketEngine :: (RngTrait) -> (StochasticProcessArray) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> (Maybe Word)
-> (Word)
-> (PolynomialType)
-> IO ((PricingEngine))
mcAmericanBasketEngine :: RngTrait
-> StochasticProcessArray
-> Maybe Word
-> Maybe Word
-> Bool
-> Bool
-> Maybe Word
-> Maybe Double
-> Maybe Word
-> Word
-> Maybe Word
-> Word
-> PolynomialType
-> IO PricingEngine
mcAmericanBasketEngine RngTrait
a1 StochasticProcessArray
a2 Maybe Word
a3 Maybe Word
a4 Bool
a5 Bool
a6 Maybe Word
a7 Maybe Double
a8 Maybe Word
a9 Word
a10 Maybe Word
a11 Word
a12 PolynomialType
a13 =
let {a1' :: CInt
a1' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (RngTrait -> Int) -> RngTrait -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RngTrait -> Int
forall a. Enum a => a -> Int
fromEnum) RngTrait
a1} in
StochasticProcessArray
-> (Ptr CStochasticProcessArray' -> IO PricingEngine)
-> IO PricingEngine
forall p b.
GenStochasticProcess (ForeignPtr p) -> (Ptr p -> IO b) -> IO b
withGenStochasticProcess StochasticProcessArray
a2 ((Ptr CStochasticProcessArray' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CStochasticProcessArray' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CStochasticProcessArray'
a2' ->
let {a3' :: CUInt
a3' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a3} in
let {a4' :: CUInt
a4' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a4} in
let {a5' :: CInt
a5' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a5} in
let {a6' :: CInt
a6' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a6} in
let {a7' :: CUInt
a7' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a7} in
let {a8' :: CDouble
a8' = Maybe Double -> CDouble
fromMaybeDouble Maybe Double
a8} in
let {a9' :: CUInt
a9' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a9} in
let {a10' :: CUInt
a10' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a10} in
let {a11' :: CUInt
a11' = Maybe Word -> CUInt
forall a b. (Integral a, Integral b) => Maybe a -> b
fromMaybeInt Maybe Word
a11} in
let {a12' :: CUInt
a12' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a12} in
let {a13' :: CInt
a13' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (PolynomialType -> Int) -> PolynomialType -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PolynomialType -> Int
forall a. Enum a => a -> Int
fromEnum) PolynomialType
a13} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a14' ->
CInt
-> Ptr CStochasticProcessArray'
-> CUInt
-> CUInt
-> CInt
-> CInt
-> CUInt
-> CDouble
-> CUInt
-> CUInt
-> CUInt
-> CUInt
-> CInt
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
mcAmericanBasketEngine'_ CInt
a1' Ptr CStochasticProcessArray'
a2' CUInt
a3' CUInt
a4' CInt
a5' CInt
a6' CUInt
a7' CDouble
a8' CUInt
a9' CUInt
a10' CUInt
a11' CUInt
a12' CInt
a13' Ptr (Ptr CChar)
a14' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a14'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1509 "./QuantLib/PricingEngine.chs" #-}
mcPerformanceEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcPerformanceEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = C2HSImp.fromBool a4} in
let {a5' = C2HSImp.fromBool a5} in
let {a6' = fromMaybeInt a6} in
let {a7' = fromMaybeDouble a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromIntegral a9} in
preErrorCheck $ \a10' ->
mcPerformanceEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a10'>>
return (res')
{-# LINE 1518 "./QuantLib/PricingEngine.chs" #-}
mcVarianceSwapEngine :: (RngTrait) -> (StatisticsTrait) -> (GeneralizedBlackScholesProcess) -> (Maybe Word)
-> (Maybe Word)
-> (Bool)
-> (Bool)
-> (Maybe Word)
-> (Maybe Double)
-> (Maybe Word)
-> (Word)
-> IO ((PricingEngine))
mcVarianceSwapEngine a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
let {a1' = (fromIntegral . fromEnum) a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
withGeneralizedBlackScholesProcess a3 $ \a3' ->
let {a4' = fromMaybeInt a4} in
let {a5' = fromMaybeInt a5} in
let {a6' = C2HSImp.fromBool a6} in
let {a7' = C2HSImp.fromBool a7} in
let {a8' = fromMaybeInt a8} in
let {a9' = fromMaybeDouble a9} in
let {a10' = fromMaybeInt a10} in
let {a11' = fromIntegral a11} in
preErrorCheck $ \a12' ->
mcVarianceSwapEngine'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 1530 "./QuantLib/PricingEngine.chs" #-}
binomialVanillaEngine :: (BinomialTree) -> (GeneralizedBlackScholesProcess) -> (Word)
-> IO ((PricingEngine))
binomialVanillaEngine a1 a2 a3 =
let {a1' = (fromIntegral . fromEnum) a1} in
withGeneralizedBlackScholesProcess a2 $ \a2' ->
let {a3' = fromIntegral a3} in
preErrorCheck $ \a4' ->
binomialVanillaEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1534 "./QuantLib/PricingEngine.chs" #-}
fdBlackScholesAsianEngine :: (GeneralizedBlackScholesProcess) -> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> IO ((PricingEngine))
fdBlackScholesAsianEngine a1 a2 a3 a4 a5 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
withFdmSchemeDesc a5 $ \a5' ->
preErrorCheck $ \a6' ->
fdBlackScholesAsianEngine'_ a1' a2' a3' a4' a5' a6' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a6'>>
return (res')
{-# LINE 1541 "./QuantLib/PricingEngine.chs" #-}
fdBlackScholesVanillaEngineNoDividends :: (GeneralizedBlackScholesProcess) -> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Bool)
-> (Double)
-> (CashDividendModel)
-> IO ((PricingEngine))
fdBlackScholesVanillaEngineNoDividends a1 a2 a3 a4 a5 a6 a7 a8 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
withFdmSchemeDesc a5 $ \a5' ->
let {a6' = C2HSImp.fromBool a6} in
let {a7' = realToFrac a7} in
let {a8' = (fromIntegral . fromEnum) a8} in
preErrorCheck $ \a9' ->
fdBlackScholesVanillaEngineNoDividends'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a9'>>
return (res')
{-# LINE 1551 "./QuantLib/PricingEngine.chs" #-}
fdBlackScholesVanillaEngineWithDividends :: (GeneralizedBlackScholesProcess) -> ([Dividend]) -> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Bool)
-> (Double)
-> (CashDividendModel)
-> IO ((PricingEngine))
fdBlackScholesVanillaEngineWithDividends a1 a2 a3 a4 a5 a6 a7 a8 a9 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withDividendArray a2 $ \(a2'1, a2'2) ->
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
withFdmSchemeDesc a6 $ \a6' ->
let {a7' = C2HSImp.fromBool a7} in
let {a8' = realToFrac a8} in
let {a9' = (fromIntegral . fromEnum) a9} in
preErrorCheck $ \a10' ->
fdBlackScholesVanillaEngineWithDividends'_ a1' a2'1 a2'2 a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a10'>>
return (res')
{-# LINE 1562 "./QuantLib/PricingEngine.chs" #-}
fdBlackScholesVanillaEngine :: GeneralizedBlackScholesProcess -> [Dividend] -> Word -> Word -> Word
-> FdmScheme -> Bool -> Double -> CashDividendModel -> IO PricingEngine
fdBlackScholesVanillaEngine process dividends =
case dividends of
[] -> fdBlackScholesVanillaEngineNoDividends process
_ -> fdBlackScholesVanillaEngineWithDividends process dividends
fdBlackScholesVanillaEngineQuantoNoDividends :: (GeneralizedBlackScholesProcess) -> (Maybe FdmQuantoHelper) -> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Bool)
-> (Double)
-> (CashDividendModel)
-> IO ((PricingEngine))
fdBlackScholesVanillaEngineQuantoNoDividends :: GeneralizedBlackScholesProcess
-> Maybe FdmQuantoHelper
-> Word
-> Word
-> Word
-> FdmScheme
-> Bool
-> Double
-> CashDividendModel
-> IO PricingEngine
fdBlackScholesVanillaEngineQuantoNoDividends GeneralizedBlackScholesProcess
a1 Maybe FdmQuantoHelper
a2 Word
a3 Word
a4 Word
a5 FdmScheme
a6 Bool
a7 Double
a8 CashDividendModel
a9 =
GeneralizedBlackScholesProcess
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
GenGeneralizedBlackScholesProcess gbs
-> (Ptr CGeneralizedBlackScholesProcess' -> IO b) -> IO b
withGeneralizedBlackScholesProcess GeneralizedBlackScholesProcess
a1 ((Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CGeneralizedBlackScholesProcess'
a1' ->
Maybe FdmQuantoHelper
-> (Ptr CFdmQuantoHelper -> IO PricingEngine) -> IO PricingEngine
forall b.
Maybe FdmQuantoHelper -> (Ptr CFdmQuantoHelper -> IO b) -> IO b
withMaybeFdmQuantoHelper Maybe FdmQuantoHelper
a2 ((Ptr CFdmQuantoHelper -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CFdmQuantoHelper -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CFdmQuantoHelper
a2' ->
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
let {a4' :: CUInt
a4' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a4} in
let {a5' :: CUInt
a5' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a5} in
FdmScheme
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a. FdmScheme -> (Ptr CFdmSchemeDesc -> IO a) -> IO a
withFdmSchemeDesc FdmScheme
a6 ((Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CFdmSchemeDesc
a6' ->
let {a7' :: CInt
a7' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a7} in
let {a8' :: CDouble
a8' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a8} in
let {a9' :: CInt
a9' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (CashDividendModel -> Int) -> CashDividendModel -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CashDividendModel -> Int
forall a. Enum a => a -> Int
fromEnum) CashDividendModel
a9} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a10' ->
Ptr CGeneralizedBlackScholesProcess'
-> Ptr CFdmQuantoHelper
-> CUInt
-> CUInt
-> CUInt
-> Ptr CFdmSchemeDesc
-> CInt
-> CDouble
-> CInt
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
fdBlackScholesVanillaEngineQuantoNoDividends'_ Ptr CGeneralizedBlackScholesProcess'
a1' Ptr CFdmQuantoHelper
a2' CUInt
a3' CUInt
a4' CUInt
a5' Ptr CFdmSchemeDesc
a6' CInt
a7' CDouble
a8' CInt
a9' Ptr (Ptr CChar)
a10' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a10'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1581 "./QuantLib/PricingEngine.chs" #-}
fdBlackScholesVanillaEngineQuantoWithDividends :: (GeneralizedBlackScholesProcess) -> ([Dividend]) -> (Maybe FdmQuantoHelper) -> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Bool)
-> (Double)
-> (CashDividendModel)
-> IO ((PricingEngine))
fdBlackScholesVanillaEngineQuantoWithDividends a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withDividendArray a2 $ \(a2'1, a2'2) ->
withMaybeFdmQuantoHelper a3 $ \a3' ->
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
let {a6' = fromIntegral a6} in
withFdmSchemeDesc a7 $ \a7' ->
let {a8' = C2HSImp.fromBool a8} in
let {a9' = realToFrac a9} in
let {a10' = (fromIntegral . fromEnum) a10} in
preErrorCheck $ \a11' ->
fdBlackScholesVanillaEngineQuantoWithDividends'_ a1' a2'1 a2'2 a3' a4' a5' a6' a7' a8' a9' a10' a11' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a11'>>
return (res')
{-# LINE 1592 "./QuantLib/PricingEngine.chs" #-}
fdBlackScholesVanillaEngineQuanto :: GeneralizedBlackScholesProcess -> [Dividend]
-> Maybe FdmQuantoHelper -> Word -> Word -> Word -> FdmScheme -> Bool -> Double
-> CashDividendModel -> IO PricingEngine
fdBlackScholesVanillaEngineQuanto process dividends =
case dividends of
[] -> fdBlackScholesVanillaEngineQuantoNoDividends process
_ -> fdBlackScholesVanillaEngineQuantoWithDividends process dividends
fdHestonVanillaEngineNoDividends :: (GenHestonModel hm) -> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Maybe (GenLocalVolTermStructure lv))
-> (Double)
-> IO ((PricingEngine))
fdHestonVanillaEngineNoDividends :: forall hm lv.
GenHestonModel hm
-> Word
-> Word
-> Word
-> Word
-> FdmScheme
-> Maybe (GenLocalVolTermStructure lv)
-> Double
-> IO PricingEngine
fdHestonVanillaEngineNoDividends GenHestonModel hm
a1 Word
a2 Word
a3 Word
a4 Word
a5 FdmScheme
a6 Maybe (GenLocalVolTermStructure lv)
a7 Double
a8 =
GenHestonModel hm
-> (Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine
forall hm b.
GenHestonModel hm -> (Ptr CHestonModel' -> IO b) -> IO b
withHestonModel GenHestonModel hm
a1 ((Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CHestonModel'
a1' ->
let {a2' :: CUInt
a2' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a2} in
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
let {a4' :: CUInt
a4' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a4} in
let {a5' :: CUInt
a5' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a5} in
FdmScheme
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a. FdmScheme -> (Ptr CFdmSchemeDesc -> IO a) -> IO a
withFdmSchemeDesc FdmScheme
a6 ((Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CFdmSchemeDesc
a6' ->
Maybe (GenLocalVolTermStructure lv)
-> (Ptr CLocalVolTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall lv b.
Maybe (GenLocalVolTermStructure lv)
-> (Ptr CLocalVolTermStructure' -> IO b) -> IO b
withMaybeLocalVolTermStructure Maybe (GenLocalVolTermStructure lv)
a7 ((Ptr CLocalVolTermStructure' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CLocalVolTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CLocalVolTermStructure'
a7' ->
let {a8' :: CDouble
a8' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a8} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a9' ->
Ptr CHestonModel'
-> CUInt
-> CUInt
-> CUInt
-> CUInt
-> Ptr CFdmSchemeDesc
-> Ptr CLocalVolTermStructure'
-> CDouble
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
fdHestonVanillaEngineNoDividends'_ Ptr CHestonModel'
a1' CUInt
a2' CUInt
a3' CUInt
a4' CUInt
a5' Ptr CFdmSchemeDesc
a6' Ptr CLocalVolTermStructure'
a7' CDouble
a8' Ptr (Ptr CChar)
a9' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a9'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1611 "./QuantLib/PricingEngine.chs" #-}
fdHestonVanillaEngineWithDividends :: (GenHestonModel hm) -> ([Dividend]) -> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Maybe (GenLocalVolTermStructure lv))
-> (Double)
-> IO ((PricingEngine))
fdHestonVanillaEngineWithDividends a1 a2 a3 a4 a5 a6 a7 a8 a9 =
withHestonModel a1 $ \a1' ->
withDividendArray a2 $ \(a2'1, a2'2) ->
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
let {a6' = fromIntegral a6} in
withFdmSchemeDesc a7 $ \a7' ->
withMaybeLocalVolTermStructure a8 $ \a8' ->
let {a9' = realToFrac a9} in
preErrorCheck $ \a10' ->
fdHestonVanillaEngineWithDividends'_ a1' a2'1 a2'2 a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a10'>>
return (res')
{-# LINE 1622 "./QuantLib/PricingEngine.chs" #-}
fdHestonVanillaEngine :: GenHestonModel hm -> [Dividend] -> Word -> Word -> Word -> Word
-> FdmScheme -> Maybe (GenLocalVolTermStructure lv) -> Double -> IO PricingEngine
fdHestonVanillaEngine model dividends =
case dividends of
[] -> fdHestonVanillaEngineNoDividends model
_ -> fdHestonVanillaEngineWithDividends model dividends
cosHestonEngine :: (GenHestonModel hm)
-> (Double)
-> (Word)
-> IO ((PricingEngine))
cosHestonEngine :: forall hm. GenHestonModel hm -> Double -> Word -> IO PricingEngine
cosHestonEngine GenHestonModel hm
a1 Double
a2 Word
a3 =
GenHestonModel hm
-> (Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine
forall hm b.
GenHestonModel hm -> (Ptr CHestonModel' -> IO b) -> IO b
withHestonModel GenHestonModel hm
a1 ((Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CHestonModel'
a1' ->
let {a2' :: CDouble
a2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a2} in
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a4' ->
Ptr CHestonModel'
-> CDouble -> CUInt -> Ptr (Ptr CChar) -> IO (Ptr CPricingEngine)
cosHestonEngine'_ Ptr CHestonModel'
a1' CDouble
a2' CUInt
a3' Ptr (Ptr CChar)
a4' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a4'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1636 "./QuantLib/PricingEngine.chs" #-}
analyticPdfHestonEngine :: (GenHestonModel hm)
-> (Double)
-> (Word)
-> IO ((PricingEngine))
analyticPdfHestonEngine a1 a2 a3 =
withHestonModel a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = fromIntegral a3} in
preErrorCheck $ \a4' ->
analyticPdfHestonEngine'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1642 "./QuantLib/PricingEngine.chs" #-}
fdBatesVanillaEngineNoDividends :: (GenBatesModel bm)
-> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme)
-> IO ((PricingEngine))
fdBatesVanillaEngineNoDividends a1 a2 a3 a4 a5 a6 =
withBatesModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
withFdmSchemeDesc a6 $ \a6' ->
preErrorCheck $ \a7' ->
fdBatesVanillaEngineNoDividends'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a7'>>
return (res')
{-# LINE 1651 "./QuantLib/PricingEngine.chs" #-}
fdBatesVanillaEngineWithDividends :: (GenBatesModel bm)
-> ([Dividend])
-> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme)
-> IO ((PricingEngine))
fdBatesVanillaEngineWithDividends a1 a2 a3 a4 a5 a6 a7 =
withBatesModel a1 $ \a1' ->
withDividendArray a2 $ \(a2'1, a2'2) ->
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
let {a6' = fromIntegral a6} in
withFdmSchemeDesc a7 $ \a7' ->
preErrorCheck $ \a8' ->
fdBatesVanillaEngineWithDividends'_ a1' a2'1 a2'2 a3' a4' a5' a6' a7' a8' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a8'>>
return (res')
{-# LINE 1661 "./QuantLib/PricingEngine.chs" #-}
fdBatesVanillaEngine :: GenBatesModel bm -> [Dividend] -> Word -> Word -> Word -> Word
-> FdmScheme -> IO PricingEngine
fdBatesVanillaEngine model dividends =
case dividends of
[] -> fdBatesVanillaEngineNoDividends model
_ -> fdBatesVanillaEngineWithDividends model dividends
fdBlackScholesShoutEngineNoDividends :: (GeneralizedBlackScholesProcess)
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme)
-> IO ((PricingEngine))
fdBlackScholesShoutEngineNoDividends :: GeneralizedBlackScholesProcess
-> Word -> Word -> Word -> FdmScheme -> IO PricingEngine
fdBlackScholesShoutEngineNoDividends GeneralizedBlackScholesProcess
a1 Word
a2 Word
a3 Word
a4 FdmScheme
a5 =
GeneralizedBlackScholesProcess
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall gbs b.
GenGeneralizedBlackScholesProcess gbs
-> (Ptr CGeneralizedBlackScholesProcess' -> IO b) -> IO b
withGeneralizedBlackScholesProcess GeneralizedBlackScholesProcess
a1 ((Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CGeneralizedBlackScholesProcess' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CGeneralizedBlackScholesProcess'
a1' ->
let {a2' :: CUInt
a2' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a2} in
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
let {a4' :: CUInt
a4' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a4} in
FdmScheme
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a. FdmScheme -> (Ptr CFdmSchemeDesc -> IO a) -> IO a
withFdmSchemeDesc FdmScheme
a5 ((Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CFdmSchemeDesc
a5' ->
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a6' ->
Ptr CGeneralizedBlackScholesProcess'
-> CUInt
-> CUInt
-> CUInt
-> Ptr CFdmSchemeDesc
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
fdBlackScholesShoutEngineNoDividends'_ Ptr CGeneralizedBlackScholesProcess'
a1' CUInt
a2' CUInt
a3' CUInt
a4' Ptr CFdmSchemeDesc
a5' Ptr (Ptr CChar)
a6' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a6'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1677 "./QuantLib/PricingEngine.chs" #-}
fdBlackScholesShoutEngineWithDividends :: (GeneralizedBlackScholesProcess)
-> ([Dividend])
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme)
-> IO ((PricingEngine))
fdBlackScholesShoutEngineWithDividends a1 a2 a3 a4 a5 a6 =
withGeneralizedBlackScholesProcess a1 $ \a1' ->
withDividendArray a2 $ \(a2'1, a2'2) ->
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
withFdmSchemeDesc a6 $ \a6' ->
preErrorCheck $ \a7' ->
fdBlackScholesShoutEngineWithDividends'_ a1' a2'1 a2'2 a3' a4' a5' a6' a7' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a7'>>
return (res')
{-# LINE 1686 "./QuantLib/PricingEngine.chs" #-}
fdBlackScholesShoutEngine :: GeneralizedBlackScholesProcess -> [Dividend] -> Word -> Word
-> Word -> FdmScheme -> IO PricingEngine
fdBlackScholesShoutEngine process dividends =
case dividends of
[] -> fdBlackScholesShoutEngineNoDividends process
_ -> fdBlackScholesShoutEngineWithDividends process dividends
fdHestonVanillaEngineQuantoNoDividends :: (GenHestonModel hm) -> (Maybe FdmQuantoHelper) -> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Maybe (GenLocalVolTermStructure lv))
-> (Double)
-> IO ((PricingEngine))
fdHestonVanillaEngineQuantoNoDividends :: forall hm lv.
GenHestonModel hm
-> Maybe FdmQuantoHelper
-> Word
-> Word
-> Word
-> Word
-> FdmScheme
-> Maybe (GenLocalVolTermStructure lv)
-> Double
-> IO PricingEngine
fdHestonVanillaEngineQuantoNoDividends GenHestonModel hm
a1 Maybe FdmQuantoHelper
a2 Word
a3 Word
a4 Word
a5 Word
a6 FdmScheme
a7 Maybe (GenLocalVolTermStructure lv)
a8 Double
a9 =
GenHestonModel hm
-> (Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine
forall hm b.
GenHestonModel hm -> (Ptr CHestonModel' -> IO b) -> IO b
withHestonModel GenHestonModel hm
a1 ((Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CHestonModel'
a1' ->
Maybe FdmQuantoHelper
-> (Ptr CFdmQuantoHelper -> IO PricingEngine) -> IO PricingEngine
forall b.
Maybe FdmQuantoHelper -> (Ptr CFdmQuantoHelper -> IO b) -> IO b
withMaybeFdmQuantoHelper Maybe FdmQuantoHelper
a2 ((Ptr CFdmQuantoHelper -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CFdmQuantoHelper -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CFdmQuantoHelper
a2' ->
let {a3' :: CUInt
a3' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a3} in
let {a4' :: CUInt
a4' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a4} in
let {a5' :: CUInt
a5' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a5} in
let {a6' :: CUInt
a6' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a6} in
FdmScheme
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a. FdmScheme -> (Ptr CFdmSchemeDesc -> IO a) -> IO a
withFdmSchemeDesc FdmScheme
a7 ((Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CFdmSchemeDesc
a7' ->
Maybe (GenLocalVolTermStructure lv)
-> (Ptr CLocalVolTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall lv b.
Maybe (GenLocalVolTermStructure lv)
-> (Ptr CLocalVolTermStructure' -> IO b) -> IO b
withMaybeLocalVolTermStructure Maybe (GenLocalVolTermStructure lv)
a8 ((Ptr CLocalVolTermStructure' -> IO PricingEngine)
-> IO PricingEngine)
-> (Ptr CLocalVolTermStructure' -> IO PricingEngine)
-> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CLocalVolTermStructure'
a8' ->
let {a9' :: CDouble
a9' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a9} in
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a10' ->
Ptr CHestonModel'
-> Ptr CFdmQuantoHelper
-> CUInt
-> CUInt
-> CUInt
-> CUInt
-> Ptr CFdmSchemeDesc
-> Ptr CLocalVolTermStructure'
-> CDouble
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
fdHestonVanillaEngineQuantoNoDividends'_ Ptr CHestonModel'
a1' Ptr CFdmQuantoHelper
a2' CUInt
a3' CUInt
a4' CUInt
a5' CUInt
a6' Ptr CFdmSchemeDesc
a7' Ptr CLocalVolTermStructure'
a8' CDouble
a9' Ptr (Ptr CChar)
a10' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a10'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1705 "./QuantLib/PricingEngine.chs" #-}
fdHestonVanillaEngineQuantoWithDividends :: (GenHestonModel hm) -> ([Dividend]) -> (Maybe FdmQuantoHelper) -> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (FdmScheme) -> (Maybe (GenLocalVolTermStructure lv))
-> (Double)
-> IO ((PricingEngine))
fdHestonVanillaEngineQuantoWithDividends a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
withHestonModel a1 $ \a1' ->
withDividendArray a2 $ \(a2'1, a2'2) ->
withMaybeFdmQuantoHelper a3 $ \a3' ->
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
let {a6' = fromIntegral a6} in
let {a7' = fromIntegral a7} in
withFdmSchemeDesc a8 $ \a8' ->
withMaybeLocalVolTermStructure a9 $ \a9' ->
let {a10' = realToFrac a10} in
preErrorCheck $ \a11' ->
fdHestonVanillaEngineQuantoWithDividends'_ a1' a2'1 a2'2 a3' a4' a5' a6' a7' a8' a9' a10' a11' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a11'>>
return (res')
{-# LINE 1716 "./QuantLib/PricingEngine.chs" #-}
fdHestonVanillaEngineQuanto :: GenHestonModel hm -> [Dividend] -> Maybe FdmQuantoHelper
-> Word -> Word -> Word -> Word -> FdmScheme -> Maybe (GenLocalVolTermStructure lv)
-> Double -> IO PricingEngine
fdHestonVanillaEngineQuanto model dividends =
case dividends of
[] -> fdHestonVanillaEngineQuantoNoDividends model
_ -> fdHestonVanillaEngineQuantoWithDividends model dividends
fdHestonHullWhiteVanillaEngineNoDividends :: (GenHestonModel hm) -> (HullWhiteProcess) -> (Double)
-> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (Bool)
-> (FdmScheme) -> IO ((PricingEngine))
fdHestonHullWhiteVanillaEngineNoDividends :: forall hm.
GenHestonModel hm
-> HullWhiteProcess
-> Double
-> Word
-> Word
-> Word
-> Word
-> Word
-> Bool
-> FdmScheme
-> IO PricingEngine
fdHestonHullWhiteVanillaEngineNoDividends GenHestonModel hm
a1 HullWhiteProcess
a2 Double
a3 Word
a4 Word
a5 Word
a6 Word
a7 Word
a8 Bool
a9 FdmScheme
a10 =
GenHestonModel hm
-> (Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine
forall hm b.
GenHestonModel hm -> (Ptr CHestonModel' -> IO b) -> IO b
withHestonModel GenHestonModel hm
a1 ((Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CHestonModel' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CHestonModel'
a1' ->
HullWhiteProcess
-> (Ptr CHullWhiteProcess' -> IO PricingEngine) -> IO PricingEngine
forall p1d b.
GenStochasticProcess1D (ForeignPtr p1d)
-> (Ptr p1d -> IO b) -> IO b
withGenStochasticProcess1D HullWhiteProcess
a2 ((Ptr CHullWhiteProcess' -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CHullWhiteProcess' -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CHullWhiteProcess'
a2' ->
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
let {a4' :: CUInt
a4' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a4} in
let {a5' :: CUInt
a5' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a5} in
let {a6' :: CUInt
a6' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a6} in
let {a7' :: CUInt
a7' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a7} in
let {a8' :: CUInt
a8' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a8} in
let {a9' :: CInt
a9' = Bool -> CInt
forall a. Num a => Bool -> a
C2HSImp.fromBool Bool
a9} in
FdmScheme
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a. FdmScheme -> (Ptr CFdmSchemeDesc -> IO a) -> IO a
withFdmSchemeDesc FdmScheme
a10 ((Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr CFdmSchemeDesc -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr CFdmSchemeDesc
a10' ->
(Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine)
-> (Ptr (Ptr CChar) -> IO PricingEngine) -> IO PricingEngine
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a11' ->
Ptr CHestonModel'
-> Ptr CHullWhiteProcess'
-> CDouble
-> CUInt
-> CUInt
-> CUInt
-> CUInt
-> CUInt
-> CInt
-> Ptr CFdmSchemeDesc
-> Ptr (Ptr CChar)
-> IO (Ptr CPricingEngine)
fdHestonHullWhiteVanillaEngineNoDividends'_ Ptr CHestonModel'
a1' Ptr CHullWhiteProcess'
a2' CDouble
a3' CUInt
a4' CUInt
a5' CUInt
a6' CUInt
a7' CUInt
a8' CInt
a9' Ptr CFdmSchemeDesc
a10' Ptr (Ptr CChar)
a11' IO (Ptr CPricingEngine)
-> (Ptr CPricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CPricingEngine
res ->
Ptr CPricingEngine -> IO PricingEngine
peekPricingEngine Ptr CPricingEngine
res IO PricingEngine
-> (PricingEngine -> IO PricingEngine) -> IO PricingEngine
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \PricingEngine
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a11'IO () -> IO PricingEngine -> IO PricingEngine
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
PricingEngine -> IO PricingEngine
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (PricingEngine
res')
{-# LINE 1737 "./QuantLib/PricingEngine.chs" #-}
fdHestonHullWhiteVanillaEngineWithDividends :: (GenHestonModel hm) -> (HullWhiteProcess) -> ([Dividend]) -> (Double)
-> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (Word)
-> (Bool)
-> (FdmScheme) -> IO ((PricingEngine))
fdHestonHullWhiteVanillaEngineWithDividends a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
withHestonModel a1 $ \a1' ->
withGenStochasticProcess1D a2 $ \a2' ->
withDividendArray a3 $ \(a3'1, a3'2) ->
let {a4' = realToFrac a4} in
let {a5' = fromIntegral a5} in
let {a6' = fromIntegral a6} in
let {a7' = fromIntegral a7} in
let {a8' = fromIntegral a8} in
let {a9' = fromIntegral a9} in
let {a10' = C2HSImp.fromBool a10} in
withFdmSchemeDesc a11 $ \a11' ->
preErrorCheck $ \a12' ->
fdHestonHullWhiteVanillaEngineWithDividends'_ a1' a2' a3'1 a3'2 a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a12'>>
return (res')
{-# LINE 1749 "./QuantLib/PricingEngine.chs" #-}
fdHestonHullWhiteVanillaEngine :: GenHestonModel hm -> HullWhiteProcess -> [Dividend]
-> Double -> Word -> Word -> Word -> Word -> Word -> Bool -> FdmScheme -> IO PricingEngine
fdHestonHullWhiteVanillaEngine heston hullWhite dividends =
case dividends of
[] -> fdHestonHullWhiteVanillaEngineNoDividends heston hullWhite
_ -> fdHestonHullWhiteVanillaEngineWithDividends heston hullWhite dividends
binomialConvertibleEngine :: (BinomialTree) -> (GeneralizedBlackScholesProcess) -> (Word)
-> (GenQuote q)
-> ([Dividend])
-> IO ((PricingEngine))
binomialConvertibleEngine a1 a2 a3 a4 a5 =
let {a1' = (fromIntegral . fromEnum) a1} in
withGeneralizedBlackScholesProcess a2 $ \a2' ->
let {a3' = fromIntegral a3} in
withQuote a4 $ \a4' ->
withDividendArray a5 $ \(a5'1, a5'2) ->
preErrorCheck $ \a6' ->
binomialConvertibleEngine'_ a1' a2' a3' a4' a5'1 a5'2 a6' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a6'>>
return (res')
{-# LINE 1764 "./QuantLib/PricingEngine.chs" #-}
blackCallableFixedRateBondEngineFromVolatilityStructure :: (CallableBondVolatilityStructure) -> (GenYieldTermStructure y) -> IO ((PricingEngine))
blackCallableFixedRateBondEngineFromVolatilityStructure a1 a2 =
withGenTermStructure a1 $ \a1' ->
withYieldTermStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
blackCallableFixedRateBondEngineFromVolatilityStructure'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 1767 "./QuantLib/PricingEngine.chs" #-}
blackCallableFixedRateBondEngine :: (GenQuote q) -> (GenYieldTermStructure y) -> IO ((PricingEngine))
blackCallableFixedRateBondEngine a1 a2 =
withQuote a1 $ \a1' ->
withYieldTermStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
blackCallableFixedRateBondEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 1770 "./QuantLib/PricingEngine.chs" #-}
blackCallableZeroCouponBondEngineFromVolatilityStructure :: (CallableBondVolatilityStructure) -> (GenYieldTermStructure y) -> IO ((PricingEngine))
blackCallableZeroCouponBondEngineFromVolatilityStructure a1 a2 =
withGenTermStructure a1 $ \a1' ->
withYieldTermStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
blackCallableZeroCouponBondEngineFromVolatilityStructure'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 1773 "./QuantLib/PricingEngine.chs" #-}
blackCallableZeroCouponBondEngine :: (GenQuote q) -> (GenYieldTermStructure y) -> IO ((PricingEngine))
blackCallableZeroCouponBondEngine a1 a2 =
withQuote a1 $ \a1' ->
withYieldTermStructure a2 $ \a2' ->
preErrorCheck $ \a3' ->
blackCallableZeroCouponBondEngine'_ a1' a2' a3' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a3'>>
return (res')
{-# LINE 1776 "./QuantLib/PricingEngine.chs" #-}
treeCallableFixedRateBondEngineTimeGrid :: (GenShortRateModel sm) -> (TimeGrid) -> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
treeCallableFixedRateBondEngineTimeGrid a1 a2 a3 =
withShortRateModel a1 $ \a1' ->
withTimeGrid a2 $ \a2' ->
withMaybeYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
treeCallableFixedRateBondEngineTimeGrid'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1779 "./QuantLib/PricingEngine.chs" #-}
treeCallableFixedRateBondEngineTimeSteps :: (GenShortRateModel sm) -> (Word)
-> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
treeCallableFixedRateBondEngineTimeSteps a1 a2 a3 =
withShortRateModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
withMaybeYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
treeCallableFixedRateBondEngineTimeSteps'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1783 "./QuantLib/PricingEngine.chs" #-}
treeCallableZeroCouponBondEngineTimeGrid :: (GenShortRateModel sm) -> (TimeGrid) -> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
treeCallableZeroCouponBondEngineTimeGrid a1 a2 a3 =
withShortRateModel a1 $ \a1' ->
withTimeGrid a2 $ \a2' ->
withMaybeYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
treeCallableZeroCouponBondEngineTimeGrid'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1786 "./QuantLib/PricingEngine.chs" #-}
treeCallableZeroCouponBondEngineTimeSteps :: (GenShortRateModel sm) -> (Word)
-> (Maybe (GenYieldTermStructure y)) -> IO ((PricingEngine))
treeCallableZeroCouponBondEngineTimeSteps a1 a2 a3 =
withShortRateModel a1 $ \a1' ->
let {a2' = fromIntegral a2} in
withMaybeYieldTermStructure a3 $ \a3' ->
preErrorCheck $ \a4' ->
treeCallableZeroCouponBondEngineTimeSteps'_ a1' a2' a3' a4' >>= \res ->
peekPricingEngine res >>= \res' ->
errorCheck a4'>>
return (res')
{-# LINE 1790 "./QuantLib/PricingEngine.chs" #-}
treeCallableFixedRateBondEngine :: GenShortRateModel sm -> LatticeTime -> Maybe (GenYieldTermStructure y) -> IO PricingEngine
treeCallableFixedRateBondEngine model latticeTime curve =
case latticeTime of
TimeSteps steps -> treeCallableFixedRateBondEngineTimeSteps model steps curve
ExplicitTimeGrid grid -> treeCallableFixedRateBondEngineTimeGrid model grid curve
treeCallableZeroCouponBondEngine :: GenShortRateModel sm -> LatticeTime -> Maybe (GenYieldTermStructure y) -> IO PricingEngine
treeCallableZeroCouponBondEngine model latticeTime curve =
case latticeTime of
TimeSteps steps -> treeCallableZeroCouponBondEngineTimeSteps model steps curve
ExplicitTimeGrid grid -> treeCallableZeroCouponBondEngineTimeGrid model grid curve
qlBlackCalculatorAlpha :: (GenBlackCalculator bc) -> IO ((Double))
qlBlackCalculatorAlpha :: forall bc. GenBlackCalculator bc -> IO Double
qlBlackCalculatorAlpha GenBlackCalculator bc
a1 =
GenBlackCalculator bc
-> (Ptr CBlackCalculator' -> IO Double) -> IO Double
forall bc b.
GenBlackCalculator bc -> (Ptr CBlackCalculator' -> IO b) -> IO b
withBlackCalculator GenBlackCalculator bc
a1 ((Ptr CBlackCalculator' -> IO Double) -> IO Double)
-> (Ptr CBlackCalculator' -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr CBlackCalculator'
a1' ->
(Ptr (Ptr CChar) -> IO Double) -> IO Double
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO Double) -> IO Double)
-> (Ptr (Ptr CChar) -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a2' ->
Ptr CBlackCalculator' -> Ptr (Ptr CChar) -> IO CDouble
qlBlackCalculatorAlpha'_ Ptr CBlackCalculator'
a1' Ptr (Ptr CChar)
a2' IO CDouble -> (CDouble -> IO Double) -> IO Double
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CDouble
res ->
let {res' :: Double
res' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
res} in
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a2'IO () -> IO Double -> IO Double
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
Double -> IO Double
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Double
res')
{-# LINE 1807 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorBeta :: (GenBlackCalculator bc) -> IO ((Double))
qlBlackCalculatorBeta a1 =
withBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBlackCalculatorBeta'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1810 "./QuantLib/PricingEngine.chs" #-}
blackCalculatorAtStrikeRaw :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((BlackCalculator))
blackCalculatorAtStrikeRaw a1 a2 a3 a4 a5 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
preErrorCheck $ \a6' ->
blackCalculatorAtStrikeRaw'_ a1' a2' a3' a4' a5' a6' >>= \res ->
peekBlackCalculator res >>= \res' ->
errorCheck a6'>>
return (res')
{-# LINE 1817 "./QuantLib/PricingEngine.chs" #-}
blackCalculatorFromPayoffRaw :: (StrikedPayoff) -> (Double)
-> (Double)
-> (Double)
-> IO ((BlackCalculator))
blackCalculatorFromPayoffRaw a1 a2 a3 a4 =
withStrikedPayoff a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
preErrorCheck $ \a5' ->
blackCalculatorFromPayoffRaw'_ a1' a2' a3' a4' a5' >>= \res ->
peekBlackCalculator res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 1824 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorDelta :: (GenBlackCalculator bc) -> (Double)
-> IO ((Double))
qlBlackCalculatorDelta a1 a2 =
withBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBlackCalculatorDelta'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1828 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorDeltaForward :: (GenBlackCalculator bc) -> IO ((Double))
qlBlackCalculatorDeltaForward a1 =
withBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBlackCalculatorDeltaForward'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1831 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorDividendRho :: (GenBlackCalculator bc) -> (Double)
-> IO ((Double))
qlBlackCalculatorDividendRho a1 a2 =
withBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBlackCalculatorDividendRho'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1835 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorElasticity :: (GenBlackCalculator bc) -> (Double)
-> IO ((Double))
qlBlackCalculatorElasticity a1 a2 =
withBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBlackCalculatorElasticity'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1839 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorElasticityForward :: (GenBlackCalculator bc) -> IO ((Double))
qlBlackCalculatorElasticityForward a1 =
withBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBlackCalculatorElasticityForward'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1842 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorGamma :: (GenBlackCalculator bc) -> (Double)
-> IO ((Double))
qlBlackCalculatorGamma a1 a2 =
withBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBlackCalculatorGamma'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1846 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorGammaForward :: (GenBlackCalculator bc) -> IO ((Double))
qlBlackCalculatorGammaForward a1 =
withBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBlackCalculatorGammaForward'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1849 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorItmAssetProbability :: (GenBlackCalculator bc) -> IO ((Double))
qlBlackCalculatorItmAssetProbability a1 =
withBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBlackCalculatorItmAssetProbability'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1852 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorItmCashProbability :: (GenBlackCalculator bc) -> IO ((Double))
qlBlackCalculatorItmCashProbability a1 =
withBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBlackCalculatorItmCashProbability'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1855 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorRho :: (GenBlackCalculator bc) -> (Double)
-> IO ((Double))
qlBlackCalculatorRho a1 a2 =
withBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBlackCalculatorRho'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1859 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorStrikeSensitivity :: (GenBlackCalculator bc) -> IO ((Double))
qlBlackCalculatorStrikeSensitivity a1 =
withBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBlackCalculatorStrikeSensitivity'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1862 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorStrikeGamma :: (GenBlackCalculator bc) -> IO ((Double))
qlBlackCalculatorStrikeGamma a1 =
withBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBlackCalculatorStrikeGamma'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1865 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorTheta :: (GenBlackCalculator bc) -> (Double)
-> (Double)
-> IO ((Double))
qlBlackCalculatorTheta a1 a2 a3 =
withBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
preErrorCheck $ \a4' ->
qlBlackCalculatorTheta'_ a1' a2' a3' a4' >>= \res ->
let {res' = realToFrac res} in
errorCheck a4'>>
return (res')
{-# LINE 1870 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorThetaPerDay :: (GenBlackCalculator bc) -> (Double)
-> (Double)
-> IO ((Double))
qlBlackCalculatorThetaPerDay a1 a2 a3 =
withBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
preErrorCheck $ \a4' ->
qlBlackCalculatorThetaPerDay'_ a1' a2' a3' a4' >>= \res ->
let {res' = realToFrac res} in
errorCheck a4'>>
return (res')
{-# LINE 1875 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorValue :: (GenBlackCalculator bc) -> IO ((Double))
qlBlackCalculatorValue a1 =
withBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBlackCalculatorValue'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1878 "./QuantLib/PricingEngine.chs" #-}
blackVanna :: (GenBlackCalculator bc) -> (Double)
-> (Double)
-> IO ((Double))
blackVanna a1 a2 a3 =
withBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
preErrorCheck $ \a4' ->
blackVanna'_ a1' a2' a3' a4' >>= \res ->
let {res' = realToFrac res} in
errorCheck a4'>>
return (res')
{-# LINE 1883 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorVega :: (GenBlackCalculator bc) -> (Double)
-> IO ((Double))
qlBlackCalculatorVega a1 a2 =
withBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBlackCalculatorVega'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1887 "./QuantLib/PricingEngine.chs" #-}
qlBlackCalculatorVolga :: (GenBlackCalculator bc) -> (Double)
-> IO ((Double))
qlBlackCalculatorVolga a1 a2 =
withBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBlackCalculatorVolga'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1891 "./QuantLib/PricingEngine.chs" #-}
blackScholesCalculatorAtStrikeRaw :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((BlackScholesCalculator))
blackScholesCalculatorAtStrikeRaw a1 a2 a3 a4 a5 a6 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
preErrorCheck $ \a7' ->
blackScholesCalculatorAtStrikeRaw'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
peekBlackScholesCalculator res >>= \res' ->
errorCheck a7'>>
return (res')
{-# LINE 1899 "./QuantLib/PricingEngine.chs" #-}
blackScholesCalculatorFromPayoffRaw :: (StrikedPayoff) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((BlackScholesCalculator))
blackScholesCalculatorFromPayoffRaw a1 a2 a3 a4 a5 =
withStrikedPayoff a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
preErrorCheck $ \a6' ->
blackScholesCalculatorFromPayoffRaw'_ a1' a2' a3' a4' a5' a6' >>= \res ->
peekBlackScholesCalculator res >>= \res' ->
errorCheck a6'>>
return (res')
{-# LINE 1906 "./QuantLib/PricingEngine.chs" #-}
blackScholesDelta :: (BlackScholesCalculator) -> IO ((Double))
blackScholesDelta a1 =
withGenBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
blackScholesDelta'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1909 "./QuantLib/PricingEngine.chs" #-}
blackScholesElasticity :: (BlackScholesCalculator) -> IO ((Double))
blackScholesElasticity a1 =
withGenBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
blackScholesElasticity'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1912 "./QuantLib/PricingEngine.chs" #-}
blackScholesGamma :: (BlackScholesCalculator) -> IO ((Double))
blackScholesGamma a1 =
withGenBlackCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
blackScholesGamma'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1915 "./QuantLib/PricingEngine.chs" #-}
blackScholesTheta :: (BlackScholesCalculator) -> (Double)
-> IO ((Double))
blackScholesTheta a1 a2 =
withGenBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
blackScholesTheta'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1919 "./QuantLib/PricingEngine.chs" #-}
blackScholesThetaPerDay :: (BlackScholesCalculator) -> (Double)
-> IO ((Double))
blackScholesThetaPerDay a1 a2 =
withGenBlackCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
blackScholesThetaPerDay'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1923 "./QuantLib/PricingEngine.chs" #-}
bachelierCalculatorAtStrikeRaw :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((BachelierCalculator))
bachelierCalculatorAtStrikeRaw :: OptionType
-> Double -> Double -> Double -> Double -> IO BachelierCalculator
bachelierCalculatorAtStrikeRaw OptionType
a1 Double
a2 Double
a3 Double
a4 Double
a5 =
let {a1' :: CInt
a1' = OptionType -> CInt
forall a b. (Enum a, Integral b) => a -> b
fromEnumC OptionType
a1} in
let {a2' :: CDouble
a2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a2} in
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
let {a4' :: CDouble
a4' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a4} in
let {a5' :: CDouble
a5' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a5} in
(Ptr (Ptr CChar) -> IO BachelierCalculator)
-> IO BachelierCalculator
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO BachelierCalculator)
-> IO BachelierCalculator)
-> (Ptr (Ptr CChar) -> IO BachelierCalculator)
-> IO BachelierCalculator
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a6' ->
CInt
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> Ptr (Ptr CChar)
-> IO (Ptr CBachelierCalculator)
bachelierCalculatorAtStrikeRaw'_ CInt
a1' CDouble
a2' CDouble
a3' CDouble
a4' CDouble
a5' Ptr (Ptr CChar)
a6' IO (Ptr CBachelierCalculator)
-> (Ptr CBachelierCalculator -> IO BachelierCalculator)
-> IO BachelierCalculator
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CBachelierCalculator
res ->
Ptr CBachelierCalculator -> IO BachelierCalculator
peekBachelierCalculator Ptr CBachelierCalculator
res IO BachelierCalculator
-> (BachelierCalculator -> IO BachelierCalculator)
-> IO BachelierCalculator
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \BachelierCalculator
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a6'IO () -> IO BachelierCalculator -> IO BachelierCalculator
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
BachelierCalculator -> IO BachelierCalculator
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (BachelierCalculator
res')
{-# LINE 1932 "./QuantLib/PricingEngine.chs" #-}
bachelierCalculatorFromPayoffRaw :: (StrikedPayoff) -> (Double)
-> (Double)
-> (Double)
-> IO ((BachelierCalculator))
bachelierCalculatorFromPayoffRaw a1 a2 a3 a4 =
withStrikedPayoff a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
preErrorCheck $ \a5' ->
bachelierCalculatorFromPayoffRaw'_ a1' a2' a3' a4' a5' >>= \res ->
peekBachelierCalculator res >>= \res' ->
errorCheck a5'>>
return (res')
{-# LINE 1939 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorAlpha :: (BachelierCalculator) -> IO ((Double))
qlBachelierCalculatorAlpha a1 =
withBachelierCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBachelierCalculatorAlpha'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1942 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorBeta :: (BachelierCalculator) -> IO ((Double))
qlBachelierCalculatorBeta a1 =
withBachelierCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBachelierCalculatorBeta'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1945 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorDelta :: (BachelierCalculator) -> (Double)
-> IO ((Double))
qlBachelierCalculatorDelta a1 a2 =
withBachelierCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBachelierCalculatorDelta'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1949 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorDeltaForward :: (BachelierCalculator) -> IO ((Double))
qlBachelierCalculatorDeltaForward a1 =
withBachelierCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBachelierCalculatorDeltaForward'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1952 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorDividendRho :: (BachelierCalculator) -> (Double)
-> IO ((Double))
qlBachelierCalculatorDividendRho a1 a2 =
withBachelierCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBachelierCalculatorDividendRho'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1956 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorElasticity :: (BachelierCalculator) -> (Double)
-> IO ((Double))
qlBachelierCalculatorElasticity a1 a2 =
withBachelierCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBachelierCalculatorElasticity'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1960 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorElasticityForward :: (BachelierCalculator) -> IO ((Double))
qlBachelierCalculatorElasticityForward a1 =
withBachelierCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBachelierCalculatorElasticityForward'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1963 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorGamma :: (BachelierCalculator) -> (Double)
-> IO ((Double))
qlBachelierCalculatorGamma a1 a2 =
withBachelierCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBachelierCalculatorGamma'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1967 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorGammaForward :: (BachelierCalculator) -> IO ((Double))
qlBachelierCalculatorGammaForward a1 =
withBachelierCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBachelierCalculatorGammaForward'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1970 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorItmAssetProbability :: (BachelierCalculator) -> IO ((Double))
qlBachelierCalculatorItmAssetProbability a1 =
withBachelierCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBachelierCalculatorItmAssetProbability'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1973 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorItmCashProbability :: (BachelierCalculator) -> IO ((Double))
qlBachelierCalculatorItmCashProbability a1 =
withBachelierCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBachelierCalculatorItmCashProbability'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1976 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorRho :: (BachelierCalculator) -> (Double)
-> IO ((Double))
qlBachelierCalculatorRho a1 a2 =
withBachelierCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBachelierCalculatorRho'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 1980 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorStrikeSensitivity :: (BachelierCalculator) -> IO ((Double))
qlBachelierCalculatorStrikeSensitivity a1 =
withBachelierCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBachelierCalculatorStrikeSensitivity'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1983 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorStrikeGamma :: (BachelierCalculator) -> IO ((Double))
qlBachelierCalculatorStrikeGamma a1 =
withBachelierCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBachelierCalculatorStrikeGamma'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1986 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorTheta :: (BachelierCalculator) -> (Double)
-> (Double)
-> IO ((Double))
qlBachelierCalculatorTheta a1 a2 a3 =
withBachelierCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
preErrorCheck $ \a4' ->
qlBachelierCalculatorTheta'_ a1' a2' a3' a4' >>= \res ->
let {res' = realToFrac res} in
errorCheck a4'>>
return (res')
{-# LINE 1991 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorThetaPerDay :: (BachelierCalculator) -> (Double)
-> (Double)
-> IO ((Double))
qlBachelierCalculatorThetaPerDay a1 a2 a3 =
withBachelierCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
preErrorCheck $ \a4' ->
qlBachelierCalculatorThetaPerDay'_ a1' a2' a3' a4' >>= \res ->
let {res' = realToFrac res} in
errorCheck a4'>>
return (res')
{-# LINE 1996 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorValue :: (BachelierCalculator) -> IO ((Double))
qlBachelierCalculatorValue a1 =
withBachelierCalculator a1 $ \a1' ->
preErrorCheck $ \a2' ->
qlBachelierCalculatorValue'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 1999 "./QuantLib/PricingEngine.chs" #-}
bachelierVanna :: (BachelierCalculator) -> (Double)
-> IO ((Double))
bachelierVanna a1 a2 =
withBachelierCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
bachelierVanna'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 2003 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorVega :: (BachelierCalculator) -> (Double)
-> IO ((Double))
qlBachelierCalculatorVega a1 a2 =
withBachelierCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBachelierCalculatorVega'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 2007 "./QuantLib/PricingEngine.chs" #-}
qlBachelierCalculatorVolga :: (BachelierCalculator) -> (Double)
-> IO ((Double))
qlBachelierCalculatorVolga a1 a2 =
withBachelierCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
qlBachelierCalculatorVolga'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 2011 "./QuantLib/PricingEngine.chs" #-}
class HasOptionCalculator a where
alpha :: a -> IO Double
beta :: a -> IO Double
delta :: a -> Double -> IO Double
deltaForward :: a -> IO Double
dividendRho :: a -> Double -> IO Double
elasticity :: a -> Double -> IO Double
elasticityForward :: a -> IO Double
gamma :: a -> Double -> IO Double
gammaForward :: a -> IO Double
itmAssetProbability :: a -> IO Double
itmCashProbability :: a -> IO Double
rho :: a -> Double -> IO Double
strikeSensitivity :: a -> IO Double
strikeGamma :: a -> IO Double
theta :: a -> Double -> Double -> IO Double
thetaPerDay :: a -> Double -> Double -> IO Double
value :: a -> IO Double
vega :: a -> Double -> IO Double
volga :: a -> Double -> IO Double
instance HasOptionCalculator (GenBlackCalculator bc) where
alpha :: GenBlackCalculator bc -> IO Double
alpha = GenBlackCalculator bc -> IO Double
forall bc. GenBlackCalculator bc -> IO Double
qlBlackCalculatorAlpha
beta :: GenBlackCalculator bc -> IO Double
beta = GenBlackCalculator bc -> IO Double
forall bc. GenBlackCalculator bc -> IO Double
qlBlackCalculatorBeta
delta :: GenBlackCalculator bc -> Double -> IO Double
delta = GenBlackCalculator bc -> Double -> IO Double
forall bc. GenBlackCalculator bc -> Double -> IO Double
qlBlackCalculatorDelta
deltaForward :: GenBlackCalculator bc -> IO Double
deltaForward = GenBlackCalculator bc -> IO Double
forall bc. GenBlackCalculator bc -> IO Double
qlBlackCalculatorDeltaForward
dividendRho :: GenBlackCalculator bc -> Double -> IO Double
dividendRho = GenBlackCalculator bc -> Double -> IO Double
forall bc. GenBlackCalculator bc -> Double -> IO Double
qlBlackCalculatorDividendRho
elasticity :: GenBlackCalculator bc -> Double -> IO Double
elasticity = GenBlackCalculator bc -> Double -> IO Double
forall bc. GenBlackCalculator bc -> Double -> IO Double
qlBlackCalculatorElasticity
elasticityForward :: GenBlackCalculator bc -> IO Double
elasticityForward = GenBlackCalculator bc -> IO Double
forall bc. GenBlackCalculator bc -> IO Double
qlBlackCalculatorElasticityForward
gamma :: GenBlackCalculator bc -> Double -> IO Double
gamma = GenBlackCalculator bc -> Double -> IO Double
forall bc. GenBlackCalculator bc -> Double -> IO Double
qlBlackCalculatorGamma
gammaForward :: GenBlackCalculator bc -> IO Double
gammaForward = GenBlackCalculator bc -> IO Double
forall bc. GenBlackCalculator bc -> IO Double
qlBlackCalculatorGammaForward
itmAssetProbability :: GenBlackCalculator bc -> IO Double
itmAssetProbability = GenBlackCalculator bc -> IO Double
forall bc. GenBlackCalculator bc -> IO Double
qlBlackCalculatorItmAssetProbability
itmCashProbability :: GenBlackCalculator bc -> IO Double
itmCashProbability = GenBlackCalculator bc -> IO Double
forall bc. GenBlackCalculator bc -> IO Double
qlBlackCalculatorItmCashProbability
rho :: GenBlackCalculator bc -> Double -> IO Double
rho = GenBlackCalculator bc -> Double -> IO Double
forall bc. GenBlackCalculator bc -> Double -> IO Double
qlBlackCalculatorRho
strikeSensitivity :: GenBlackCalculator bc -> IO Double
strikeSensitivity = GenBlackCalculator bc -> IO Double
forall bc. GenBlackCalculator bc -> IO Double
qlBlackCalculatorStrikeSensitivity
strikeGamma :: GenBlackCalculator bc -> IO Double
strikeGamma = GenBlackCalculator bc -> IO Double
forall bc. GenBlackCalculator bc -> IO Double
qlBlackCalculatorStrikeGamma
theta :: GenBlackCalculator bc -> Double -> Double -> IO Double
theta = GenBlackCalculator bc -> Double -> Double -> IO Double
forall bc. GenBlackCalculator bc -> Double -> Double -> IO Double
qlBlackCalculatorTheta
thetaPerDay :: GenBlackCalculator bc -> Double -> Double -> IO Double
thetaPerDay = GenBlackCalculator bc -> Double -> Double -> IO Double
forall bc. GenBlackCalculator bc -> Double -> Double -> IO Double
qlBlackCalculatorThetaPerDay
value :: GenBlackCalculator bc -> IO Double
value = GenBlackCalculator bc -> IO Double
forall bc. GenBlackCalculator bc -> IO Double
qlBlackCalculatorValue
vega :: GenBlackCalculator bc -> Double -> IO Double
vega = GenBlackCalculator bc -> Double -> IO Double
forall bc. GenBlackCalculator bc -> Double -> IO Double
qlBlackCalculatorVega
volga :: GenBlackCalculator bc -> Double -> IO Double
volga = GenBlackCalculator bc -> Double -> IO Double
forall bc. GenBlackCalculator bc -> Double -> IO Double
qlBlackCalculatorVolga
instance HasOptionCalculator BachelierCalculator where
alpha :: BachelierCalculator -> IO Double
alpha = BachelierCalculator -> IO Double
qlBachelierCalculatorAlpha
beta :: BachelierCalculator -> IO Double
beta = BachelierCalculator -> IO Double
qlBachelierCalculatorBeta
delta :: BachelierCalculator -> Double -> IO Double
delta = BachelierCalculator -> Double -> IO Double
qlBachelierCalculatorDelta
deltaForward :: BachelierCalculator -> IO Double
deltaForward = BachelierCalculator -> IO Double
qlBachelierCalculatorDeltaForward
dividendRho :: BachelierCalculator -> Double -> IO Double
dividendRho = BachelierCalculator -> Double -> IO Double
qlBachelierCalculatorDividendRho
elasticity :: BachelierCalculator -> Double -> IO Double
elasticity = BachelierCalculator -> Double -> IO Double
qlBachelierCalculatorElasticity
elasticityForward :: BachelierCalculator -> IO Double
elasticityForward = BachelierCalculator -> IO Double
qlBachelierCalculatorElasticityForward
gamma :: BachelierCalculator -> Double -> IO Double
gamma = BachelierCalculator -> Double -> IO Double
qlBachelierCalculatorGamma
gammaForward :: BachelierCalculator -> IO Double
gammaForward = BachelierCalculator -> IO Double
qlBachelierCalculatorGammaForward
itmAssetProbability :: BachelierCalculator -> IO Double
itmAssetProbability = BachelierCalculator -> IO Double
qlBachelierCalculatorItmAssetProbability
itmCashProbability :: BachelierCalculator -> IO Double
itmCashProbability = BachelierCalculator -> IO Double
qlBachelierCalculatorItmCashProbability
rho :: BachelierCalculator -> Double -> IO Double
rho = BachelierCalculator -> Double -> IO Double
qlBachelierCalculatorRho
strikeSensitivity :: BachelierCalculator -> IO Double
strikeSensitivity = BachelierCalculator -> IO Double
qlBachelierCalculatorStrikeSensitivity
strikeGamma :: BachelierCalculator -> IO Double
strikeGamma = BachelierCalculator -> IO Double
qlBachelierCalculatorStrikeGamma
theta :: BachelierCalculator -> Double -> Double -> IO Double
theta = BachelierCalculator -> Double -> Double -> IO Double
qlBachelierCalculatorTheta
thetaPerDay :: BachelierCalculator -> Double -> Double -> IO Double
thetaPerDay = BachelierCalculator -> Double -> Double -> IO Double
qlBachelierCalculatorThetaPerDay
value :: BachelierCalculator -> IO Double
value = BachelierCalculator -> IO Double
qlBachelierCalculatorValue
vega :: BachelierCalculator -> Double -> IO Double
vega = BachelierCalculator -> Double -> IO Double
qlBachelierCalculatorVega
volga :: BachelierCalculator -> Double -> IO Double
volga = BachelierCalculator -> Double -> IO Double
qlBachelierCalculatorVolga
blackDeltaCalculator :: (OptionType) -> (DeltaType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((BlackDeltaCalculator))
blackDeltaCalculator :: OptionType
-> DeltaType
-> Double
-> Double
-> Double
-> Double
-> IO BlackDeltaCalculator
blackDeltaCalculator OptionType
a1 DeltaType
a2 Double
a3 Double
a4 Double
a5 Double
a6 =
let {a1' :: CInt
a1' = OptionType -> CInt
forall a b. (Enum a, Integral b) => a -> b
fromEnumC OptionType
a1} in
let {a2' :: CInt
a2' = DeltaType -> CInt
forall a b. (Enum a, Integral b) => a -> b
fromEnumC DeltaType
a2} in
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
let {a4' :: CDouble
a4' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a4} in
let {a5' :: CDouble
a5' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a5} in
let {a6' :: CDouble
a6' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a6} in
(Ptr (Ptr CChar) -> IO BlackDeltaCalculator)
-> IO BlackDeltaCalculator
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO BlackDeltaCalculator)
-> IO BlackDeltaCalculator)
-> (Ptr (Ptr CChar) -> IO BlackDeltaCalculator)
-> IO BlackDeltaCalculator
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a7' ->
CInt
-> CInt
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> Ptr (Ptr CChar)
-> IO (Ptr CBlackDeltaCalculator)
blackDeltaCalculator'_ CInt
a1' CInt
a2' CDouble
a3' CDouble
a4' CDouble
a5' CDouble
a6' Ptr (Ptr CChar)
a7' IO (Ptr CBlackDeltaCalculator)
-> (Ptr CBlackDeltaCalculator -> IO BlackDeltaCalculator)
-> IO BlackDeltaCalculator
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Ptr CBlackDeltaCalculator
res ->
Ptr CBlackDeltaCalculator -> IO BlackDeltaCalculator
peekBlackDeltaCalculator Ptr CBlackDeltaCalculator
res IO BlackDeltaCalculator
-> (BlackDeltaCalculator -> IO BlackDeltaCalculator)
-> IO BlackDeltaCalculator
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \BlackDeltaCalculator
res' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a7'IO () -> IO BlackDeltaCalculator -> IO BlackDeltaCalculator
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
BlackDeltaCalculator -> IO BlackDeltaCalculator
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (BlackDeltaCalculator
res')
{-# LINE 2085 "./QuantLib/PricingEngine.chs" #-}
deltaFromStrike :: (BlackDeltaCalculator) -> (Double)
-> IO ((Double))
deltaFromStrike a1 a2 =
withBlackDeltaCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
deltaFromStrike'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 2089 "./QuantLib/PricingEngine.chs" #-}
strikeFromDelta :: (BlackDeltaCalculator) -> (Double)
-> IO ((Double))
strikeFromDelta a1 a2 =
withBlackDeltaCalculator a1 $ \a1' ->
let {a2' = realToFrac a2} in
preErrorCheck $ \a3' ->
strikeFromDelta'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 2093 "./QuantLib/PricingEngine.chs" #-}
atmStrike :: (BlackDeltaCalculator) -> (AtmType) -> IO ((Double))
atmStrike a1 a2 =
withBlackDeltaCalculator a1 $ \a1' ->
let {a2' = fromEnumC a2} in
preErrorCheck $ \a3' ->
atmStrike'_ a1' a2' a3' >>= \res ->
let {res' = realToFrac res} in
errorCheck a3'>>
return (res')
{-# LINE 2097 "./QuantLib/PricingEngine.chs" #-}
blackFormula :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
blackFormula :: OptionType
-> Double -> Double -> Double -> Double -> Double -> IO Double
blackFormula OptionType
a1 Double
a2 Double
a3 Double
a4 Double
a5 Double
a6 =
let {a1' :: CInt
a1' = OptionType -> CInt
forall a b. (Enum a, Integral b) => a -> b
fromEnumC OptionType
a1} in
let {a2' :: CDouble
a2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a2} in
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
let {a4' :: CDouble
a4' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a4} in
let {a5' :: CDouble
a5' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a5} in
let {a6' :: CDouble
a6' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a6} in
(Ptr (Ptr CChar) -> IO Double) -> IO Double
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO Double) -> IO Double)
-> (Ptr (Ptr CChar) -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a7' ->
CInt
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> Ptr (Ptr CChar)
-> IO CDouble
blackFormula'_ CInt
a1' CDouble
a2' CDouble
a3' CDouble
a4' CDouble
a5' CDouble
a6' Ptr (Ptr CChar)
a7' IO CDouble -> (CDouble -> IO Double) -> IO Double
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CDouble
res ->
let {res' = realToFrac res} in
errorCheck a7'>>
return (res')
{-# LINE 2105 "./QuantLib/PricingEngine.chs" #-}
blackCashItmProbability :: (OptionType) -> (Double) -> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
blackCashItmProbability a1 a2 a3 a4 a5 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
preErrorCheck $ \a6' ->
blackCashItmProbability'_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = realToFrac res} in
errorCheck a6'>>
return (res')
{-# LINE 2113 "./QuantLib/PricingEngine.chs" #-}
blackImpliedStdDev :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Word)
-> IO ((Double))
blackImpliedStdDev :: OptionType
-> Double
-> Double
-> Double
-> Double
-> Double
-> Double
-> Double
-> Word
-> IO Double
blackImpliedStdDev OptionType
a1 Double
a2 Double
a3 Double
a4 Double
a5 Double
a6 Double
a7 Double
a8 Word
a9 =
let {a1' :: CInt
a1' = OptionType -> CInt
forall a b. (Enum a, Integral b) => a -> b
fromEnumC OptionType
a1} in
let {a2' :: CDouble
a2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a2} in
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
let {a4' :: CDouble
a4' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a4} in
let {a5' :: CDouble
a5' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a5} in
let {a6' :: CDouble
a6' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a6} in
let {a7' :: CDouble
a7' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a7} in
let {a8' :: CDouble
a8' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a8} in
let {a9' :: CUInt
a9' = Word -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
a9} in
(Ptr (Ptr CChar) -> IO Double) -> IO Double
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO Double) -> IO Double)
-> (Ptr (Ptr CChar) -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a10' ->
CInt
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CUInt
-> Ptr (Ptr CChar)
-> IO CDouble
blackImpliedStdDev'_ CInt
a1' CDouble
a2' CDouble
a3' CDouble
a4' CDouble
a5' CDouble
a6' CDouble
a7' CDouble
a8' CUInt
a9' Ptr (Ptr CChar)
a10' IO CDouble -> (CDouble -> IO Double) -> IO Double
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CDouble
res ->
let {res' :: Double
res' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
res} in
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a10'IO () -> IO Double -> IO Double
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
Double -> IO Double
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Double
res')
{-# LINE 2124 "./QuantLib/PricingEngine.chs" #-}
blackImpliedStdDevApproximation :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
blackImpliedStdDevApproximation a1 a2 a3 a4 a5 a6 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
preErrorCheck $ \a7' ->
blackImpliedStdDevApproximation'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
let {res' = realToFrac res} in
errorCheck a7'>>
return (res')
{-# LINE 2132 "./QuantLib/PricingEngine.chs" #-}
blackStdDevDerivative :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
blackStdDevDerivative a1 a2 a3 a4 a5 =
let {a1' = realToFrac a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
preErrorCheck $ \a6' ->
blackStdDevDerivative'_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = realToFrac res} in
errorCheck a6'>>
return (res')
{-# LINE 2140 "./QuantLib/PricingEngine.chs" #-}
blackVolDerivative :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
blackVolDerivative a1 a2 a3 a4 a5 a6 =
let {a1' = realToFrac a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
preErrorCheck $ \a7' ->
blackVolDerivative'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
let {res' = realToFrac res} in
errorCheck a7'>>
return (res')
{-# LINE 2149 "./QuantLib/PricingEngine.chs" #-}
bachelierBlackFormula :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
bachelierBlackFormula a1 a2 a3 a4 a5 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
preErrorCheck $ \a6' ->
bachelierBlackFormula'_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = realToFrac res} in
errorCheck a6'>>
return (res')
{-# LINE 2156 "./QuantLib/PricingEngine.chs" #-}
blackForwardDerivative :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
blackForwardDerivative a1 a2 a3 a4 a5 a6 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
preErrorCheck $ \a7' ->
blackForwardDerivative'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
let {res' = realToFrac res} in
errorCheck a7'>>
return (res')
{-# LINE 2164 "./QuantLib/PricingEngine.chs" #-}
blackImpliedStdDevChambers :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
blackImpliedStdDevChambers a1 a2 a3 a4 a5 a6 a7 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
let {a7' = realToFrac a7} in
preErrorCheck $ \a8' ->
blackImpliedStdDevChambers'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
let {res' = realToFrac res} in
errorCheck a8'>>
return (res')
{-# LINE 2173 "./QuantLib/PricingEngine.chs" #-}
blackImpliedStdDevApproximationRs :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
blackImpliedStdDevApproximationRs a1 a2 a3 a4 a5 a6 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
preErrorCheck $ \a7' ->
blackImpliedStdDevApproximationRs'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
let {res' = realToFrac res} in
errorCheck a7'>>
return (res')
{-# LINE 2181 "./QuantLib/PricingEngine.chs" #-}
blackImpliedStdDevLiRs :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Maybe Double)
-> (Double)
-> (Double)
-> (Word)
-> IO ((Double))
blackImpliedStdDevLiRs a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
let {a7' = fromMaybeDouble a7} in
let {a8' = realToFrac a8} in
let {a9' = realToFrac a9} in
let {a10' = fromIntegral a10} in
preErrorCheck $ \a11' ->
blackImpliedStdDevLiRs'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' >>= \res ->
let {res' = realToFrac res} in
errorCheck a11'>>
return (res')
{-# LINE 2193 "./QuantLib/PricingEngine.chs" #-}
blackAssetItmProbability :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
blackAssetItmProbability a1 a2 a3 a4 a5 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
preErrorCheck $ \a6' ->
blackAssetItmProbability'_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = realToFrac res} in
errorCheck a6'>>
return (res')
{-# LINE 2200 "./QuantLib/PricingEngine.chs" #-}
blackStdDevSecondDerivative :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
blackStdDevSecondDerivative a1 a2 a3 a4 a5 =
let {a1' = realToFrac a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
preErrorCheck $ \a6' ->
blackStdDevSecondDerivative'_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = realToFrac res} in
errorCheck a6'>>
return (res')
{-# LINE 2208 "./QuantLib/PricingEngine.chs" #-}
bachelierForwardDerivative :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
bachelierForwardDerivative a1 a2 a3 a4 a5 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
preErrorCheck $ \a6' ->
bachelierForwardDerivative'_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = realToFrac res} in
errorCheck a6'>>
return (res')
{-# LINE 2215 "./QuantLib/PricingEngine.chs" #-}
bachelierImpliedVol :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
bachelierImpliedVol a1 a2 a3 a4 a5 a6 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
preErrorCheck $ \a7' ->
bachelierImpliedVol'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
let {res' = realToFrac res} in
errorCheck a7'>>
return (res')
{-# LINE 2223 "./QuantLib/PricingEngine.chs" #-}
bachelierImpliedVolChoi :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
bachelierImpliedVolChoi a1 a2 a3 a4 a5 a6 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
preErrorCheck $ \a7' ->
bachelierImpliedVolChoi'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
let {res' = realToFrac res} in
errorCheck a7'>>
return (res')
{-# LINE 2231 "./QuantLib/PricingEngine.chs" #-}
bachelierStdDevDerivative :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
bachelierStdDevDerivative a1 a2 a3 a4 =
let {a1' = realToFrac a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
preErrorCheck $ \a5' ->
bachelierStdDevDerivative'_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = realToFrac res} in
errorCheck a5'>>
return (res')
{-# LINE 2238 "./QuantLib/PricingEngine.chs" #-}
bachelierAssetItmProbability :: (OptionType) -> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
bachelierAssetItmProbability a1 a2 a3 a4 =
let {a1' = fromEnumC a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
preErrorCheck $ \a5' ->
bachelierAssetItmProbability'_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = realToFrac res} in
errorCheck a5'>>
return (res')
{-# LINE 2244 "./QuantLib/PricingEngine.chs" #-}
defaultThetaPerDay :: (Double)
-> IO ((Double))
defaultThetaPerDay a1 =
let {a1' = realToFrac a1} in
preErrorCheck $ \a2' ->
defaultThetaPerDay'_ a1' a2' >>= \res ->
let {res' = realToFrac res} in
errorCheck a2'>>
return (res')
{-# LINE 2248 "./QuantLib/PricingEngine.chs" #-}
unsafeSabrLogNormalVolatility :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
unsafeSabrLogNormalVolatility :: Double
-> Double
-> Double
-> Double
-> Double
-> Double
-> Double
-> IO Double
unsafeSabrLogNormalVolatility Double
a1 Double
a2 Double
a3 Double
a4 Double
a5 Double
a6 Double
a7 =
let {a1' :: CDouble
a1' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a1} in
let {a2' :: CDouble
a2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a2} in
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
let {a4' :: CDouble
a4' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a4} in
let {a5' :: CDouble
a5' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a5} in
let {a6' :: CDouble
a6' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a6} in
let {a7' :: CDouble
a7' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a7} in
(Ptr (Ptr CChar) -> IO Double) -> IO Double
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO Double) -> IO Double)
-> (Ptr (Ptr CChar) -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a8' ->
CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> Ptr (Ptr CChar)
-> IO CDouble
unsafeSabrLogNormalVolatility'_ CDouble
a1' CDouble
a2' CDouble
a3' CDouble
a4' CDouble
a5' CDouble
a6' CDouble
a7' Ptr (Ptr CChar)
a8' IO CDouble -> (CDouble -> IO Double) -> IO Double
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CDouble
res ->
let {res' :: Double
res' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
res} in
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a8'IO () -> IO Double -> IO Double
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
Double -> IO Double
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Double
res')
{-# LINE 2258 "./QuantLib/PricingEngine.chs" #-}
unsafeShiftedSabrVolatility :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (VolatilityType)
-> IO ((Double))
unsafeShiftedSabrVolatility a1 a2 a3 a4 a5 a6 a7 a8 a9 =
let {a1' = realToFrac a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
let {a7' = realToFrac a7} in
let {a8' = realToFrac a8} in
let {a9' = (fromIntegral . fromEnum) a9} in
preErrorCheck $ \a10' ->
unsafeShiftedSabrVolatility'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
let {res' = realToFrac res} in
errorCheck a10'>>
return (res')
{-# LINE 2270 "./QuantLib/PricingEngine.chs" #-}
unsafeSabrNormalVolatility :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
unsafeSabrNormalVolatility a1 a2 a3 a4 a5 a6 a7 =
let {a1' = realToFrac a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
let {a7' = realToFrac a7} in
preErrorCheck $ \a8' ->
unsafeSabrNormalVolatility'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
let {res' = realToFrac res} in
errorCheck a8'>>
return (res')
{-# LINE 2280 "./QuantLib/PricingEngine.chs" #-}
unsafeSabrVolatility :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (VolatilityType)
-> IO ((Double))
unsafeSabrVolatility a1 a2 a3 a4 a5 a6 a7 a8 =
let {a1' = realToFrac a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
let {a7' = realToFrac a7} in
let {a8' = (fromIntegral . fromEnum) a8} in
preErrorCheck $ \a9' ->
unsafeSabrVolatility'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
let {res' = realToFrac res} in
errorCheck a9'>>
return (res')
{-# LINE 2291 "./QuantLib/PricingEngine.chs" #-}
sabrVolatility :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (VolatilityType)
-> IO ((Double))
sabrVolatility a1 a2 a3 a4 a5 a6 a7 a8 =
let {a1' = realToFrac a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
let {a7' = realToFrac a7} in
let {a8' = (fromIntegral . fromEnum) a8} in
preErrorCheck $ \a9' ->
sabrVolatility'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
let {res' = realToFrac res} in
errorCheck a9'>>
return (res')
{-# LINE 2302 "./QuantLib/PricingEngine.chs" #-}
shiftedSabrVolatility :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (VolatilityType)
-> IO ((Double))
shiftedSabrVolatility a1 a2 a3 a4 a5 a6 a7 a8 a9 =
let {a1' = realToFrac a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
let {a7' = realToFrac a7} in
let {a8' = realToFrac a8} in
let {a9' = (fromIntegral . fromEnum) a9} in
preErrorCheck $ \a10' ->
shiftedSabrVolatility'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
let {res' = realToFrac res} in
errorCheck a10'>>
return (res')
{-# LINE 2314 "./QuantLib/PricingEngine.chs" #-}
sabrFlochKennedyVolatility :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ((Double))
sabrFlochKennedyVolatility a1 a2 a3 a4 a5 a6 a7 =
let {a1' = realToFrac a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
let {a5' = realToFrac a5} in
let {a6' = realToFrac a6} in
let {a7' = realToFrac a7} in
preErrorCheck $ \a8' ->
sabrFlochKennedyVolatility'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
let {res' = realToFrac res} in
errorCheck a8'>>
return (res')
{-# LINE 2324 "./QuantLib/PricingEngine.chs" #-}
validateSabrParameters :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> IO ()
validateSabrParameters a1 a2 a3 a4 =
let {a1' = realToFrac a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
let {a4' = realToFrac a4} in
preErrorCheck $ \a5' ->
validateSabrParameters'_ a1' a2' a3' a4' a5' >>
errorCheck a5'>>
return ()
{-# LINE 2331 "./QuantLib/PricingEngine.chs" #-}
sabrGuess :: (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (Double)
-> (VolatilityType)
-> IO (([Double]))
sabrGuess :: Double
-> Double
-> Double
-> Double
-> Double
-> Double
-> Double
-> Double
-> Double
-> Double
-> VolatilityType
-> IO [Double]
sabrGuess Double
a1 Double
a2 Double
a3 Double
a4 Double
a5 Double
a6 Double
a7 Double
a8 Double
a9 Double
a10 VolatilityType
a11 =
let {a1' :: CDouble
a1' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a1} in
let {a2' :: CDouble
a2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a2} in
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
let {a4' :: CDouble
a4' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a4} in
let {a5' :: CDouble
a5' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a5} in
let {a6' :: CDouble
a6' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a6} in
let {a7' :: CDouble
a7' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a7} in
let {a8' :: CDouble
a8' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a8} in
let {a9' :: CDouble
a9' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a9} in
let {a10' :: CDouble
a10' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a10} in
let {a11' :: CInt
a11' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (VolatilityType -> Int) -> VolatilityType -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VolatilityType -> Int
forall a. Enum a => a -> Int
fromEnum) VolatilityType
a11} in
((Ptr CUInt, Ptr (Ptr CDouble)) -> IO [Double]) -> IO [Double]
forall a b. ((Ptr CUInt, Ptr (Ptr a)) -> IO b) -> IO b
preArray (((Ptr CUInt, Ptr (Ptr CDouble)) -> IO [Double]) -> IO [Double])
-> ((Ptr CUInt, Ptr (Ptr CDouble)) -> IO [Double]) -> IO [Double]
forall a b. (a -> b) -> a -> b
$ \(Ptr CUInt
a12'1, Ptr (Ptr CDouble)
a12'2) ->
(Ptr (Ptr CChar) -> IO [Double]) -> IO [Double]
forall a b. (Ptr (Ptr a) -> IO b) -> IO b
preErrorCheck ((Ptr (Ptr CChar) -> IO [Double]) -> IO [Double])
-> (Ptr (Ptr CChar) -> IO [Double]) -> IO [Double]
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr CChar)
a13' ->
CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CInt
-> Ptr CUInt
-> Ptr (Ptr CDouble)
-> Ptr (Ptr CChar)
-> IO ()
sabrGuess'_ CDouble
a1' CDouble
a2' CDouble
a3' CDouble
a4' CDouble
a5' CDouble
a6' CDouble
a7' CDouble
a8' CDouble
a9' CDouble
a10' CInt
a11' Ptr CUInt
a12'1 Ptr (Ptr CDouble)
a12'2 Ptr (Ptr CChar)
a13' IO () -> IO [Double] -> IO [Double]
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
Ptr CUInt -> Ptr (Ptr CDouble) -> IO [Double]
peekDoubleArray Ptr CUInt
a12'1 Ptr (Ptr CDouble)
a12'2IO [Double] -> ([Double] -> IO [Double]) -> IO [Double]
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[Double]
a12'' ->
Ptr (Ptr CChar) -> IO ()
errorCheck Ptr (Ptr CChar)
a13'IO () -> IO [Double] -> IO [Double]
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
[Double] -> IO [Double]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ([Double]
a12'')
{-# LINE 2346 "./QuantLib/PricingEngine.chs" #-}
blackCalculator :: StrikeSpec -> Double -> Double -> Double -> IO BlackCalculator
blackCalculator spec = case spec of
Strike t k -> blackCalculatorAtStrikeRaw t k
StrikePayoff p -> blackCalculatorFromPayoffRaw p
blackScholesCalculator :: StrikeSpec -> Double -> Double -> Double -> Double
-> IO BlackScholesCalculator
blackScholesCalculator spec = case spec of
Strike t k -> blackScholesCalculatorAtStrikeRaw t k
StrikePayoff p -> blackScholesCalculatorFromPayoffRaw p
bachelierCalculator :: StrikeSpec -> Double -> Double -> Double -> IO BachelierCalculator
bachelierCalculator spec = case spec of
Strike t k -> bachelierCalculatorAtStrikeRaw t k
StrikePayoff p -> bachelierCalculatorFromPayoffRaw p
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlDiscountingBondEngine"
discountingBondEngine'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlDiscountingPerpetualFuturesEngine"
qlDiscountingPerpetualFuturesEngine'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlRiskyBondEngine"
riskyBondEngine'_ :: ((C2HSImp.Ptr (CDefaultProbabilityTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlDiscountingSwapEngine"
discountingSwapEngine'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlDiscountingFxForwardEngine"
discountingFxForwardEngine'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlDiscountingConstNotionalCrossCurrencySwapEngine"
discountingConstNotionalCrossCurrencySwapEngine'_ :: ((C2HSImp.Ptr (CCurrency)) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CCurrency)) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlCounterpartyAdjSwapEngine"
counterpartyAdjSwapEngine'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CDefaultProbabilityTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (CDefaultProbabilityTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticBarrierEngine"
analyticBarrierEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticTwoAssetBarrierEngine"
analyticTwoAssetBarrierEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticSoftBarrierEngine"
analyticSoftBarrierEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticSimpleChooserEngine"
analyticSimpleChooserEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticComplexChooserEngine"
analyticComplexChooserEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticTwoAssetCorrelationEngine"
analyticTwoAssetCorrelationEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticEuropeanMargrabeEngine"
analyticEuropeanMargrabeEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticAmericanMargrabeEngine"
analyticAmericanMargrabeEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticWriterExtensibleOptionEngine"
analyticWriterExtensibleOptionEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticHolderExtensibleOptionEngine"
analyticHolderExtensibleOptionEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticPartialTimeBarrierOptionEngine"
analyticPartialTimeBarrierOptionEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticBinaryBarrierEngine"
analyticBinaryBarrierEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBinomialBarrierEngine"
binomialBarrierEngine'_ :: (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlVannaVolgaBarrierEngine"
vannaVolgaBarrierEngine'_ :: ((C2HSImp.Ptr (CDeltaVolQuote')) -> ((C2HSImp.Ptr (CDeltaVolQuote')) -> ((C2HSImp.Ptr (CDeltaVolQuote')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticDoubleBarrierEngine"
analyticDoubleBarrierEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlVannaVolgaDoubleBarrierEngine"
vannaVolgaDoubleBarrierEngine'_ :: ((C2HSImp.Ptr (CDeltaVolQuote')) -> ((C2HSImp.Ptr (CDeltaVolQuote')) -> ((C2HSImp.Ptr (CDeltaVolQuote')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBinomialDoubleBarrierEngine"
binomialDoubleBarrierEngine'_ :: (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCDoubleBarrierEngine"
mcDoubleBarrierEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticCliquetEngine"
analyticCliquetEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticCompoundOptionEngine"
analyticCompoundOptionEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticContinuousFixedLookbackEngine"
analyticContinuousFixedLookbackEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticContinuousFloatingLookbackEngine"
analyticContinuousFloatingLookbackEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticContinuousPartialFloatingLookbackEngine"
analyticContinuousPartialFloatingLookbackEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticContinuousPartialFixedLookbackEngine"
analyticContinuousPartialFixedLookbackEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticContinuousGeometricAveragePriceAsianEngine"
analyticContinuousGeometricAveragePriceAsianEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticContinuousGeometricAveragePriceAsianHestonEngine"
analyticContinuousGeometricAveragePriceAsianHestonEngine'_ :: ((C2HSImp.Ptr (CHestonProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticDiscreteGeometricAveragePriceAsianHestonEngine"
analyticDiscreteGeometricAveragePriceAsianHestonEngine'_ :: ((C2HSImp.Ptr (CHestonProcess')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCLookbackFixedEngine"
mcLookbackFixedEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCLookbackFloatingEngine"
mcLookbackFloatingEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCLookbackPartialFixedEngine"
mcLookbackPartialFixedEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCLookbackPartialFloatingEngine"
mcLookbackPartialFloatingEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticDigitalAmericanEngine"
analyticDigitalAmericanEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticDigitalAmericanKOEngine"
analyticDigitalAmericanKoEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticDiscreteGeometricAveragePriceAsianEngine"
analyticDiscreteGeometricAveragePriceAsianEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticDiscreteGeometricAverageStrikeAsianEngine"
analyticDiscreteGeometricAverageStrikeAsianEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlTurnbullWakemanAsianEngine"
turnbullWakemanAsianEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticDividendEuropeanEngine"
analyticDividendEuropeanEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CDividend))) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticEuropeanEngine"
analyticEuropeanEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticPerformanceEngine"
analyticPerformanceEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlForwardEuropeanEngine"
forwardEuropeanEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlForwardBaroneAdesiWhaleyEngine"
forwardBaroneAdesiWhaleyEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlForwardBjerksundStenslandEngine"
forwardBjerksundStenslandEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlForwardFdBlackScholesVanillaEngine"
forwardFdBlackScholesVanillaEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCForwardEuropeanBSEngine1"
mcForwardEuropeanBsEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCForwardEuropeanHestonEngine1"
mcForwardEuropeanHestonEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CHestonProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticHestonForwardEuropeanEngine"
analyticHestonForwardEuropeanEngine'_ :: ((C2HSImp.Ptr (CHestonProcess')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantoEuropeanEngine"
quantoEuropeanEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CBlackVolTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantoForwardEuropeanEngine"
quantoForwardEuropeanEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CBlackVolTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantoForwardPerformanceEuropeanEngine"
quantoForwardPerformanceEuropeanEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CBlackVolTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantoBarrierEngine"
quantoBarrierEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CBlackVolTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantoDoubleBarrierEngine"
quantoDoubleBarrierEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CBlackVolTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCapFloorEngine1"
blackCapFloorEngineFromVolatilityStructure'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (COptionletVolatilityStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCapFloorEngine"
blackCapFloorEngine'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CDayCounter)) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackSwaptionEngine"
blackSwaptionEngine'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CDayCounter)) -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlHaganIrregularSwaptionEngine"
haganIrregularSwaptionEngine'_ :: ((C2HSImp.Ptr (CSwaptionVolatilityStructure')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackSwaptionEngine1"
blackSwaptionEngineFromVolatilityStructure'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CSwaptionVolatilityStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCapFloorEngine1"
bachelierCapFloorEngineFromVolatilityStructure'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (COptionletVolatilityStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCapFloorEngine"
bachelierCapFloorEngine'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CDayCounter)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlYoYInflationBlackCapFloorEngine"
yoyInflationBlackCapFloorEngine'_ :: ((C2HSImp.Ptr (CYoYInflationIndex')) -> ((C2HSImp.Ptr (CYoYOptionletVolatilitySurface')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlYoYInflationUnitDisplacedBlackCapFloorEngine"
yoyInflationUnitDisplacedBlackCapFloorEngine'_ :: ((C2HSImp.Ptr (CYoYInflationIndex')) -> ((C2HSImp.Ptr (CYoYOptionletVolatilitySurface')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlYoYInflationBachelierCapFloorEngine"
yoyInflationBachelierCapFloorEngine'_ :: ((C2HSImp.Ptr (CYoYInflationIndex')) -> ((C2HSImp.Ptr (CYoYOptionletVolatilitySurface')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlInterpolatingCPICapFloorEngine"
interpolatingCpiCapFloorEngine'_ :: ((C2HSImp.Ptr (CCPICapFloorTermPriceSurface')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierSwaptionEngine"
bachelierSwaptionEngine'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CDayCounter)) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierSwaptionEngine1"
bachelierSwaptionEngineFromVolatilityStructure'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CSwaptionVolatilityStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticBSMHullWhiteEngine"
analyticBsmHullWhiteEngine'_ :: (C2HSImp.CDouble -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CHullWhite')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticCapFloorEngine"
analyticCapFloorEngine'_ :: ((C2HSImp.Ptr (CAffineModel')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlGaussian1dCapFloorEngine"
gaussian1dCapFloorEngine'_ :: ((C2HSImp.Ptr (CGaussian1dModel')) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticGJRGARCHEngine"
analyticGjrGarchEngine'_ :: ((C2HSImp.Ptr (CGJRGARCHModel')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticHestonEngine"
analyticHestonEngineTolerance'_ :: ((C2HSImp.Ptr (CHestonModel')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticHestonHullWhiteEngine"
analyticHestonHullWhiteEngineOrder'_ :: ((C2HSImp.Ptr (CHestonModel')) -> ((C2HSImp.Ptr (CHullWhite')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBatesEngine"
batesEngineOrder'_ :: ((C2HSImp.Ptr (CBatesModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFFTVanillaEngine"
fftVanillaEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlG2SwaptionEngine"
g2SwaptionEngine'_ :: ((C2HSImp.Ptr (CG2')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlJumpDiffusionEngine"
jumpDiffusionEngine'_ :: ((C2HSImp.Ptr (CMerton76Process')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlTreeCapFloorEngine"
treeCapFloorEngineTimeSteps'_ :: ((C2HSImp.Ptr (CShortRateModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlTreeSwaptionEngine"
treeSwaptionEngineTimeSteps'_ :: ((C2HSImp.Ptr (CShortRateModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlTreeVanillaSwapEngine"
treeVanillaSwapEngineTimeSteps'_ :: ((C2HSImp.Ptr (CShortRateModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlVarianceGammaEngine"
varianceGammaEngine'_ :: ((C2HSImp.Ptr (CVarianceGammaProcess')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticHestonEngine1"
analyticHestonEngineOrder'_ :: ((C2HSImp.Ptr (CHestonModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticHestonEngineOptimalControlVariate"
analyticHestonEngineOptimalControlVariate'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO C2HSImp.CInt)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticHestonHullWhiteEngine1"
analyticHestonHullWhiteEngineTolerance'_ :: ((C2HSImp.Ptr (CHestonModel')) -> ((C2HSImp.Ptr (CHullWhite')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBatesEngine1"
batesEngineTolerance'_ :: ((C2HSImp.Ptr (CBatesModel')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBaroneAdesiWhaleyApproximationEngine"
baroneAdesiWhaleyApproximationEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBatesDetJumpEngine1"
batesDetJumpEngineTolerance'_ :: ((C2HSImp.Ptr (CBatesDetJumpModel')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBatesDetJumpEngine"
batesDetJumpEngineOrder'_ :: ((C2HSImp.Ptr (CBatesDetJumpModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBatesDoubleExpDetJumpEngine1"
batesDoubleExpDetJumpEngineTolerance'_ :: ((C2HSImp.Ptr (CBatesDoubleExpDetJumpModel')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBatesDoubleExpDetJumpEngine"
batesDoubleExpDetJumpEngineOrder'_ :: ((C2HSImp.Ptr (CBatesDoubleExpDetJumpModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBatesDoubleExpEngine1"
batesDoubleExpEngineTolerance'_ :: ((C2HSImp.Ptr (CBatesDoubleExpModel')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBatesDoubleExpEngine"
batesDoubleExpEngineOrder'_ :: ((C2HSImp.Ptr (CBatesDoubleExpModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBjerksundStenslandApproximationEngine"
bjerksundStenslandApproximationEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQdPlusAmericanEngine"
qdPlusAmericanEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQdFpAmericanEngine"
qdFpAmericanEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlContinuousArithmeticAsianVecerEngine"
continuousArithmeticAsianVecerEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CQuote')) -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlIntegralCdsEngine"
integralCdsEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CDefaultProbabilityTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (CYieldTermStructure')) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlIntegralEngine"
integralEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlJamshidianSwaptionEngine"
jamshidianSwaptionEngine'_ :: ((C2HSImp.Ptr (COneFactorAffineModel')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlGaussian1dSwaptionEngine"
gaussian1dSwaptionEngine'_ :: ((C2HSImp.Ptr (CGaussian1dModel')) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CYieldTermStructure')) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlGaussian1dNonstandardSwaptionEngine"
gaussian1dNonstandardSwaptionEngine'_ :: ((C2HSImp.Ptr (CGaussian1dModel')) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlGaussian1dFloatFloatSwaptionEngine"
gaussian1dFloatFloatSwaptionEngine'_ :: ((C2HSImp.Ptr (CGaussian1dModel')) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlGaussian1dJamshidianSwaptionEngine"
gaussian1dJamshidianSwaptionEngine'_ :: ((C2HSImp.Ptr (CGaussian1dModel')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlJuQuadraticApproximationEngine"
juQuadraticApproximationEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlKirkEngine"
kirkEngine'_ :: ((C2HSImp.Ptr (CBlackProcess')) -> ((C2HSImp.Ptr (CBlackProcess')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMidPointCdsEngine"
midPointCdsEngine'_ :: ((C2HSImp.Ptr (CDefaultProbabilityTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (CYieldTermStructure')) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMidPointCDOEngine"
midPointCdoEngine'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlIntegralCDOEngine"
integralCdoEngine'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlIntegralNtdEngine"
integralNtdEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlIsdaCdsEngine"
isdaCdsEngine'_ :: ((C2HSImp.Ptr (CDefaultProbabilityTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (CYieldTermStructure')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlReplicatingVarianceSwapEngine"
replicatingVarianceSwapEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlStulzEngine"
stulzEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBjerksundStenslandSpreadEngine"
bjerksundStenslandSpreadEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlOperatorSplittingSpreadEngine"
operatorSplittingSpreadEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlPearsonSpreadEngine"
pearsonSpreadEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlGaussianCopulaSpreadEngine"
gaussianCopulaSpreadEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlChoiBasketEngine"
qlChoiBasketEngine'_ :: (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CGeneralizedBlackScholesProcess'))) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlDengLiZhouBasketEngine"
qlDengLiZhouBasketEngine'_ :: (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CGeneralizedBlackScholesProcess'))) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlSingleFactorBsmBasketEngine"
qlSingleFactorBsmBasketEngine'_ :: (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CGeneralizedBlackScholesProcess'))) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlLfmSwaptionEngine"
lfmSwaptionEngine'_ :: ((C2HSImp.Ptr (CLiborForwardModel')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlTreeCapFloorEngine1"
treeCapFloorEngineTimeGrid'_ :: ((C2HSImp.Ptr (CShortRateModel')) -> ((C2HSImp.Ptr (CTimeGrid)) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlTreeSwaptionEngine1"
treeSwaptionEngineTimeGrid'_ :: ((C2HSImp.Ptr (CShortRateModel')) -> ((C2HSImp.Ptr (CTimeGrid)) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlTreeVanillaSwapEngine1"
treeVanillaSwapEngineTimeGrid'_ :: ((C2HSImp.Ptr (CShortRateModel')) -> ((C2HSImp.Ptr (CTimeGrid)) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdmQuantoHelper"
fdmQuantoHelper'_ :: ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CBlackVolTermStructure')) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CFdmQuantoHelper)))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdmQuantoHelperQuantoAdjustment"
quantoAdjustment'_ :: ((C2HSImp.Ptr (CFdmQuantoHelper)) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFd2dBlackScholesVanillaEngine"
fd2dBlackScholesVanillaEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdndimBlackScholesVanillaEngine"
qlFdndimBlackScholesVanillaEngine'_ :: (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CGeneralizedBlackScholesProcess'))) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr C2HSImp.CUInt) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdndimBlackScholesVanillaEngine1"
qlFdndimBlackScholesVanillaEngine1'_ :: (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CGeneralizedBlackScholesProcess'))) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdG2SwaptionEngine"
fdG2SwaptionEngine'_ :: ((C2HSImp.Ptr (CG2')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdHullWhiteSwaptionEngine"
fdHullWhiteSwaptionEngine'_ :: ((C2HSImp.Ptr (CHullWhite')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdBlackScholesBarrierEngine"
fdBlackScholesBarrierEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdHestonBarrierEngine"
fdHestonBarrierEngineNoDividends'_ :: ((C2HSImp.Ptr (CHestonModel')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (CLocalVolTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdHestonBarrierEngine1"
fdHestonBarrierEngineWithDividends'_ :: ((C2HSImp.Ptr (CHestonModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CDividend))) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (CLocalVolTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdHestonDoubleBarrierEngine"
fdHestonDoubleBarrierEngine'_ :: ((C2HSImp.Ptr (CHestonModel')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (CLocalVolTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCHestonHullWhiteEngine1"
mcHestonHullWhiteEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CHybridHestonHullWhiteProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCAmericanEngine1"
mcAmericanEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCBarrierEngine1"
mcBarrierEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCDigitalEngine1"
mcDigitalEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCDiscreteArithmeticAPEngine1"
mcDiscreteArithmeticApEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCDiscreteArithmeticASEngine1"
mcDiscreteArithmeticAsEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCDiscreteGeometricAPEngine1"
mcDiscreteGeometricApEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCDiscreteArithmeticAPHestonEngine1"
mcDiscreteArithmeticApHestonEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CHestonProcess')) -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCDiscreteGeometricAPHestonEngine1"
mcDiscreteGeometricApHestonEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CHestonProcess')) -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCEuropeanEngine1"
mcEuropeanEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCEuropeanGJRGARCHEngine1"
mcEuropeanGjrGarchEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGJRGARCHProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCEuropeanHestonEngine1"
mcEuropeanHestonEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CHestonProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlIntegralHestonVarianceOptionEngine"
integralHestonVarianceOptionEngine'_ :: ((C2HSImp.Ptr (CHestonProcess')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCHullWhiteCapFloorEngine1"
mcHullWhiteCapFloorEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CHullWhite')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCHimalayaEngine1"
mcHimalayaEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CStochasticProcessArray')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCPagodaEngine1"
mcPagodaEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CStochasticProcessArray')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCEuropeanBasketEngine1"
mcEuropeanBasketEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CStochasticProcessArray')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCEverestEngine1"
mcEverestEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CStochasticProcessArray')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCAmericanBasketEngine1"
mcAmericanBasketEngine'_ :: (C2HSImp.CInt -> ((C2HSImp.Ptr (CStochasticProcessArray')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCPerformanceEngine1"
mcPerformanceEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlMCVarianceSwapEngine1"
mcVarianceSwapEngine'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBinomialVanillaEngine"
binomialVanillaEngine'_ :: (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdBlackScholesAsianEngine"
fdBlackScholesAsianEngine'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdBlackScholesVanillaEngine"
fdBlackScholesVanillaEngineNoDividends'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdBlackScholesVanillaEngine1"
fdBlackScholesVanillaEngineWithDividends'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CDividend))) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdBlackScholesVanillaEngine2"
fdBlackScholesVanillaEngineQuantoNoDividends'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> ((C2HSImp.Ptr (CFdmQuantoHelper)) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdBlackScholesVanillaEngine3"
fdBlackScholesVanillaEngineQuantoWithDividends'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CDividend))) -> ((C2HSImp.Ptr (CFdmQuantoHelper)) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdHestonVanillaEngine"
fdHestonVanillaEngineNoDividends'_ :: ((C2HSImp.Ptr (CHestonModel')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (CLocalVolTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdHestonVanillaEngine1"
fdHestonVanillaEngineWithDividends'_ :: ((C2HSImp.Ptr (CHestonModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CDividend))) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (CLocalVolTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlCOSHestonEngine"
cosHestonEngine'_ :: ((C2HSImp.Ptr (CHestonModel')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlAnalyticPDFHestonEngine"
analyticPdfHestonEngine'_ :: ((C2HSImp.Ptr (CHestonModel')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdBatesVanillaEngine"
fdBatesVanillaEngineNoDividends'_ :: ((C2HSImp.Ptr (CBatesModel')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdBatesVanillaEngine1"
fdBatesVanillaEngineWithDividends'_ :: ((C2HSImp.Ptr (CBatesModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CDividend))) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdBlackScholesShoutEngine"
fdBlackScholesShoutEngineNoDividends'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdBlackScholesShoutEngine1"
fdBlackScholesShoutEngineWithDividends'_ :: ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CDividend))) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdHestonVanillaEngine2"
fdHestonVanillaEngineQuantoNoDividends'_ :: ((C2HSImp.Ptr (CHestonModel')) -> ((C2HSImp.Ptr (CFdmQuantoHelper)) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (CLocalVolTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdHestonVanillaEngine3"
fdHestonVanillaEngineQuantoWithDividends'_ :: ((C2HSImp.Ptr (CHestonModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CDividend))) -> ((C2HSImp.Ptr (CFdmQuantoHelper)) -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (CLocalVolTermStructure')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdHestonHullWhiteVanillaEngine"
fdHestonHullWhiteVanillaEngineNoDividends'_ :: ((C2HSImp.Ptr (CHestonModel')) -> ((C2HSImp.Ptr (CHullWhiteProcess')) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlFdHestonHullWhiteVanillaEngine1"
fdHestonHullWhiteVanillaEngineWithDividends'_ :: ((C2HSImp.Ptr (CHestonModel')) -> ((C2HSImp.Ptr (CHullWhiteProcess')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CDividend))) -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CUInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CFdmSchemeDesc)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBinomialConvertibleEngine"
binomialConvertibleEngine'_ :: (C2HSImp.CInt -> ((C2HSImp.Ptr (CGeneralizedBlackScholesProcess')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CQuote')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CDividend))) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCallableFixedRateBondEngine1"
blackCallableFixedRateBondEngineFromVolatilityStructure'_ :: ((C2HSImp.Ptr (CCallableBondVolatilityStructure')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCallableFixedRateBondEngine"
blackCallableFixedRateBondEngine'_ :: ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCallableZeroCouponBondEngine1"
blackCallableZeroCouponBondEngineFromVolatilityStructure'_ :: ((C2HSImp.Ptr (CCallableBondVolatilityStructure')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCallableZeroCouponBondEngine"
blackCallableZeroCouponBondEngine'_ :: ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlTreeCallableFixedRateBondEngine1"
treeCallableFixedRateBondEngineTimeGrid'_ :: ((C2HSImp.Ptr (CShortRateModel')) -> ((C2HSImp.Ptr (CTimeGrid)) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlTreeCallableFixedRateBondEngine"
treeCallableFixedRateBondEngineTimeSteps'_ :: ((C2HSImp.Ptr (CShortRateModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlTreeCallableZeroCouponBondEngine1"
treeCallableZeroCouponBondEngineTimeGrid'_ :: ((C2HSImp.Ptr (CShortRateModel')) -> ((C2HSImp.Ptr (CTimeGrid)) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlTreeCallableZeroCouponBondEngine"
treeCallableZeroCouponBondEngineTimeSteps'_ :: ((C2HSImp.Ptr (CShortRateModel')) -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CPricingEngine)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorAlpha"
qlBlackCalculatorAlpha'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorBeta"
qlBlackCalculatorBeta'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculator1"
blackCalculatorAtStrikeRaw'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CBlackCalculator')))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculator"
blackCalculatorFromPayoffRaw'_ :: ((QlStrikedTypePayoff) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CBlackCalculator'))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorDelta"
qlBlackCalculatorDelta'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorDeltaForward"
qlBlackCalculatorDeltaForward'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorDividendRho"
qlBlackCalculatorDividendRho'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorElasticity"
qlBlackCalculatorElasticity'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorElasticityForward"
qlBlackCalculatorElasticityForward'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorGamma"
qlBlackCalculatorGamma'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorGammaForward"
qlBlackCalculatorGammaForward'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorItmAssetProbability"
qlBlackCalculatorItmAssetProbability'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorItmCashProbability"
qlBlackCalculatorItmCashProbability'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorRho"
qlBlackCalculatorRho'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorStrikeSensitivity"
qlBlackCalculatorStrikeSensitivity'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorStrikeGamma"
qlBlackCalculatorStrikeGamma'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorTheta"
qlBlackCalculatorTheta'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorThetaPerDay"
qlBlackCalculatorThetaPerDay'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorValue"
qlBlackCalculatorValue'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorVanna"
blackVanna'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorVega"
qlBlackCalculatorVega'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackCalculatorVolga"
qlBlackCalculatorVolga'_ :: ((C2HSImp.Ptr (CBlackCalculator')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackScholesCalculator1"
blackScholesCalculatorAtStrikeRaw'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CBlackScholesCalculator'))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackScholesCalculator"
blackScholesCalculatorFromPayoffRaw'_ :: ((QlStrikedTypePayoff) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CBlackScholesCalculator')))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackScholesCalculatorDelta"
blackScholesDelta'_ :: ((C2HSImp.Ptr (CBlackScholesCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackScholesCalculatorElasticity"
blackScholesElasticity'_ :: ((C2HSImp.Ptr (CBlackScholesCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackScholesCalculatorGamma"
blackScholesGamma'_ :: ((C2HSImp.Ptr (CBlackScholesCalculator')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackScholesCalculatorTheta"
blackScholesTheta'_ :: ((C2HSImp.Ptr (CBlackScholesCalculator')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackScholesCalculatorThetaPerDay"
blackScholesThetaPerDay'_ :: ((C2HSImp.Ptr (CBlackScholesCalculator')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculator1"
bachelierCalculatorAtStrikeRaw'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CBachelierCalculator)))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculator"
bachelierCalculatorFromPayoffRaw'_ :: ((QlStrikedTypePayoff) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CBachelierCalculator))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorAlpha"
qlBachelierCalculatorAlpha'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorBeta"
qlBachelierCalculatorBeta'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorDelta"
qlBachelierCalculatorDelta'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorDeltaForward"
qlBachelierCalculatorDeltaForward'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorDividendRho"
qlBachelierCalculatorDividendRho'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorElasticity"
qlBachelierCalculatorElasticity'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorElasticityForward"
qlBachelierCalculatorElasticityForward'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorGamma"
qlBachelierCalculatorGamma'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorGammaForward"
qlBachelierCalculatorGammaForward'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorItmAssetProbability"
qlBachelierCalculatorItmAssetProbability'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorItmCashProbability"
qlBachelierCalculatorItmCashProbability'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorRho"
qlBachelierCalculatorRho'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorStrikeSensitivity"
qlBachelierCalculatorStrikeSensitivity'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorStrikeGamma"
qlBachelierCalculatorStrikeGamma'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorTheta"
qlBachelierCalculatorTheta'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorThetaPerDay"
qlBachelierCalculatorThetaPerDay'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorValue"
qlBachelierCalculatorValue'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorVanna"
bachelierVanna'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorVega"
qlBachelierCalculatorVega'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBachelierCalculatorVolga"
qlBachelierCalculatorVolga'_ :: ((C2HSImp.Ptr (CBachelierCalculator)) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackDeltaCalculator"
blackDeltaCalculator'_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CBlackDeltaCalculator))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackDeltaCalculatorDeltaFromStrike"
deltaFromStrike'_ :: ((C2HSImp.Ptr (CBlackDeltaCalculator)) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackDeltaCalculatorStrikeFromDelta"
strikeFromDelta'_ :: ((C2HSImp.Ptr (CBlackDeltaCalculator)) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlBlackDeltaCalculatorAtmStrike"
atmStrike'_ :: ((C2HSImp.Ptr (CBlackDeltaCalculator)) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormula"
blackFormula'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormulaCashItmProbability"
blackCashItmProbability'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormulaImpliedStdDev"
blackImpliedStdDev'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormulaImpliedStdDevApproximation"
blackImpliedStdDevApproximation'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormulaStdDevDerivative"
blackStdDevDerivative'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormulaVolDerivative"
blackVolDerivative'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBachelierBlackFormula"
bachelierBlackFormula'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormulaForwardDerivative"
blackForwardDerivative'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormulaImpliedStdDevChambers"
blackImpliedStdDevChambers'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormulaImpliedStdDevApproximationRS"
blackImpliedStdDevApproximationRs'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormulaImpliedStdDevLiRS"
blackImpliedStdDevLiRs'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormulaAssetItmProbability"
blackAssetItmProbability'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBlackFormulaStdDevSecondDerivative"
blackStdDevSecondDerivative'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBachelierBlackFormulaForwardDerivative"
bachelierForwardDerivative'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBachelierBlackFormulaImpliedVol"
bachelierImpliedVol'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBachelierBlackFormulaImpliedVolChoi"
bachelierImpliedVolChoi'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBachelierBlackFormulaStdDevDerivative"
bachelierStdDevDerivative'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibBachelierBlackFormulaAssetItmProbability"
bachelierAssetItmProbability'_ :: (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlQuantLibDefaultThetaPerDay"
defaultThetaPerDay'_ :: (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlUnsafeSabrLogNormalVolatility"
unsafeSabrLogNormalVolatility'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlUnsafeShiftedSabrVolatility"
unsafeShiftedSabrVolatility'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlUnsafeSabrNormalVolatility"
unsafeSabrNormalVolatility'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlUnsafeSabrVolatility"
unsafeSabrVolatility'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlSabrVolatility"
sabrVolatility'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlShiftedSabrVolatility"
shiftedSabrVolatility'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlSabrFlochKennedyVolatility"
sabrFlochKennedyVolatility'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CDouble)))))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlValidateSabrParameters"
validateSabrParameters'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO ()))))))
foreign import ccall safe "QuantLib/PricingEngine.chs.h qlSabrGuess"
sabrGuess'_ :: (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CUInt) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CDouble)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO ())))))))))))))))