| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.CashFlow
Synopsis
- data GenCashFlow cf
- type CashFlow = GenCashFlow CCashFlow
- type GenCoupon c = GenCashFlow (AnyOf CCoupon' c)
- type Coupon = GenCoupon CCoupon
- type GenFloatingRateCoupon frc = GenCoupon (AnyOf CFloatingRateCoupon' frc)
- type FloatingRateCoupon = GenFloatingRateCoupon CFloatingRateCoupon
- type GenDigitalCoupon dc = GenFloatingRateCoupon (AnyOf CDigitalCoupon' dc)
- type DigitalCoupon = GenDigitalCoupon CDigitalCoupon
- type GenIndexedCashFlow icf = GenCashFlow (AnyOf CIndexedCashFlow' icf)
- type IndexedCashFlow = GenIndexedCashFlow CIndexedCashFlow
- type FixedRateCoupon = GenCoupon CFixedRateCoupon
- type IborCoupon = GenFloatingRateCoupon CIborCoupon
- type AverageBMACoupon = GenFloatingRateCoupon CAverageBMACoupon
- type StrippedCappedFlooredCoupon = GenFloatingRateCoupon CStrippedCappedFlooredCoupon
- type CmsCoupon = GenFloatingRateCoupon CCmsCoupon
- type DigitalCmsCoupon = GenDigitalCoupon CDigitalCmsCoupon
- type DigitalCmsSpreadCoupon = GenDigitalCoupon CDigitalCmsSpreadCoupon
- type MultipleResetsCoupon = GenFloatingRateCoupon CMultipleResetsCoupon
- type OvernightIndexedCoupon = GenFloatingRateCoupon COvernightIndexedCoupon
- type RangeAccrualFloatersCoupon = GenFloatingRateCoupon CRangeAccrualFloatersCoupon
- type CPICoupon = GenCoupon CCPICoupon
- type YoYInflationCoupon = GenCoupon CYoYInflationCoupon
- type ZeroInflationCashFlow = GenIndexedCashFlow CZeroInflationCashFlow
- type CPICashFlow = GenIndexedCashFlow CCPICashFlow
- type EquityCashFlow = GenIndexedCashFlow CEquityCashFlow
- data Dividend
- data GenLeg l
- type Leg = GenLeg CLeg
- type CouponLeg = GenLeg CCouponLeg
- data GenFloatingRateCouponPricer frcp
- type FloatingRateCouponPricer = GenFloatingRateCouponPricer CFloatingRateCouponPricer
- type CmsCouponPricer = GenFloatingRateCouponPricer CCmsCouponPricer
- data CPICouponPricer
- data YoYInflationCouponPricer
- data EquityCashFlowPricer
- data DurationType
- data RateAveragingType
- data TimingAdjustment
- data PositionType
- data CPIInterpolationType
- data YieldCurveModel
- data Discounting y
- data BpsDiscounting y
- data ReplicationType
- data DigitalReplication
- data LinearTsrPricerStrategy
- data LinearTsrPricerSettings = LinearTsrPricerSettings {}
- data IborLegOpts = IborLegOpts {}
- defaultIborLegOpts :: IborLegOpts
- data CmsLegOpts = CmsLegOpts {}
- defaultCmsLegOpts :: CmsLegOpts
- data DigitalIborLegOpts = DigitalIborLegOpts {}
- defaultDigitalIborLegOpts :: DigitalIborLegOpts
- data DigitalCmsLegOpts = DigitalCmsLegOpts {}
- defaultDigitalCmsLegOpts :: DigitalCmsLegOpts
- data DigitalCmsSpreadLegOpts = DigitalCmsSpreadLegOpts {}
- defaultDigitalCmsSpreadLegOpts :: DigitalCmsSpreadLegOpts
- data MultipleResetsLegOpts = MultipleResetsLegOpts {
- mrlNotionals :: NonEmpty Double
- mrlPaymentCalendar :: Maybe Calendar
- mrlPaymentLag :: Int
- mrlFixingDays :: [Word]
- mrlGearings :: [Double]
- mrlCouponSpreads :: [Double]
- mrlRateSpreads :: [Double]
- mrlExCouponPeriod :: (Int, TimeUnit)
- mrlExCouponCalendar :: Maybe Calendar
- mrlExCouponConvention :: BusinessDayConvention
- mrlExCouponEndOfMonth :: Bool
- mrlAveragingMethod :: RateAveragingType
- defaultMultipleResetsLegOpts :: MultipleResetsLegOpts
- asLeg :: GenLeg l -> IO Leg
- asCashFlow :: GenCashFlow cf -> IO CashFlow
- asCoupon :: GenCoupon c -> IO Coupon
- asFloatingRateCoupon :: GenFloatingRateCoupon frc -> IO FloatingRateCoupon
- asFloatingRateCouponPricer :: GenFloatingRateCouponPricer frcp -> IO FloatingRateCouponPricer
- toCouponLeg :: GenLeg l -> IO CouponLeg
- leg :: [(Day, Double)] -> IO Leg
- cashFlowLeg :: [GenCashFlow cf] -> IO Leg
- simpleCashFlow :: Double -> Day -> IO CashFlow
- indexedCashFlow :: Double -> GenIndex idx -> Day -> Day -> Day -> Bool -> IO IndexedCashFlow
- redemption :: Double -> Day -> IO CashFlow
- amortizingPayment :: Double -> Day -> IO CashFlow
- fixedRateCoupon :: Day -> Double -> Double -> DayCounter -> Day -> Day -> Maybe Day -> Maybe Day -> Maybe Day -> IO FixedRateCoupon
- floatingRateCoupon :: Day -> Double -> Day -> Day -> Word -> GenInterestRateIndex ridx -> Double -> Double -> Maybe Day -> Maybe Day -> DayCounter -> Bool -> Maybe Day -> BusinessDayConvention -> IO FloatingRateCoupon
- iborCoupon :: Day -> Double -> Day -> Day -> Word -> GenIborIndex ibor -> Double -> Double -> Maybe Day -> Maybe Day -> DayCounter -> Bool -> Maybe Day -> BusinessDayConvention -> IO IborCoupon
- averageBmaCoupon :: Day -> Double -> Day -> Day -> BMAIndex -> Double -> Double -> Maybe Day -> Maybe Day -> DayCounter -> IO AverageBMACoupon
- cappedFlooredCoupon :: GenFloatingRateCoupon frc -> Maybe Double -> Maybe Double -> IO FloatingRateCoupon
- strippedCappedFlooredCoupon :: GenFloatingRateCoupon frc -> Maybe Double -> Maybe Double -> IO StrippedCappedFlooredCoupon
- cappedFlooredIborCoupon :: Day -> Double -> Day -> Day -> Word -> GenIborIndex ibor -> Double -> Double -> Maybe Double -> Maybe Double -> Maybe Day -> Maybe Day -> DayCounter -> Bool -> Maybe Day -> BusinessDayConvention -> IO FloatingRateCoupon
- digitalIborCoupon :: IborCoupon -> Maybe Double -> PositionType -> Bool -> Maybe Double -> Maybe Double -> PositionType -> Bool -> Maybe Double -> Maybe DigitalReplication -> Bool -> IO DigitalCoupon
- digitalCoupon :: GenFloatingRateCoupon frc -> Maybe Double -> PositionType -> Bool -> Maybe Double -> Maybe Double -> PositionType -> Bool -> Maybe Double -> Maybe DigitalReplication -> Bool -> IO DigitalCoupon
- multipleResetsCoupon :: Day -> Double -> Schedule -> Word -> GenIborIndex ibor -> Double -> Double -> Double -> Maybe Day -> Maybe Day -> DayCounter -> Maybe Day -> IO MultipleResetsCoupon
- rangeAccrualFloatersCoupon :: Day -> Double -> GenIborIndex ibor -> Day -> Day -> Word -> DayCounter -> Double -> Double -> Maybe Day -> Maybe Day -> Schedule -> Double -> Double -> IO RangeAccrualFloatersCoupon
- overnightIndexedCoupon :: Day -> Double -> Day -> Day -> OvernightIborIndex -> Double -> Double -> Maybe Day -> Maybe Day -> DayCounter -> Bool -> RateAveragingType -> Word -> Word -> Bool -> Bool -> Maybe Day -> Maybe Day -> Maybe Day -> Maybe Int -> IO OvernightIndexedCoupon
- cappedFlooredOvernightIndexedCoupon :: OvernightIndexedCoupon -> Maybe Double -> Maybe Double -> Bool -> Bool -> IO FloatingRateCoupon
- cpiCoupon :: Double -> Day -> Double -> Day -> Day -> GenZeroInflationIndex zidx -> (Int, TimeUnit) -> CPIInterpolationType -> DayCounter -> Double -> Maybe Day -> Maybe Day -> Maybe Day -> IO CPICoupon
- cpiCouponFromBaseDate :: Day -> Day -> Double -> Day -> Day -> GenZeroInflationIndex zidx -> (Int, TimeUnit) -> CPIInterpolationType -> DayCounter -> Double -> Maybe Day -> Maybe Day -> Maybe Day -> IO CPICoupon
- cpiCouponWithBaseDate :: Double -> Day -> Day -> Double -> Day -> Day -> GenZeroInflationIndex zidx -> (Int, TimeUnit) -> CPIInterpolationType -> DayCounter -> Double -> Maybe Day -> Maybe Day -> Maybe Day -> IO CPICoupon
- yoyInflationCoupon :: Day -> Double -> Day -> Day -> Word -> YoYInflationIndex -> (Int, TimeUnit) -> CPIInterpolationType -> DayCounter -> Double -> Double -> Maybe Day -> Maybe Day -> IO YoYInflationCoupon
- zeroInflationCashFlow :: Double -> ZeroInflationIndex -> CPIInterpolationType -> Day -> Day -> (Word, TimeUnit) -> Day -> Bool -> IO ZeroInflationCashFlow
- cpiCashFlow :: Double -> ZeroInflationIndex -> Maybe Day -> Maybe Double -> Day -> (Word, TimeUnit) -> CPIInterpolationType -> Day -> Bool -> IO CPICashFlow
- equityCashFlow :: Double -> EquityIndex -> Day -> Day -> Day -> Bool -> IO EquityCashFlow
- cmsCoupon :: Day -> Double -> Day -> Day -> Word -> GenSwapIndex sidx -> Double -> Double -> Maybe Day -> Maybe Day -> DayCounter -> Bool -> Maybe Day -> BusinessDayConvention -> IO CmsCoupon
- cappedFlooredCmsCoupon :: Day -> Double -> Day -> Day -> Word -> GenSwapIndex sidx -> Double -> Double -> Maybe Double -> Maybe Double -> Maybe Day -> Maybe Day -> DayCounter -> Bool -> Maybe Day -> BusinessDayConvention -> IO FloatingRateCoupon
- cmsSpreadCoupon :: Day -> Double -> Day -> Day -> Word -> SwapSpreadIndex -> Double -> Double -> Maybe Day -> Maybe Day -> DayCounter -> Bool -> Maybe Day -> BusinessDayConvention -> IO FloatingRateCoupon
- cappedFlooredCmsSpreadCoupon :: Day -> Double -> Day -> Day -> Word -> SwapSpreadIndex -> Double -> Double -> Maybe Double -> Maybe Double -> Maybe Day -> Maybe Day -> DayCounter -> Bool -> Maybe Day -> BusinessDayConvention -> IO FloatingRateCoupon
- digitalReplication :: ReplicationType -> Double -> IO DigitalReplication
- digitalCmsCoupon :: CmsCoupon -> Maybe Double -> PositionType -> Bool -> Maybe Double -> Maybe Double -> PositionType -> Bool -> Maybe Double -> Maybe DigitalReplication -> Bool -> IO DigitalCmsCoupon
- digitalCmsSpreadCoupon :: Day -> Double -> Day -> Day -> Word -> SwapSpreadIndex -> Double -> Double -> Maybe Day -> Maybe Day -> DayCounter -> Bool -> Maybe Day -> BusinessDayConvention -> Maybe Double -> PositionType -> Bool -> Maybe Double -> Maybe Double -> PositionType -> Bool -> Maybe Double -> Maybe DigitalReplication -> Bool -> IO DigitalCmsSpreadCoupon
- fixedDividend :: Double -> Day -> IO Dividend
- fractionalDividendWithNominal :: Double -> Double -> Day -> IO Dividend
- fractionalDividend :: Double -> Day -> IO Dividend
- fixedRateLeg :: Schedule -> NonEmpty Double -> NonEmpty InterestRate -> BusinessDayConvention -> DayCounter -> Calendar -> IO Leg
- averageBmaLeg :: Schedule -> BMAIndex -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Double] -> [Double] -> IO Leg
- iborLeg :: Schedule -> GenIborIndex ibor -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> [Double] -> [Double] -> Bool -> Bool -> IO Leg
- iborLegWithOptions :: Schedule -> GenIborIndex ibor -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> [Double] -> [Double] -> Bool -> Bool -> IborLegOpts -> IO Leg
- digitalIborLeg :: Schedule -> GenIborIndex ibor -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> Bool -> DigitalIborLegOpts -> IO Leg
- cmsLeg :: Schedule -> GenSwapIndex sidx -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> [Double] -> [Double] -> Bool -> Bool -> IO Leg
- cmsLegWithOptions :: Schedule -> GenSwapIndex sidx -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> [Double] -> [Double] -> Bool -> Bool -> CmsLegOpts -> IO Leg
- cmsSpreadLeg :: Schedule -> SwapSpreadIndex -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> [Double] -> [Double] -> Bool -> Bool -> IO Leg
- digitalCmsLeg :: Schedule -> GenSwapIndex sidx -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> Bool -> DigitalCmsLegOpts -> IO Leg
- digitalCmsSpreadLeg :: Schedule -> SwapSpreadIndex -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> Bool -> DigitalCmsSpreadLegOpts -> IO Leg
- multipleResetsLeg :: Schedule -> GenIborIndex ibor -> Word -> DayCounter -> BusinessDayConvention -> MultipleResetsLegOpts -> IO Leg
- overnightLeg :: Schedule -> OvernightIborIndex -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Double] -> [Double] -> IO Leg
- rangeAccrualLeg :: Schedule -> GenIborIndex ibor -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> [Double] -> [Double] -> (Int, TimeUnit) -> BusinessDayConvention -> IO Leg
- cpiLeg :: Schedule -> ZeroInflationIndex -> Double -> (Word, TimeUnit) -> NonEmpty Double -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> Calendar -> CPIInterpolationType -> Bool -> IO Leg
- yoyInflationLeg :: Schedule -> Calendar -> YoYInflationIndex -> (Word, TimeUnit) -> CPIInterpolationType -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> [Double] -> [Double] -> IO Leg
- blackIborCouponPricer :: GenOptionletVolatilityStructure ov -> TimingAdjustment -> Maybe (GenQuote q) -> Maybe Bool -> IO FloatingRateCouponPricer
- blackIborQuantoCouponPricer :: GenBlackVolTermStructure bv -> GenQuote q -> GenOptionletVolatilityStructure ov -> IO FloatingRateCouponPricer
- analyticHaganPricer :: GenSwaptionVolatilityStructure sv -> YieldCurveModel -> GenQuote q -> IO CmsCouponPricer
- numericHaganPricer :: GenSwaptionVolatilityStructure sv -> YieldCurveModel -> GenQuote q -> Double -> Double -> Double -> Double -> IO CmsCouponPricer
- linearTsrPricer :: GenSwaptionVolatilityStructure sv -> GenQuote q -> Maybe (GenYieldTermStructure y) -> LinearTsrPricerSettings -> IO CmsCouponPricer
- lognormalCmsSpreadPricer :: CmsCouponPricer -> GenQuote q -> Maybe (GenYieldTermStructure y) -> Word -> Maybe VolatilityType -> Maybe Double -> Maybe Double -> IO FloatingRateCouponPricer
- rangeAccrualPricerByBgm :: Double -> SmileSection -> SmileSection -> Bool -> Bool -> IO FloatingRateCouponPricer
- averagingMultipleResetsPricer :: IO FloatingRateCouponPricer
- compoundingMultipleResetsPricer :: IO FloatingRateCouponPricer
- compoundingOvernightIndexedCouponPricer :: Maybe OptionletVolatilityStructure -> Bool -> IO FloatingRateCouponPricer
- arithmeticAveragedOvernightIndexedCouponPricer :: Double -> Double -> Bool -> Maybe OptionletVolatilityStructure -> Bool -> IO FloatingRateCouponPricer
- blackCompoundingOvernightIndexedCouponPricer :: Maybe OptionletVolatilityStructure -> Bool -> IO FloatingRateCouponPricer
- blackAveragingOvernightIndexedCouponPricer :: Maybe OptionletVolatilityStructure -> Bool -> IO FloatingRateCouponPricer
- cpiCouponPricer :: Maybe YieldTermStructure -> IO CPICouponPricer
- cpiCouponPricerWithVol :: CPIVolatilitySurface -> Maybe YieldTermStructure -> IO CPICouponPricer
- blackYoyInflationCouponPricer :: YoYOptionletVolatilitySurface -> GenYieldTermStructure y -> IO YoYInflationCouponPricer
- unitDisplacedBlackYoyInflationCouponPricer :: YoYOptionletVolatilitySurface -> GenYieldTermStructure y -> IO YoYInflationCouponPricer
- bachelierYoyInflationCouponPricer :: YoYOptionletVolatilitySurface -> GenYieldTermStructure y -> IO YoYInflationCouponPricer
- equityQuantoCashFlowPricer :: GenYieldTermStructure y -> GenBlackVolTermStructure bv1 -> GenBlackVolTermStructure bv2 -> GenQuote q -> IO EquityCashFlowPricer
- setCpiCouponPricer :: CPICoupon -> CPICouponPricer -> IO ()
- setFloatingRateCouponPricer :: GenFloatingRateCoupon frc -> GenFloatingRateCouponPricer frcp -> IO ()
- setYoyInflationCouponPricer :: GenLeg l -> YoYInflationCouponPricer -> IO ()
- setEquityCashFlowPricer :: EquityCashFlow -> EquityCashFlowPricer -> IO ()
- setCouponPricer :: GenLeg l -> GenFloatingRateCouponPricer frcp -> IO ()
- setCouponPricers :: GenLeg l -> [GenFloatingRateCouponPricer frcp] -> IO ()
- setEquityLegPricer :: GenLeg l -> EquityCashFlowPricer -> IO ()
- class HasFixingDates coupon where
- fixingDates :: coupon -> IO [Day]
- fixingDependencies :: GenLeg l -> IO [(String, Day)]
- class HasIndexFixings coupon where
- indexFixings :: coupon -> IO [Double]
- baseFixing :: GenIndexedCashFlow icf -> IO Double
- indexFixing :: GenIndexedCashFlow icf -> IO Double
- adjustedFixing :: YoYInflationCoupon -> IO Double
- amount :: GenCashFlow cf -> IO Double
- date :: GenCashFlow cf -> Day
- duration :: GenLeg l -> InterestRate -> DurationType -> Bool -> Maybe Day -> Maybe Day -> IO Double
- accrualDays :: GenLeg l -> Bool -> Maybe Day -> IO Int
- accrualEndDate :: GenLeg l -> Bool -> Maybe Day -> IO (Maybe Day)
- accrualPeriod :: GenLeg l -> Bool -> Maybe Day -> IO Double
- accrualStartDate :: GenLeg l -> Bool -> Maybe Day -> IO (Maybe Day)
- accruedAmount :: GenLeg l -> Bool -> Maybe Day -> IO Double
- accruedDays :: GenLeg l -> Bool -> Maybe Day -> IO Int
- accruedPeriod :: GenLeg l -> Bool -> Maybe Day -> IO Double
- atmRate :: GenLeg l -> GenYieldTermStructure y -> Bool -> Maybe Day -> Maybe Day -> Double -> IO Double
- basisPointValue :: GenLeg l -> InterestRate -> Bool -> Maybe Day -> Maybe Day -> IO Double
- bps :: GenLeg l -> BpsDiscounting y -> Bool -> Maybe Day -> Maybe Day -> IO Double
- convexity :: GenLeg l -> InterestRate -> Bool -> Maybe Day -> Maybe Day -> IO Double
- isExpired :: GenLeg l -> Bool -> Maybe Day -> IO Bool
- maturityDate :: GenLeg l -> IO Day
- startDate :: GenLeg l -> IO Day
- cashFlows :: GenLeg l -> Maybe Bool -> Maybe Day -> IO [(Day, Double, Bool)]
- nextCashFlows :: GenLeg l -> Bool -> Maybe Day -> IO Leg
- nextCashFlowAmount :: GenLeg l -> Bool -> Maybe Day -> IO Double
- nextCashFlowDate :: GenLeg l -> Bool -> Maybe Day -> IO (Maybe Day)
- nextCouponRate :: GenLeg l -> Bool -> Maybe Day -> IO Double
- previousCashFlows :: GenLeg l -> Bool -> Maybe Day -> IO Leg
- previousCashFlowAmount :: GenLeg l -> Bool -> Maybe Day -> IO Double
- previousCashFlowDate :: GenLeg l -> Bool -> Maybe Day -> IO (Maybe Day)
- previousCouponRate :: GenLeg l -> Bool -> Maybe Day -> IO Double
- nominal :: GenLeg l -> Bool -> Maybe Day -> IO Double
- npv :: GenLeg l -> Discounting y -> Bool -> Maybe Day -> Maybe Day -> IO Double
- npvBps :: GenLeg l -> GenYieldTermStructure y -> Bool -> Day -> Day -> IO (Double, Double)
- referencePeriodEnd :: GenLeg l -> Bool -> Maybe Day -> IO (Maybe Day)
- referencePeriodStart :: GenLeg l -> Bool -> Maybe Day -> IO (Maybe Day)
- yield :: GenLeg l -> Double -> DayCounter -> Compounding -> Frequency -> Bool -> Maybe Day -> Maybe Day -> Double -> Word -> Double -> IO Double
- yieldValueBasisPoint :: GenLeg l -> InterestRate -> Bool -> Maybe Day -> Maybe Day -> IO Double
- zSpread :: GenLeg l -> Double -> GenYieldTermStructure y -> Compounding -> Frequency -> Bool -> Maybe Day -> Maybe Day -> Double -> Word -> Double -> IO Double
- coupons :: CouponLeg -> IO [Coupon]
- couponAccrualStartDates :: CouponLeg -> IO [Day]
- couponAccruedAmount :: GenCoupon c -> Day -> IO Double
- rate :: GenCoupon c -> IO Double
- price :: GenFloatingRateCoupon frc -> Maybe (GenYieldTermStructure y) -> IO Double
- interestRate :: FixedRateCoupon -> IO InterestRate
- indexRatio :: CPICoupon -> Day -> IO Double
- convexityAdjustment :: GenFloatingRateCoupon frc -> IO Double
- swapletRate :: GenFloatingRateCouponPricer frcp -> IO Double
- swapletPrice :: GenFloatingRateCouponPricer frcp -> IO Double
- capletPrice :: GenFloatingRateCouponPricer frcp -> Double -> IO Double
- capletRate :: GenFloatingRateCouponPricer frcp -> Double -> IO Double
- floorletPrice :: GenFloatingRateCouponPricer frcp -> Double -> IO Double
- floorletRate :: GenFloatingRateCouponPricer frcp -> Double -> IO Double
- replicationType :: DigitalReplication -> ReplicationType
- gap :: DigitalReplication -> Double
- capRate :: StrippedCappedFlooredCoupon -> Double
- floorRate :: StrippedCappedFlooredCoupon -> Double
- effectiveCap :: StrippedCappedFlooredCoupon -> Double
- effectiveFloor :: StrippedCappedFlooredCoupon -> Double
- isCap :: StrippedCappedFlooredCoupon -> Bool
- isFloor :: StrippedCappedFlooredCoupon -> Bool
- isCollar :: StrippedCappedFlooredCoupon -> Bool
- callOptionRate :: GenDigitalCoupon dc -> IO Double
- putOptionRate :: GenDigitalCoupon dc -> IO Double
- priceWithoutOptionality :: RangeAccrualFloatersCoupon -> GenYieldTermStructure y -> IO Double
Types
Cash-flow hierarchy
data GenCashFlow cf Source #
CashFlow
Coupon
FixedRateCoupon
FloatingRateCoupon
AverageBMACoupon
CmsCoupon
DigitalCoupon
DigitalCmsCoupon
DigitalCmsSpreadCoupon
IborCoupon
MultipleResetsCoupon
OvernightIndexedCoupon
RangeAccrualFloatersCoupon
StrippedCappedFlooredCoupon
CPICoupon
YoYInflationCoupon
IndexedCashFlow
CPICashFlow
EquityCashFlow
ZeroInflationCashFlow
CommodityCashFlowInstances
| HasFixingDates AverageBMACoupon Source # | |
Defined in QuantLib.CashFlow Methods fixingDates :: AverageBMACoupon -> IO [Day] Source # | |
| HasFixingDates MultipleResetsCoupon Source # | |
Defined in QuantLib.CashFlow Methods fixingDates :: MultipleResetsCoupon -> IO [Day] Source # | |
| HasFixingDates OvernightIndexedCoupon Source # | |
Defined in QuantLib.CashFlow Methods fixingDates :: OvernightIndexedCoupon -> IO [Day] Source # | |
| HasIndexFixings AverageBMACoupon Source # | |
Defined in QuantLib.CashFlow Methods indexFixings :: AverageBMACoupon -> IO [Double] Source # | |
| HasIndexFixings OvernightIndexedCoupon Source # | |
Defined in QuantLib.CashFlow Methods indexFixings :: OvernightIndexedCoupon -> IO [Double] Source # | |
type CashFlow = GenCashFlow CCashFlow Source #
The root of the hierarchy shown under GenCashFlow.
type GenCoupon c = GenCashFlow (AnyOf CCoupon' c) Source #
Shared base of every accruing cash flow: a nominal, an accrual period, and a rate.
See the hierarchy under GenCashFlow.
type GenFloatingRateCoupon frc = GenCoupon (AnyOf CFloatingRateCoupon' frc) Source #
A FloatingRateCoupon or one of its leaves; see the hierarchy under GenCashFlow.
type FloatingRateCoupon = GenFloatingRateCoupon CFloatingRateCoupon Source #
A Coupon; see the hierarchy under GenCashFlow.
type GenDigitalCoupon dc = GenFloatingRateCoupon (AnyOf CDigitalCoupon' dc) Source #
A DigitalCoupon or one of its leaves; see the hierarchy under GenCashFlow.
type DigitalCoupon = GenDigitalCoupon CDigitalCoupon Source #
A FloatingRateCoupon; see the hierarchy under GenCashFlow.
type GenIndexedCashFlow icf = GenCashFlow (AnyOf CIndexedCashFlow' icf) Source #
An IndexedCashFlow or one of its leaves; see the hierarchy under GenCashFlow.
type IndexedCashFlow = GenIndexedCashFlow CIndexedCashFlow Source #
A CashFlow; see the hierarchy under GenCashFlow.
type FixedRateCoupon = GenCoupon CFixedRateCoupon Source #
A Coupon; see the hierarchy under GenCashFlow.
type IborCoupon = GenFloatingRateCoupon CIborCoupon Source #
A FloatingRateCoupon; see the hierarchy under GenCashFlow.
type AverageBMACoupon = GenFloatingRateCoupon CAverageBMACoupon Source #
A FloatingRateCoupon; see the hierarchy under GenCashFlow.
type StrippedCappedFlooredCoupon = GenFloatingRateCoupon CStrippedCappedFlooredCoupon Source #
A FloatingRateCoupon; see the hierarchy under GenCashFlow.
type CmsCoupon = GenFloatingRateCoupon CCmsCoupon Source #
A FloatingRateCoupon; see the hierarchy under GenCashFlow.
type DigitalCmsCoupon = GenDigitalCoupon CDigitalCmsCoupon Source #
A DigitalCoupon; see the hierarchy under GenCashFlow.
type DigitalCmsSpreadCoupon = GenDigitalCoupon CDigitalCmsSpreadCoupon Source #
A DigitalCoupon; see the hierarchy under GenCashFlow.
type MultipleResetsCoupon = GenFloatingRateCoupon CMultipleResetsCoupon Source #
A FloatingRateCoupon; see the hierarchy under GenCashFlow.
type OvernightIndexedCoupon = GenFloatingRateCoupon COvernightIndexedCoupon Source #
A FloatingRateCoupon; see the hierarchy under GenCashFlow.
type RangeAccrualFloatersCoupon = GenFloatingRateCoupon CRangeAccrualFloatersCoupon Source #
A FloatingRateCoupon; see the hierarchy under GenCashFlow.
type YoYInflationCoupon = GenCoupon CYoYInflationCoupon Source #
A Coupon; see the hierarchy under GenCashFlow.
type ZeroInflationCashFlow = GenIndexedCashFlow CZeroInflationCashFlow Source #
An IndexedCashFlow; see the hierarchy under GenCashFlow.
type CPICashFlow = GenIndexedCashFlow CCPICashFlow Source #
An IndexedCashFlow; see the hierarchy under GenCashFlow.
type EquityCashFlow = GenIndexedCashFlow CEquityCashFlow Source #
An IndexedCashFlow; see the hierarchy under GenCashFlow.
Legs
Coupon pricers
data GenFloatingRateCouponPricer frcp Source #
FloatingRateCouponPricer CmsCouponPricer
type FloatingRateCouponPricer = GenFloatingRateCouponPricer CFloatingRateCouponPricer Source #
The root of the hierarchy shown under GenFloatingRateCouponPricer.
type CmsCouponPricer = GenFloatingRateCouponPricer CCmsCouponPricer Source #
A FloatingRateCouponPricer; see the hierarchy under GenFloatingRateCouponPricer.
data CPICouponPricer Source #
data YoYInflationCouponPricer Source #
Pricer for capped/floored yoyInflationLeg coupons. All 3 concrete
upstream pricers (Black/UnitDisplacedBlack/Bachelier) share one ctor shape and are bound as
constructors of this single type, mirroring FloatingRateCouponPricer/EquityCashFlowPricer
(a standalone pricer type, not part of any GenX hierarchy).
data EquityCashFlowPricer Source #
Configuration
data DurationType Source #
Instances
| Enum DurationType Source # | |
Defined in QuantLib.CashFlow Methods succ :: DurationType -> DurationType # pred :: DurationType -> DurationType # toEnum :: Int -> DurationType # fromEnum :: DurationType -> Int # enumFrom :: DurationType -> [DurationType] # enumFromThen :: DurationType -> DurationType -> [DurationType] # enumFromTo :: DurationType -> DurationType -> [DurationType] # enumFromThenTo :: DurationType -> DurationType -> DurationType -> [DurationType] # | |
| Read DurationType Source # | |
Defined in QuantLib.CashFlow Methods readsPrec :: Int -> ReadS DurationType # readList :: ReadS [DurationType] # | |
| Show DurationType Source # | |
Defined in QuantLib.CashFlow Methods showsPrec :: Int -> DurationType -> ShowS # show :: DurationType -> String # showList :: [DurationType] -> ShowS # | |
| Eq DurationType Source # | |
Defined in QuantLib.CashFlow | |
data RateAveragingType Source #
Constructors
| AveragingSimple | |
| AveragingCompound |
Instances
data TimingAdjustment Source #
Constructors
| Black76 | |
| BivariateLognormal |
Instances
data PositionType Source #
Instances
| Enum PositionType Source # | |
Defined in QuantLib.Internal.Common Methods succ :: PositionType -> PositionType # pred :: PositionType -> PositionType # toEnum :: Int -> PositionType # fromEnum :: PositionType -> Int # enumFrom :: PositionType -> [PositionType] # enumFromThen :: PositionType -> PositionType -> [PositionType] # enumFromTo :: PositionType -> PositionType -> [PositionType] # enumFromThenTo :: PositionType -> PositionType -> PositionType -> [PositionType] # | |
| Read PositionType Source # | |
Defined in QuantLib.Internal.Common Methods readsPrec :: Int -> ReadS PositionType # readList :: ReadS [PositionType] # | |
| Show PositionType Source # | |
Defined in QuantLib.Internal.Common Methods showsPrec :: Int -> PositionType -> ShowS # show :: PositionType -> String # showList :: [PositionType] -> ShowS # | |
| Eq PositionType Source # | |
Defined in QuantLib.Internal.Common | |
data CPIInterpolationType Source #
Instances
data YieldCurveModel Source #
Constructors
| Standard | |
| ExactYield | |
| ParallelShifts | |
| NonParallelShifts |
Instances
data Discounting y Source #
Where discount factors come from.
Constructors
| DiscountingCurve !(GenYieldTermStructure y) | |
| DiscountingZSpread !(GenYieldTermStructure y) !Double !Compounding !Frequency | curve, zSpread, compounding, frequency |
| DiscountingYield !InterestRate |
data BpsDiscounting y Source #
Discounting restricted to the cases bps supports: upstream has no Z-spreaded bps.
Constructors
| BpsDiscountingCurve !(GenYieldTermStructure y) | |
| BpsDiscountingYield !InterestRate |
data ReplicationType Source #
Constructors
| ReplicationSub | |
| ReplicationCentral | |
| ReplicationSuper |
Instances
data DigitalReplication Source #
data LinearTsrPricerStrategy Source #
The strategy LinearTsrPricer uses to pick the integration cut-off strike bounds; each
carries the strategy-specific parameter upstream's corresponding Settings::withX takes
(LinearTsrRateBound has none). Pass explicit bounds via LinearTsrPricerSettings'
ltsrBounds rather than baking upstream's own default bounds in here, since upstream's
no-explicit-bounds overloads aren't just sugar for those same numbers -- they also flip
Settings::defaultBounds_, which under a normal-vol swaption surface adjusts the lower
bound to min(-upperBound, lowerBound) (see qlcashflowslineartsrpricer.cpp). Passing
Nothing reaches that adjustment; passing explicit bounds via Just does not.
Constructors
| LinearTsrRateBound | |
| LinearTsrVegaRatio Double | vegaRatio |
| LinearTsrPriceThreshold Double | priceThreshold |
| LinearTsrBSStdDevs Double | stdDevs |
Instances
| Show LinearTsrPricerStrategy Source # | |
Defined in QuantLib.CashFlow Methods showsPrec :: Int -> LinearTsrPricerStrategy -> ShowS # show :: LinearTsrPricerStrategy -> String # showList :: [LinearTsrPricerStrategy] -> ShowS # | |
| Eq LinearTsrPricerStrategy Source # | |
Defined in QuantLib.CashFlow Methods (==) :: LinearTsrPricerStrategy -> LinearTsrPricerStrategy -> Bool # (/=) :: LinearTsrPricerStrategy -> LinearTsrPricerStrategy -> Bool # | |
data LinearTsrPricerSettings Source #
ltsrBounds of Nothing uses upstream's own default lower/upper rate bounds (and, for a
normal-vol surface, its default-bounds strike adjustment -- see LinearTsrPricerStrategy);
pins explicit bounds instead.Just (lower, upper)
Constructors
| LinearTsrPricerSettings | |
Fields | |
Instances
| Show LinearTsrPricerSettings Source # | |
Defined in QuantLib.CashFlow Methods showsPrec :: Int -> LinearTsrPricerSettings -> ShowS # show :: LinearTsrPricerSettings -> String # showList :: [LinearTsrPricerSettings] -> ShowS # | |
| Eq LinearTsrPricerSettings Source # | |
Defined in QuantLib.CashFlow Methods (==) :: LinearTsrPricerSettings -> LinearTsrPricerSettings -> Bool # (/=) :: LinearTsrPricerSettings -> LinearTsrPricerSettings -> Bool # | |
data IborLegOpts Source #
Constructors
| IborLegOpts | |
data CmsLegOpts Source #
Constructors
| CmsLegOpts | |
data DigitalIborLegOpts Source #
Constructors
| DigitalIborLegOpts | |
Fields
| |
data DigitalCmsLegOpts Source #
Constructors
| DigitalCmsLegOpts | |
Fields
| |
data DigitalCmsSpreadLegOpts Source #
Constructors
| DigitalCmsSpreadLegOpts | |
Fields | |
data MultipleResetsLegOpts Source #
Constructors
Constructors
Hierarchy conversion
asCashFlow :: GenCashFlow cf -> IO CashFlow Source #
asFloatingRateCouponPricer :: GenFloatingRateCouponPricer frcp -> IO FloatingRateCouponPricer Source #
Cash flows and coupons
Arguments
| :: [GenCashFlow cf] | cashFlows |
| -> IO Leg |
A predetermined payment, suitable for mixing with other cash-flow kinds in
cashFlowLeg. For a leg made entirely of such payments, leg is a more concise API.
Arguments
| :: Double | notional |
| -> GenIndex idx | index |
| -> Day | base date |
| -> Day | fixing date |
| -> Day | payment date |
| -> Bool | growthOnly |
| -> IO IndexedCashFlow |
A payment of notional * i(fixingDate) / i(baseDate), or the same ratio minus one when
growthOnly is true. QuantLib does no date adjustment here; callers supply the already
adjusted fixing and payment dates. This is the generic building block behind the specialized
CPI and equity cash flows, and accepts any bound GenIndex.
An amortizing principal payment.
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Double | rate |
| -> DayCounter | dayCounter |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> Maybe Day | exCouponDate |
| -> IO FixedRateCoupon |
A fixed coupon with explicitly supplied payment, accrual, reference-period, and ex-coupon
dates. Nothing for a reference or ex-coupon date passes QuantLib's empty Date(). A
homogeneous list of fixed coupons can be passed directly to cashFlowLeg; use asCashFlow
only when mixing it with other cash-flow types.
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> Word | fixingDays |
| -> GenInterestRateIndex ridx | index |
| -> Double | gearing |
| -> Double | spread |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> DayCounter | dayCounter |
| -> Bool | inArrears |
| -> Maybe Day | exCouponDate |
| -> BusinessDayConvention | fixingConvention |
| -> IO FloatingRateCoupon |
A generic floating-rate coupon. Attach a FloatingRateCouponPricer to the resulting leg
with setCouponPricer before evaluating a coupon whose rate requires one. Nothing dates
pass QuantLib's empty Date(); all other constructor parameters are explicit.
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> Word | fixingDays |
| -> GenIborIndex ibor | index |
| -> Double | gearing |
| -> Double | spread |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> DayCounter | dayCounter |
| -> Bool | inArrears |
| -> Maybe Day | exCouponDate |
| -> BusinessDayConvention | fixingConvention |
| -> IO IborCoupon |
An Ibor-specific floating coupon. Prefer this to floatingRateCoupon when the index is
Ibor: QuantLib then uses IborCoupon's fixing value/maturity-date logic rather than the base
floating-coupon implementation. Date and pricer handling are as in floatingRateCoupon.
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> BMAIndex | index |
| -> Double | gearing |
| -> Double | spread |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> DayCounter | dayCounter |
| -> IO AverageBMACoupon |
A BMA-index coupon with explicitly supplied accrual and reference dates.
Arguments
| :: GenFloatingRateCoupon frc | underlying |
| -> Maybe Double | cap |
| -> Maybe Double | floor |
| -> IO FloatingRateCoupon |
Wrap a floating-rate coupon with optional cap and floor rates.
strippedCappedFlooredCoupon Source #
Arguments
| :: GenFloatingRateCoupon frc | underlying |
| -> Maybe Double | cap |
| -> Maybe Double | floor |
| -> IO StrippedCappedFlooredCoupon |
Strip the embedded cap/floor option out of a capped/floored coupon: builds a
CappedFlooredCoupon from underlying, cap and floor (as cappedFlooredCoupon
does), then wraps it so the option's rate, cap and floor are separately readable.
cappedFlooredIborCoupon Source #
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> Word | fixingDays |
| -> GenIborIndex ibor | index |
| -> Double | gearing |
| -> Double | spread |
| -> Maybe Double | cap |
| -> Maybe Double | floor |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> DayCounter | dayCounter |
| -> Bool | inArrears |
| -> Maybe Day | exCouponDate |
| -> BusinessDayConvention | fixingConvention |
| -> IO FloatingRateCoupon |
Ibor coupon with optional cap and floor rates.
Arguments
| :: IborCoupon | underlying |
| -> Maybe Double | callStrike |
| -> PositionType | callPosition |
| -> Bool | callATM |
| -> Maybe Double | callDigitalPayoff |
| -> Maybe Double | putStrike |
| -> PositionType | putPosition |
| -> Bool | putATM |
| -> Maybe Double | putDigitalPayoff |
| -> Maybe DigitalReplication | replication |
| -> Bool | nakedOption |
| -> IO DigitalCoupon |
Ibor coupon with embedded digital call and put options.
Arguments
| :: GenFloatingRateCoupon frc | underlying |
| -> Maybe Double | |
| -> PositionType | |
| -> Bool | |
| -> Maybe Double | |
| -> Maybe Double | |
| -> PositionType | |
| -> Bool | |
| -> Maybe Double | |
| -> Maybe DigitalReplication | |
| -> Bool | |
| -> IO DigitalCoupon |
A floating coupon with replicated digital call and put payoffs. Optional
strikes/payoffs use Nothing for QuantLib's null-rate sentinel.
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Schedule | fixingSchedule |
| -> Word | fixingDays |
| -> GenIborIndex ibor | index |
| -> Double | gearing |
| -> Double | couponSpread |
| -> Double | rateSpread |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> DayCounter | dayCounter |
| -> Maybe Day | exCouponDate |
| -> IO MultipleResetsCoupon |
Ibor coupon whose rate averages multiple reset dates in each accrual period.
rangeAccrualFloatersCoupon :: Day -> Double -> GenIborIndex ibor -> Day -> Day -> Word -> DayCounter -> Double -> Double -> Maybe Day -> Maybe Day -> Schedule -> Double -> Double -> IO RangeAccrualFloatersCoupon Source #
A range-accrual coupon. Attach the existing range-accrual pricer before
asking for its rate; priceWithoutOptionality
needs only a discount curve.
overnightIndexedCoupon Source #
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> OvernightIborIndex | index |
| -> Double | gearing |
| -> Double | spread |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> DayCounter | dayCounter |
| -> Bool | telescopicValueDates |
| -> RateAveragingType | averagingMethod |
| -> Word | lookbackDays |
| -> Word | lockoutDays |
| -> Bool | applyObservationShift |
| -> Bool | includeSpread |
| -> Maybe Day | rateComputationStartDate |
| -> Maybe Day | rateComputationEndDate |
| -> Maybe Day | exCouponDate |
| -> Maybe Int | rounding |
| -> IO OvernightIndexedCoupon |
Overnight-index coupon with explicit observation and accrual conventions.
cappedFlooredOvernightIndexedCoupon Source #
Arguments
| :: OvernightIndexedCoupon | underlying |
| -> Maybe Double | cap |
| -> Maybe Double | floor |
| -> Bool | nakedOption |
| -> Bool | includeSpread |
| -> IO FloatingRateCoupon |
Capped/floored overnight-index coupon.
Arguments
| :: Double | baseCPI |
| -> Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> GenZeroInflationIndex zidx | index |
| -> (Int, TimeUnit) | observationLag |
| -> CPIInterpolationType | observationInterpolation |
| -> DayCounter | dayCounter |
| -> Double | fixedRate |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> Maybe Day | exCouponDate |
| -> IO CPICoupon |
CPI-linked coupon whose base fixing is supplied directly.
cpiCouponFromBaseDate Source #
Arguments
| :: Day | baseDate |
| -> Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> GenZeroInflationIndex zidx | index |
| -> (Int, TimeUnit) | observationLag |
| -> CPIInterpolationType | observationInterpolation |
| -> DayCounter | dayCounter |
| -> Double | fixedRate |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> Maybe Day | exCouponDate |
| -> IO CPICoupon |
CPI-linked coupon whose base fixing is determined by a base date.
cpiCouponWithBaseDate Source #
Arguments
| :: Double | baseCPI |
| -> Day | baseDate |
| -> Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> GenZeroInflationIndex zidx | index |
| -> (Int, TimeUnit) | observationLag |
| -> CPIInterpolationType | observationInterpolation |
| -> DayCounter | dayCounter |
| -> Double | fixedRate |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> Maybe Day | exCouponDate |
| -> IO CPICoupon |
CPI-linked coupon with both an explicit base CPI and base date.
yoyInflationCoupon :: Day -> Double -> Day -> Day -> Word -> YoYInflationIndex -> (Int, TimeUnit) -> CPIInterpolationType -> DayCounter -> Double -> Double -> Maybe Day -> Maybe Day -> IO YoYInflationCoupon Source #
A year-on-year inflation coupon. As for yoyInflationLeg, attach a
YoY inflation coupon pricer before evaluating the coupon rate.
zeroInflationCashFlow Source #
Arguments
| :: Double | notional |
| -> ZeroInflationIndex | |
| -> CPIInterpolationType | observationInterpolation |
| -> Day | startDate |
| -> Day | endDate |
| -> (Word, TimeUnit) | observationLag |
| -> Day | paymentDate |
| -> Bool | growthOnly |
| -> IO ZeroInflationCashFlow |
Cash flow dependent on a ZeroInflationIndex ratio (not a coupon -- no accruals).
The ratio is taken between fixings observed at startDate and endDate minus observationLag.
Arguments
| :: Double | notional |
| -> ZeroInflationIndex | |
| -> Maybe Day | baseDate |
| -> Maybe Double | baseFixing |
| -> Day | observationDate |
| -> (Word, TimeUnit) | observationLag |
| -> CPIInterpolationType | interpolation |
| -> Day | paymentDate |
| -> Bool | growthOnly |
| -> IO CPICashFlow |
CPI-linked cash flow (not a coupon -- no accruals), with an optional explicit baseFixing
(pass Nothing to derive it from baseDate instead).
Arguments
| :: Double | notional |
| -> EquityIndex | |
| -> Day | baseDate |
| -> Day | fixingDate |
| -> Day | paymentDate |
| -> Bool | growthOnly |
| -> IO EquityCashFlow |
Cash flow dependent on the total return of an EquityIndex (not a coupon
-- no accruals): index(fixingDate)/index(baseDate), or that ratio minus one if growthOnly.
If no EquityCashFlowPricer is attached via setEquityCashFlowPricer, amount
computes this ratio directly from the index; a pricer (e.g. equityQuantoCashFlowPricer) is only
needed to price a quanto-adjusted variant.
CMS coupons and digital replication
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> Word | fixingDays |
| -> GenSwapIndex sidx | index |
| -> Double | gearing |
| -> Double | spread |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> DayCounter | dayCounter |
| -> Bool | inArrears |
| -> Maybe Day | exCouponDate |
| -> BusinessDayConvention | fixingConvention |
| -> IO CmsCoupon |
Constant-maturity-swap (CMS) coupon.
The start and end dates are used as supplied: QuantLib performs no business-day adjustment when constructing this coupon, so callers must supply already adjusted dates. Attach a CMS pricer before asking for its rate or amount.
cappedFlooredCmsCoupon Source #
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> Word | fixingDays |
| -> GenSwapIndex sidx | index |
| -> Double | gearing |
| -> Double | spread |
| -> Maybe Double | cap |
| -> Maybe Double | floor |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> DayCounter | dayCounter |
| -> Bool | inArrears |
| -> Maybe Day | exCouponDate |
| -> BusinessDayConvention | fixingConvention |
| -> IO FloatingRateCoupon |
CMS coupon with optional cap and floor. This is QuantLib's
CappedFlooredCmsCoupon: it wraps a CmsCoupon in a capped/floored coupon and returns it at
the useful FloatingRateCoupon level. Nothing means no cap or floor.
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> Word | fixingDays |
| -> SwapSpreadIndex | index |
| -> Double | gearing |
| -> Double | spread |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> DayCounter | dayCounter |
| -> Bool | inArrears |
| -> Maybe Day | exCouponDate |
| -> BusinessDayConvention | fixingConvention |
| -> IO FloatingRateCoupon |
Constant-maturity-swap-spread coupon. Its index is the geared difference of two swap rates. QuantLib does no date adjustment at construction, so callers must provide business dates.
cappedFlooredCmsSpreadCoupon Source #
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> Word | fixingDays |
| -> SwapSpreadIndex | index |
| -> Double | gearing |
| -> Double | spread |
| -> Maybe Double | cap |
| -> Maybe Double | floor |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> DayCounter | dayCounter |
| -> Bool | inArrears |
| -> Maybe Day | exCouponDate |
| -> BusinessDayConvention | fixingConvention |
| -> IO FloatingRateCoupon |
Capped/floored CMS-spread coupon, returned at the useful FloatingRateCoupon level.
Nothing represents QuantLib's absent cap or floor.
Arguments
| :: ReplicationType | replicationType |
| -> Double | gap |
| -> IO DigitalReplication |
Digital-option replication strategy. It specifies the sub, central, or super replication used to price the embedded digital option in a digital coupon; gap is the call/put-spread width used by that replication.
Arguments
| :: CmsCoupon | underlying |
| -> Maybe Double | callStrike |
| -> PositionType | callPosition |
| -> Bool | callATM |
| -> Maybe Double | callDigitalPayoff |
| -> Maybe Double | putStrike |
| -> PositionType | putPosition |
| -> Bool | putATM |
| -> Maybe Double | putDigitalPayoff |
| -> Maybe DigitalReplication | replication |
| -> Bool | nakedOption |
| -> IO DigitalCmsCoupon |
CMS-rate coupon with embedded digital call and put options.
QuantLib evaluates the digital options by call/put-spread replication. A supplied digital
payoff produces a cash-or-nothing option; without one the option is asset-or-nothing. When
nakedOption is true, the underlying coupon rate is excluded from the payoff. Optional
strikes and payoffs use Nothing for QuantLib's null-rate sentinel.
digitalCmsSpreadCoupon Source #
Arguments
| :: Day | paymentDate |
| -> Double | nominal |
| -> Day | accrualStartDate |
| -> Day | accrualEndDate |
| -> Word | fixingDays |
| -> SwapSpreadIndex | index |
| -> Double | gearing |
| -> Double | spread |
| -> Maybe Day | referencePeriodStart |
| -> Maybe Day | referencePeriodEnd |
| -> DayCounter | dayCounter |
| -> Bool | inArrears |
| -> Maybe Day | exCouponDate |
| -> BusinessDayConvention | fixingConvention |
| -> Maybe Double | callStrike |
| -> PositionType | callPosition |
| -> Bool | callATM |
| -> Maybe Double | callDigitalPayoff |
| -> Maybe Double | putStrike |
| -> PositionType | putPosition |
| -> Bool | putATM |
| -> Maybe Double | putDigitalPayoff |
| -> Maybe DigitalReplication | replication |
| -> Bool | nakedOption |
| -> IO DigitalCmsSpreadCoupon |
CMS-spread-rate coupon with embedded digital call and put options. Builds its own
underlying CmsSpreadCoupon from paymentDate through fixingConvention (as
cmsSpreadCoupon does), then wraps it exactly as digitalCmsCoupon wraps a CmsCoupon.
QuantLib does no date adjustment at construction, so callers must provide business dates.
Optional strikes and payoffs use Nothing for QuantLib's null-rate sentinel.
Dividends
Predetermined cash flow paying a fixed amount at date.
fractionalDividendWithNominal Source #
Predetermined cash flow paying rate times nominal at date.
Predetermined cash flow paying a fractional rate of the underlying's price at date.
Coupon legs
fixedRateLeg :: Schedule -> NonEmpty Double -> NonEmpty InterestRate -> BusinessDayConvention -> DayCounter -> Calendar -> IO Leg Source #
Build a leg of fixed-rate coupons.
Arguments
| :: Schedule | |
| -> BMAIndex | |
| -> NonEmpty Double | notionals |
| -> DayCounter | |
| -> BusinessDayConvention | |
| -> [Double] | gearings |
| -> [Double] | spreads |
| -> IO Leg |
Build a leg of average-BMA coupons.
iborLeg :: Schedule -> GenIborIndex ibor -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> [Double] -> [Double] -> Bool -> Bool -> IO Leg Source #
iborLeg keeps its original 12-arg signature -- existing callers are unaffected -- but
now delegates to iborLeg_, the raw binding widened to IborLeg's full builder surface,
hardcoding upstream's own defaults for the params iborLeg doesn't expose. Use
iborLegWithOptions to reach those (payment lag/calendar, ex-coupon period, fixing
convention, indexed/at-par coupons) via IborLegOpts.
iborLegWithOptions :: Schedule -> GenIborIndex ibor -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> [Double] -> [Double] -> Bool -> Bool -> IborLegOpts -> IO Leg Source #
iborLeg widened to every IborLeg builder-method param via IborLegOpts.
digitalIborLeg :: Schedule -> GenIborIndex ibor -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> Bool -> DigitalIborLegOpts -> IO Leg Source #
cmsLeg :: Schedule -> GenSwapIndex sidx -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> [Double] -> [Double] -> Bool -> Bool -> IO Leg Source #
CMS leg builder (analog of iborLeg), 12-arg core shape -- same defaults-hardcoding
pattern as iborLeg for the params not in this signature. Use cmsLegWithOptions to reach
them (CmsLegOpts).
cmsLegWithOptions :: Schedule -> GenSwapIndex sidx -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> [Double] -> [Double] -> Bool -> Bool -> CmsLegOpts -> IO Leg Source #
cmsLeg widened to every CmsLeg builder-method param via CmsLegOpts.
Arguments
| :: Schedule | |
| -> SwapSpreadIndex | swapSpreadIndex |
| -> NonEmpty Double | notionals |
| -> DayCounter | |
| -> BusinessDayConvention | paymentAdjustment |
| -> [Word] | fixingDays |
| -> [Double] | gearings |
| -> [Double] | spreads |
| -> [Double] | caps |
| -> [Double] | floors |
| -> Bool | inArrears |
| -> Bool | zeroPayments |
| -> IO Leg |
CMS-spread leg builder. Unlike CmsLeg, upstream's CmsSpreadLeg has no
ex-coupon-period/fixing-convention builder methods, so this binds its full builder surface
directly with no accompanying options record.
digitalCmsLeg :: Schedule -> GenSwapIndex sidx -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> Bool -> DigitalCmsLegOpts -> IO Leg Source #
Build a sequence of digital CMS-rate coupons. The options record covers all digital call/put and replication choices.
digitalCmsSpreadLeg :: Schedule -> SwapSpreadIndex -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> [Word] -> [Double] -> [Double] -> Bool -> DigitalCmsSpreadLegOpts -> IO Leg Source #
Build a sequence of digital CMS-spread-rate coupons. The options record covers all digital
call/put and replication choices, exactly as digitalCmsLeg does for the plain CMS index case.
multipleResetsLeg :: Schedule -> GenIborIndex ibor -> Word -> DayCounter -> BusinessDayConvention -> MultipleResetsLegOpts -> IO Leg Source #
Arguments
| :: Schedule | |
| -> OvernightIborIndex | |
| -> NonEmpty Double | notionals' |
| -> DayCounter | |
| -> BusinessDayConvention | |
| -> [Double] | gearings |
| -> [Double] | spreads |
| -> IO Leg |
Build a leg of overnight-index coupons.
Arguments
| :: Schedule | |
| -> GenIborIndex ibor | |
| -> NonEmpty Double | notionals |
| -> DayCounter | |
| -> BusinessDayConvention | |
| -> [Word] | fixingDays |
| -> [Double] | gearings |
| -> [Double] | spreads |
| -> [Double] | lowerTriggers |
| -> [Double] | upperTriggers |
| -> (Int, TimeUnit) | observationTenor |
| -> BusinessDayConvention | |
| -> IO Leg |
Build a leg of range-accrual floating-rate coupons.
Arguments
| :: Schedule | |
| -> ZeroInflationIndex | |
| -> Double | baseCPI |
| -> (Word, TimeUnit) | observationLag |
| -> NonEmpty Double | notionals |
| -> NonEmpty Double | fixedRates |
| -> DayCounter | paymentDayCounter |
| -> BusinessDayConvention | paymentAdjustment |
| -> Calendar | paymentCalendar |
| -> CPIInterpolationType | observationInterpolation |
| -> Bool | subtractInflationNominal |
| -> IO Leg |
Fixed-rate coupons scaled by the ratio of a ZeroInflationIndex fixing to baseCPI
(a CPICoupon leg -- no capped/floored variant, unlike yoyInflationLeg: QL 1.43 has no
CappedFlooredCPICoupon class to build one from, see README.md's TODO).
Arguments
| :: Schedule | |
| -> Calendar | |
| -> YoYInflationIndex | |
| -> (Word, TimeUnit) | observationLag |
| -> CPIInterpolationType | interpolation |
| -> NonEmpty Double | notionals |
| -> DayCounter | paymentDayCounter |
| -> BusinessDayConvention | paymentAdjustment |
| -> [Word] | fixingDays |
| -> [Double] | gearings |
| -> [Double] | spreads |
| -> [Double] | caps |
| -> [Double] | floors |
| -> IO Leg |
Year-on-year inflation-linked coupons (a YoYInflationCoupon leg). Non-empty caps/floors
build CappedFlooredYoYInflationCoupons instead of plain ones -- but any resulting coupon
(capped or not) still needs a pricer set via setYoyInflationCouponPricer before its
'QuantLib.CashFlow.npvWithZSpread/amount can be computed: upstream's InflationCoupon::rate()
requires pricer_ unconditionally, not just for the capped/floored case (confirmed by reading
inflationcoupon.cpp). CPI-leg (cpiLeg) caps/floors have no equivalent in QL 1.43 (no
CappedFlooredCPICoupon class exists upstream, see README.md's TODO) -- this is a
QuantLib-version limitation, not an unbound feature.
Coupon pricers
blackIborCouponPricer Source #
Arguments
| :: GenOptionletVolatilityStructure ov | |
| -> TimingAdjustment | |
| -> Maybe (GenQuote q) | correlation |
| -> Maybe Bool | useIndexedCoupon |
| -> IO FloatingRateCouponPricer |
Black-formula pricer for capped/floored Ibor coupons
blackIborQuantoCouponPricer Source #
Arguments
| :: GenBlackVolTermStructure bv | fxVolatility |
| -> GenQuote q | underlyingFxCorrelation |
| -> GenOptionletVolatilityStructure ov | capletVolatility |
| -> IO FloatingRateCouponPricer |
Experimental quanto-adjusted Black-formula pricer for capped/floored Ibor coupons. The FX Black volatility and underlying/FX correlation determine the quanto adjustment; the caplet volatility supplies the ordinary Ibor optionlet pricing inputs. The three handles are retained by QuantLib, so relinking their underlying quotes or term structures updates the pricer in the usual way.
Arguments
| :: GenSwaptionVolatilityStructure sv | |
| -> YieldCurveModel | |
| -> GenQuote q | meanReversion |
| -> IO CmsCouponPricer |
CMS-coupon pricer via static replication (Hagan's "Conundrums..."), using an analytic closed-form approximation of the replication integrals.
Arguments
| :: GenSwaptionVolatilityStructure sv | |
| -> YieldCurveModel | |
| -> GenQuote q | meanReversion |
| -> Double | lowerLimit |
| -> Double | upperLimit |
| -> Double | precision |
| -> Double | hardUpperLimit |
| -> IO CmsCouponPricer |
CMS-coupon pricer via static replication (Hagan's "Conundrums..."), evaluating the replication integrals by numerical integration over vanilla swaption prices.
linearTsrPricer :: GenSwaptionVolatilityStructure sv -> GenQuote q -> Maybe (GenYieldTermStructure y) -> LinearTsrPricerSettings -> IO CmsCouponPricer Source #
CMS-coupon pricer using a linear terminal swap rate model (Andersen/Piterbarg 16.3.2).
couponDiscountCurve of Nothing uses the coupon's own discount curve, matching upstream's
default empty Handle. The upstream constructor's trailing integrator parameter (an
advanced numerical-integration override) is not exposed; upstream's own default
(ext::shared_ptr<Integrator>()) is always used.
lognormalCmsSpreadPricer :: CmsCouponPricer -> GenQuote q -> Maybe (GenYieldTermStructure y) -> Word -> Maybe VolatilityType -> Maybe Double -> Maybe Double -> IO FloatingRateCouponPricer Source #
rangeAccrualPricerByBgm Source #
Arguments
| :: Double | correlation |
| -> SmileSection | smilesOnExpiry |
| -> SmileSection | smilesOnPayment |
| -> Bool | withSmile |
| -> Bool | byCallSpread |
| -> IO FloatingRateCouponPricer |
BGM-based pricer for RangeAccrualFloatersCoupons (a rangeAccrualLeg)
averagingMultipleResetsPricer :: IO FloatingRateCouponPricer Source #
Pricer that arithmetically averages multiple Ibor resets.
compoundingMultipleResetsPricer :: IO FloatingRateCouponPricer Source #
Pricer that compounds multiple Ibor resets.
compoundingOvernightIndexedCouponPricer Source #
Arguments
| :: Maybe OptionletVolatilityStructure | capletVolatility |
| -> Bool | byApprox |
| -> IO FloatingRateCouponPricer |
Compounding overnight-index coupon pricer.
arithmeticAveragedOvernightIndexedCouponPricer Source #
Arguments
| :: Double | meanReversion |
| -> Double | volatility |
| -> Bool | byApprox |
| -> Maybe OptionletVolatilityStructure | capletVolatility |
| -> Bool | effective |
| -> IO FloatingRateCouponPricer |
Arithmetic-average overnight-index coupon pricer.
blackCompoundingOvernightIndexedCouponPricer Source #
Arguments
| :: Maybe OptionletVolatilityStructure | capletVolatility |
| -> Bool | effective |
| -> IO FloatingRateCouponPricer |
Black-formula compounding overnight-index coupon pricer.
blackAveragingOvernightIndexedCouponPricer Source #
Arguments
| :: Maybe OptionletVolatilityStructure | capletVolatility |
| -> Bool | effective |
| -> IO FloatingRateCouponPricer |
Black-formula arithmetic-average overnight-index coupon pricer.
Arguments
| :: Maybe YieldTermStructure | nominalTermStructure |
| -> IO CPICouponPricer |
CPI coupon pricer using an optional nominal yield curve.
cpiCouponPricerWithVol Source #
Arguments
| :: CPIVolatilitySurface | volatilitySurface |
| -> Maybe YieldTermStructure | nominalTermStructure |
| -> IO CPICouponPricer |
CPI coupon pricer using a CPI volatility surface and optional nominal yield curve.
blackYoyInflationCouponPricer Source #
Arguments
| :: YoYOptionletVolatilitySurface | |
| -> GenYieldTermStructure y | nominalTermStructure |
| -> IO YoYInflationCouponPricer |
Black-formula pricer for capped/floored yoyInflationLeg coupons.
unitDisplacedBlackYoyInflationCouponPricer Source #
Arguments
| :: YoYOptionletVolatilitySurface | |
| -> GenYieldTermStructure y | nominalTermStructure |
| -> IO YoYInflationCouponPricer |
Unit-Displaced-Black-formula pricer for capped/floored yoyInflationLeg coupons.
bachelierYoyInflationCouponPricer Source #
Arguments
| :: YoYOptionletVolatilitySurface | |
| -> GenYieldTermStructure y | nominalTermStructure |
| -> IO YoYInflationCouponPricer |
Bachelier-formula pricer for capped/floored yoyInflationLeg coupons.
equityQuantoCashFlowPricer Source #
Arguments
| :: GenYieldTermStructure y | quantoCurrencyTermStructure |
| -> GenBlackVolTermStructure bv1 | equityVolatility |
| -> GenBlackVolTermStructure bv2 | fxVolatility |
| -> GenQuote q | correlation |
| -> IO EquityCashFlowPricer |
Quanto-adjusted pricer for an EquityCashFlow whose equity leg is denominated in a currency
other than the swap's payment currency.
Mutators
Arguments
| :: CPICoupon | coupon |
| -> CPICouponPricer | pricer |
| -> IO () |
Attach a CPI coupon pricer to a CPI coupon.
setFloatingRateCouponPricer Source #
Arguments
| :: GenFloatingRateCoupon frc | coupon |
| -> GenFloatingRateCouponPricer frcp | pricer |
| -> IO () |
Set the coupon pricer used to calculate a floating-rate coupon's rate.
setYoyInflationCouponPricer :: GenLeg l -> YoYInflationCouponPricer -> IO () Source #
Set the pricer of every YoYInflationCapFloor-ready
YoYInflationCoupon/CappedFlooredYoYInflationCoupon in leg. Required before pricing (via
'QuantLib.CashFlow.npvWithZSpread or an setPricingEngined instrument built on the
leg) any yoyInflationLeg built with non-empty caps/floors -- yoyInflationLeg auto-attaches
a default (non-vol) pricer only when caps and floors are both empty.
setEquityCashFlowPricer :: EquityCashFlow -> EquityCashFlowPricer -> IO () Source #
Attach a pricer (e.g. from equityQuantoCashFlowPricer) to a single EquityCashFlow; see
setEquityLegPricer to attach one to every EquityCashFlow in a leg instead.
setCouponPricer :: GenLeg l -> GenFloatingRateCouponPricer frcp -> IO () Source #
Set the pricer of every floating-rate coupon in leg.
setCouponPricers :: GenLeg l -> [GenFloatingRateCouponPricer frcp] -> IO () Source #
Set the pricer of every floating-rate coupon in leg, picking each coupon's pricer from pricers by matching coupon type.
setEquityLegPricer :: GenLeg l -> EquityCashFlowPricer -> IO () Source #
Attach a pricer to every EquityCashFlow found in leg (non-EquityCashFlow entries are left
untouched); see setEquityCashFlowPricer to attach one to a single cash flow instead.
Inspectors
Coupon fixings
class HasFixingDates coupon where Source #
Methods
fixingDates :: coupon -> IO [Day] Source #
Instances
| HasFixingDates AverageBMACoupon Source # | |
Defined in QuantLib.CashFlow Methods fixingDates :: AverageBMACoupon -> IO [Day] Source # | |
| HasFixingDates MultipleResetsCoupon Source # | |
Defined in QuantLib.CashFlow Methods fixingDates :: MultipleResetsCoupon -> IO [Day] Source # | |
| HasFixingDates OvernightIndexedCoupon Source # | |
Defined in QuantLib.CashFlow Methods fixingDates :: OvernightIndexedCoupon -> IO [Day] Source # | |
fixingDependencies :: GenLeg l -> IO [(String, Day)] Source #
Coupon types that expose the dates of their component index fixings.
|Every fixing the cash flows of this leg need, as (index name, fixing date) pairs in leg
order. QuantLib has no requiredFixings query, so this walks the leg itself, unwrapping
decorating coupons (capped/floored, stripped, digital) and asking each coupon for its own
fixing dates: one for an Ibor, CMS or CMS-spread coupon, one per averaged date for an
overnight, BMA or multiple-resets coupon, and the fixing and base dates for an inflation
coupon or an index-linked payment. A CMS-spread coupon reports its two underlying swap
indexes rather than the spread index, because that is where the fixings are stored. Names
are name, the key QuantLib's process-global fixing store uses. A cash flow
that needs no fixing -- a redemption, a fixed-rate coupon -- contributes nothing. Duplicates
are not removed: two coupons may fix the same index on the same date.
class HasIndexFixings coupon where Source #
Coupon types that expose their component index fixings.
Methods
indexFixings :: coupon -> IO [Double] Source #
Instances
| HasIndexFixings AverageBMACoupon Source # | |
Defined in QuantLib.CashFlow Methods indexFixings :: AverageBMACoupon -> IO [Double] Source # | |
| HasIndexFixings OvernightIndexedCoupon Source # | |
Defined in QuantLib.CashFlow Methods indexFixings :: OvernightIndexedCoupon -> IO [Double] Source # | |
baseFixing :: GenIndexedCashFlow icf -> IO Double Source #
The fixing used as the base of an indexed cash flow's return ratio.
indexFixing :: GenIndexedCashFlow icf -> IO Double Source #
The fixing used as the numerator of an indexed cash flow's return ratio.
Leg analytics
Arguments
| :: GenCashFlow cf | cashFlow |
| -> IO Double |
The undiscounted amount paid by a cash flow on its payment date.
Arguments
| :: GenLeg l | |
| -> InterestRate | yield |
| -> DurationType | |
| -> Bool | includeSettlementDateFlows |
| -> Maybe Day | settlementDate |
| -> Maybe Day | npvDate |
| -> IO Double |
Cash-flow duration. The simple duration of a string of cash flows is defined as \[ D_{\mathrm{simple}} = \frac{\sum t_i c_i B(t_i)}{\sum c_i B(t_i)} \] where $ c_i $ is the amount of the $ i $-th cash flow, $ t_i $ is its payment time, and $ B(t_i) $ is the corresponding discount according to the passed yield.The modified duration is defined as \[ D_{\mathrm{modified}} = -\frac{1}{P} \frac{\partial P}{\partial y} \] where $ P $ is the present value of the cash flows according to the given IRR $ y $.The Macaulay duration is defined for a compounded IRR as \[ D_{\mathrm{Macaulay}} = \left( 1 + \frac{y}{N} \right) D_{\mathrm{modified}} \] where $ y $ is the IRR and $ N $ is the number of cash flows per year.
Number of days in the accrual period of the coupon paying on settlementDate.
End of the accrual period of the coupon paying on settlementDate.
Length, in years, of the accrual period of the coupon paying on settlementDate.
Start of the accrual period of the coupon paying on settlementDate.
Accrued amount of the coupon paying on settlementDate.
Number of days accrued so far on the coupon paying on settlementDate.
Fraction of the accrual period elapsed, as of settlementDate, for the coupon paying then.
Arguments
| :: GenLeg l | |
| -> GenYieldTermStructure y | |
| -> Bool | includeSettlementDateFlows |
| -> Maybe Day | settlementDate |
| -> Maybe Day | npvDate |
| -> Double | npv |
| -> IO Double |
At-the-money rate of the cash flows. The result is the fixed rate for which a fixed rate cash flow vector, equivalent to the input vector, has the required NPV according to the given term structure. If the required NPV is not given, the input cash flow vector's NPV is used instead.
Arguments
| :: GenLeg l | |
| -> InterestRate | |
| -> Bool | includeSettlementDateFlows |
| -> Maybe Day | settlementDate |
| -> Maybe Day | npvDate |
| -> IO Double |
Basis-point value. Obtained by setting dy = 0.0001 in the 2nd-order Taylor series expansion.
bps :: GenLeg l -> BpsDiscounting y -> Bool -> Maybe Day -> Maybe Day -> IO Double Source #
Basis-point sensitivity of the cash flows under the given discounting.
Arguments
| :: GenLeg l | |
| -> InterestRate | |
| -> Bool | includeSettlementDateFlows |
| -> Maybe Day | settlementDate |
| -> Maybe Day | npvDate |
| -> IO Double |
Cash-flow convexity. The convexity of a string of cash flows is defined as \[ C = \frac{1}{P} \frac{\partial^2 P}{\partial y^2} \] where $ P $ is the present value of the cash flows according to the given IRR $ y $.
Whether every cash flow in the leg has occurred as of settlementDate.
startDate :: GenLeg l -> IO Day Source #
Returns the start (i.e. first accrual) date for the given Leg
Arguments
| :: GenLeg l | |
| -> Maybe Bool | includeSettlementDateFlows |
| -> Maybe Day | settlementDate |
| -> IO [(Day, Double, Bool)] | date, amount, hasOccurred |
return cash flows together with an indicator whether they occurred as of settlementDate
return cashflows that will occur after settlementDate
Amount of the first cash flow paying after settlementDate.
Date of the first cash flow paying after settlementDate.
Coupon rate of the next cash flow paying after settlementDate.
return cashflows that occurred before settlementDate
previousCashFlowAmount Source #
Amount of the last cash flow that paid before or at settlementDate.
Date of the last cash flow that paid before or at settlementDate.
Coupon rate of the last cash flow that paid before or at settlementDate.
Nominal of the coupon paying on settlementDate.
npv :: GenLeg l -> Discounting y -> Bool -> Maybe Day -> Maybe Day -> IO Double Source #
NPV of the cash flows under the given discounting.
Arguments
| :: GenLeg l | |
| -> GenYieldTermStructure y | |
| -> Bool | includeSettlementDateFlows |
| -> Day | settlementDate |
| -> Day | npvDate |
| -> IO (Double, Double) |
NPV and BPS of the cash flows. The NPV and BPS of the cash flows calculated together for performance reason
End of the reference period of the coupon paying on settlementDate.
Start of the reference period of the coupon paying on settlementDate.
Arguments
| :: GenLeg l | |
| -> Double | npv |
| -> DayCounter | |
| -> Compounding | |
| -> Frequency | |
| -> Bool | includeSettlementDateFlows |
| -> Maybe Day | settlementDate |
| -> Maybe Day | npvDate |
| -> Double | accuracy |
| -> Word | maxIterations |
| -> Double | guess |
| -> IO Double |
Implied internal rate of return. The function verifies the theoretical existance of an IRR and numerically establishes the IRR to the desired precision.
Arguments
| :: GenLeg l | |
| -> InterestRate | yield |
| -> Bool | includeSettlementDateFlows |
| -> Maybe Day | settlementDate |
| -> Maybe Day | npvDate |
| -> IO Double |
Yield value of a basis point. The yield value of a one basis point change in price is the derivative of the yield with respect to the price multiplied by 0.01
Arguments
| :: GenLeg l | |
| -> Double | npv |
| -> GenYieldTermStructure y | |
| -> Compounding | |
| -> Frequency | |
| -> Bool | includeSettlementDateFlows |
| -> Maybe Day | settlementDate |
| -> Maybe Day | npvDate |
| -> Double | accuracy |
| -> Word | maxIterations |
| -> Double | guess |
| -> IO Double |
implied Z-spread.
Coupon rates and prices
The individual coupons of a coupon leg, e.g. to ask each one its own rate or
couponAccruedAmount. Pair with toCouponLeg to get here from a Leg.
couponAccrualStartDates :: CouponLeg -> IO [Day] Source #
start of the accrual periods for a coupon leg
Interest accrued on a single coupon up to the given date -- nominal times rate times the
accrued fraction of the accrual period. Named apart from the leg-level accruedAmount, which
sums a whole Leg and takes settlement-date arguments this does not.
The coupon rate, at the Coupon level every accruing cash flow shares. How it is obtained
is the subtype's business: a FixedRateCoupon returns its own rate, a CPICoupon its fixed
rate times the index ratio, and a FloatingRateCoupon requires an attached
FloatingRateCouponPricer and throws without one (see setFloatingRateCouponPricer).
Arguments
| :: GenFloatingRateCoupon frc | coupon |
| -> Maybe (GenYieldTermStructure y) | discountingCurve |
| -> IO Double |
Net present value of the coupon, i.e. the coupon amount discounted off the given curve.
Nothing uses the coupon's own default discounting (an empty Handle<YieldTermStructure>).
interestRate :: FixedRateCoupon -> IO InterestRate Source #
The coupon's own fixed rate, as an InterestRate (rate value plus day countercompounding
frequency) rather than a bare rate -- distinct from rate, which returns a
bare Double for the (possibly index-derived) accrual rate.
The ratio of the (possibly interpolated) index value on d to the coupon's base index value, i.e. the inflation-adjustment factor applied to the coupon's fixed rate.
Arguments
| :: GenFloatingRateCoupon frc | coupon |
| -> IO Double |
The adjustment (e.g. for coupons that fix in arrears) applied to the plain index fixing to
get the effective, convexity-adjusted fixing used in rate.
swapletRate :: GenFloatingRateCouponPricer frcp -> IO Double Source #
Rate for a fully-determined coupon period, with no cap/floor.
swapletPrice :: GenFloatingRateCouponPricer frcp -> IO Double Source #
Price (NPV contribution) for a fully-determined coupon period, with no cap/floor. Not
every pricer supports this: e.g. CompoundingOvernightIndexedCouponPricer throws.
Arguments
| :: GenFloatingRateCouponPricer frcp | |
| -> Double | effectiveCap |
| -> IO Double |
Price of the caplet with the given effective cap rate. Not every pricer supports this.
Arguments
| :: GenFloatingRateCouponPricer frcp | |
| -> Double | effectiveCap |
| -> IO Double |
Rate of the caplet with the given effective cap rate. Not every pricer supports this.
Arguments
| :: GenFloatingRateCouponPricer frcp | |
| -> Double | effectiveFloor |
| -> IO Double |
Price of the floorlet with the given effective floor rate. Not every pricer supports this.
Arguments
| :: GenFloatingRateCouponPricer frcp | |
| -> Double | effectiveFloor |
| -> IO Double |
Rate of the floorlet with the given effective floor rate. Not every pricer supports this.
Arguments
| :: DigitalReplication | replication |
| -> ReplicationType |
Arguments
| :: DigitalReplication | replication |
| -> Double |
Capped and floored coupons
Arguments
| :: StrippedCappedFlooredCoupon | coupon |
| -> Double |
The cap actually in effect for this coupon, accounting for the sign of gearing; QuantLib's null-rate sentinel means no cap applies.
Arguments
| :: StrippedCappedFlooredCoupon | coupon |
| -> Double |
The floor actually in effect for this coupon, accounting for the sign of gearing; QuantLib's null-rate sentinel means no floor applies.
Arguments
| :: StrippedCappedFlooredCoupon | coupon |
| -> Double |
The cap rate translated back to the underlying index rate (before gearing/spread); QuantLib's null-rate sentinel means the coupon is not capped.
Arguments
| :: StrippedCappedFlooredCoupon | coupon |
| -> Double |
The floor rate translated back to the underlying index rate (before gearing/spread); QuantLib's null-rate sentinel means the coupon is not floored.
Arguments
| :: StrippedCappedFlooredCoupon | coupon |
| -> Bool |
Whether this coupon has a cap in effect.
Arguments
| :: StrippedCappedFlooredCoupon | coupon |
| -> Bool |
Whether this coupon has a floor in effect.
Arguments
| :: StrippedCappedFlooredCoupon | coupon |
| -> Bool |
Whether this coupon is both capped and floored (a collar).
callOptionRate :: GenDigitalCoupon dc -> IO Double Source #
putOptionRate :: GenDigitalCoupon dc -> IO Double Source #