| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.Instrument.Bond
Synopsis
- type Bond = GenBond CBond
- type FixedRateBond = GenBond CFixedRateBond
- type ConvertibleBond = GenBond CConvertibleBond
- type CallableBond = GenBond CCallableBond
- asBond :: GenBond a -> IO Bond
- data BondPriceType
- bond :: Word -> Calendar -> Maybe Day -> GenLeg a -> IO Bond
- bond' :: Word -> Calendar -> Double -> Maybe Day -> Maybe Day -> GenLeg a -> IO Bond
- fixedRateBond :: Word -> Double -> Schedule -> [Double] -> DayCounter -> BusinessDayConvention -> Double -> Maybe Day -> Calendar -> IO FixedRateBond
- zeroCouponBond :: Word -> Calendar -> Double -> Day -> BusinessDayConvention -> Double -> Maybe Day -> IO Bond
- floatingRateBond :: Word -> Double -> Schedule -> GenIborIndex a -> DayCounter -> BusinessDayConvention -> Word -> [Double] -> [Double] -> [Double] -> [Double] -> Bool -> Double -> Maybe Day -> IO Bond
- maturityDate :: GenBond a -> Maybe Day
- yield :: GenBond a -> DayCounter -> Compounding -> Frequency -> Double -> Word -> IO Double
- accruedAmount :: GenBond a -> Day -> IO Double
- cleanPriceFromYield :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> IO Double
- dirtyPriceFromYield :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> IO Double
- nextCashFlowDate :: GenBond a -> Day -> IO (Maybe Day)
- nextCouponRate :: GenBond a -> Day -> IO Double
- notional :: GenBond a -> Day -> IO Double
- previousCashFlowDate :: GenBond a -> Day -> IO (Maybe Day)
- previousCouponRate :: GenBond a -> Day -> IO Double
- settlementValueFromCleanPrice :: GenBond a -> Double -> IO Double
- settlementValue :: GenBond a -> IO Double
- yieldFromCleanPrice :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> Double -> Word -> IO Double
- isTradable :: GenBond a -> Day -> IO Bool
- notionals :: GenBond a -> IO [Double]
- cashFlows :: GenBond a -> IO Leg
- redemptions :: GenBond a -> IO Leg
- settlementDate :: GenBond a -> Day -> IO Day
- startDate :: GenBond a -> IO Day
- accrualDays :: GenBond a -> Day -> IO Int
- accrualEndDate :: GenBond a -> Day -> IO (Maybe Day)
- accrualPeriod :: GenBond a -> Day -> IO Double
- accrualStartDate :: GenBond a -> Day -> IO (Maybe Day)
- accruedDays :: GenBond a -> Day -> IO Int
- accruedPeriod :: GenBond a -> Day -> IO Double
- atmRate :: GenBond b -> GenYieldTermStructure a -> Day -> Double -> IO Double
- basisPointValue' :: GenBond a -> InterestRate -> Day -> IO Double
- basisPointValue :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> IO Double
- bpsFromYield :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> IO Double
- bpsFromYield' :: GenBond a -> InterestRate -> Day -> IO Double
- bps :: GenBond b -> GenYieldTermStructure a -> Day -> IO Double
- cleanPrice :: GenBond b -> GenYieldTermStructure a -> Day -> IO Double
- cleanPrice' :: GenBond b -> GenYieldTermStructure a -> Double -> Compounding -> Frequency -> Day -> IO Double
- cleanPriceFromYield' :: GenBond a -> InterestRate -> Day -> IO Double
- convexity' :: GenBond a -> InterestRate -> Day -> IO Double
- convexity :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> IO Double
- duration' :: GenBond a -> InterestRate -> DurationType -> Day -> IO Double
- duration :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> DurationType -> Day -> IO Double
- nextCashFlowAmount :: GenBond a -> Day -> IO Double
- previousCashFlowAmount :: GenBond a -> Day -> IO Double
- referencePeriodEnd :: GenBond a -> Day -> IO (Maybe Day)
- referencePeriodStart :: GenBond a -> Day -> IO (Maybe Day)
- yieldFromCleanPrice' :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> Double -> Word -> Double -> IO Double
- yieldValueBasisPoint' :: GenBond a -> InterestRate -> Day -> IO Double
- yieldValueBasisPoint :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> IO Double
- zSpread :: GenBond b -> Double -> GenYieldTermStructure a -> Compounding -> Frequency -> Day -> Double -> Word -> Double -> IO Double
- currentCleanPrice :: GenBond a -> IO Double
- currentDirtyPrice :: GenBond a -> IO Double
- callableFixedRateBond :: Word -> Double -> Schedule -> [Double] -> DayCounter -> BusinessDayConvention -> Double -> Maybe Day -> [Callability] -> IO CallableBond
- callableZeroCouponBond :: Word -> Double -> Calendar -> Day -> DayCounter -> BusinessDayConvention -> Double -> Maybe Day -> [Callability] -> IO CallableBond
- convertibleFixedCouponBond :: Exercise -> Double -> [Callability] -> Day -> Word -> [Double] -> DayCounter -> Schedule -> Double -> IO ConvertibleBond
- convertibleFloatingRateBond :: Exercise -> Double -> [Callability] -> Day -> Word -> GenIborIndex b -> Word -> [Double] -> DayCounter -> Schedule -> Double -> IO ConvertibleBond
- convertibleZeroCouponBond :: Exercise -> Double -> [Callability] -> Day -> Word -> DayCounter -> Schedule -> Double -> IO ConvertibleBond
Documentation
type FixedRateBond = GenBond CFixedRateBond #
type ConvertibleBond = GenBond CConvertibleBond #
type CallableBond = GenBond CCallableBond #
data BondPriceType #
Instances
| Enum BondPriceType # | |
Defined in QuantLib.Internal.Enum Methods succ :: BondPriceType -> BondPriceType # pred :: BondPriceType -> BondPriceType # toEnum :: Int -> BondPriceType # fromEnum :: BondPriceType -> Int # enumFrom :: BondPriceType -> [BondPriceType] # enumFromThen :: BondPriceType -> BondPriceType -> [BondPriceType] # enumFromTo :: BondPriceType -> BondPriceType -> [BondPriceType] # enumFromThenTo :: BondPriceType -> BondPriceType -> BondPriceType -> [BondPriceType] # | |
| Show BondPriceType # | |
Defined in QuantLib.Internal.Enum Methods showsPrec :: Int -> BondPriceType -> ShowS # show :: BondPriceType -> String # showList :: [BondPriceType] -> ShowS # | |
| Eq BondPriceType # | |
Defined in QuantLib.Internal.Enum Methods (==) :: BondPriceType -> BondPriceType -> Bool # (/=) :: BondPriceType -> BondPriceType -> Bool # | |
old constructor for non amortizing bonds. Warning The last passed cash flow must be the bond redemption. No other cash flow can have a date later than the redemption date.
Arguments
| :: Word | settlementDays |
| -> Double | faceAmount |
| -> Schedule | schedule |
| -> [Double] | coupons |
| -> DayCounter | accrualDayCounter |
| -> BusinessDayConvention | paymentConvention |
| -> Double | redemption |
| -> Maybe Day | issueDate |
| -> Calendar | paymentCalendar |
| -> IO FixedRateBond |
zero-coupon bond
Arguments
| :: Word | settlementDays |
| -> Double | faceAmount |
| -> Schedule | schedule |
| -> GenIborIndex a | |
| -> DayCounter | accrualDayCounter |
| -> BusinessDayConvention | |
| -> Word | fixingDays |
| -> [Double] | gearings |
| -> [Double] | spreads |
| -> [Double] | caps |
| -> [Double] | floors |
| -> Bool | inArrears |
| -> Double | redemption |
| -> Maybe Day | issueDate |
| -> IO Bond |
floating-rate bond (possibly capped and/or floored)
maturityDate :: GenBond a -> Maybe Day #
Returns the maturity date of the bond
generic compounding and frequency InterestRate coupons
Arguments
| :: GenBond a | |
| -> DayCounter | |
| -> Compounding | |
| -> Frequency | |
| -> Double | accuracy |
| -> Word | maxEvaluations |
| -> IO Double |
theoretical bond yield
accruedAmount :: GenBond a -> Day -> IO Double #
accrued amount at a given date
clean price given a yield and settlement date
cleanPriceFromYield :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> IO Double #
dirty price given a yield and settlement date
dirtyPriceFromYield :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> IO Double #
nextCashFlowDate :: GenBond a -> Day -> IO (Maybe Day) #
Expected next coupon: depending on (the bond and) the given date the coupon can be historic, deterministic or expected in a stochastic sense. When the bond settlement date is used the coupon is the already-fixed not-yet-paid one.The current bond settlement is used if no date is given.
nextCouponRate :: GenBond a -> Day -> IO Double #
previousCashFlowDate :: GenBond a -> Day -> IO (Maybe Day) #
Previous coupon already paid at a given date. Expected previous coupon: depending on (the bond and) the given date the coupon can be historic, deterministic or expected in a stochastic sense. When the bond settlement date is used the coupon is the last paid one.The current bond settlement is used if no date is given.
previousCouponRate :: GenBond a -> Day -> IO Double #
settlement value as a function of the clean price The default bond settlement date is used for calculation.
settlementValueFromCleanPrice :: GenBond a -> Double -> IO Double #
theoretical settlement value The default bond settlement date is used for calculation.
settlementValue :: GenBond a -> IO Double #
yield given a (clean) price and settlement date
Arguments
| :: GenBond a | |
| -> Double | cleanPrice |
| -> DayCounter | |
| -> Compounding | |
| -> Frequency | |
| -> Day | |
| -> Double | accuracy |
| -> Word | maxEvaluations |
| -> IO Double |
isTradable :: GenBond a -> Day -> IO Bool #
redemptions :: GenBond a -> IO Leg #
settlementDate :: GenBond a -> Day -> IO Day #
accrualDays :: GenBond a -> Day -> IO Int #
accrualPeriod :: GenBond a -> Day -> IO Double #
accruedDays :: GenBond a -> Day -> IO Int #
accruedPeriod :: GenBond a -> Day -> IO Double #
atmRate :: GenBond b -> GenYieldTermStructure a -> Day -> Double -> IO Double #
constructor for amortizing or non-amortizing bonds. Redemptions and maturity are calculated from the coupon data, if available. Therefore, redemptions must not be included in the passed cash flows.
basisPointValue' :: GenBond a -> InterestRate -> Day -> IO Double #
basisPointValue :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> IO Double #
bpsFromYield :: GenBond a -> Double -> DayCounter -> Compounding -> Frequency -> Day -> IO Double #
bpsFromYield' :: GenBond a -> InterestRate -> Day -> IO Double #
cleanPrice :: GenBond b -> GenYieldTermStructure a -> Day -> IO Double #
Arguments
| :: GenBond b | |
| -> GenYieldTermStructure a | discount |
| -> Double | zSpread |
| -> Compounding | |
| -> Frequency | |
| -> Day | settlementDate |
| -> IO Double |
cleanPriceFromYield' :: GenBond a -> InterestRate -> Day -> IO Double #
Arguments
| :: GenBond a | |
| -> InterestRate | yield |
| -> Day | settlementDate |
| -> IO Double |
Arguments
| :: GenBond a | |
| -> Double | yield |
| -> DayCounter | |
| -> Compounding | |
| -> Frequency | |
| -> Day | settlementDate |
| -> IO Double |
Arguments
| :: GenBond a | |
| -> InterestRate | yield |
| -> DurationType | |
| -> Day | |
| -> IO Double |
Arguments
| :: GenBond a | |
| -> Double | yield |
| -> DayCounter | |
| -> Compounding | |
| -> Frequency | |
| -> DurationType | |
| -> Day | settlementDate |
| -> IO Double |
nextCashFlowAmount :: GenBond a -> Day -> IO Double #
previousCashFlowAmount :: GenBond a -> Day -> IO Double #
Arguments
| :: GenBond a | |
| -> Double | cleanPrice |
| -> DayCounter | |
| -> Compounding | |
| -> Frequency | |
| -> Day | settlementDate |
| -> Double | |
| -> Word | maxIterations |
| -> Double | guess |
| -> IO Double |
Arguments
| :: GenBond a | |
| -> InterestRate | yield |
| -> Day | |
| -> IO Double |
Arguments
| :: GenBond a | |
| -> Double | yield |
| -> DayCounter | |
| -> Compounding | |
| -> Frequency | |
| -> Day | |
| -> IO Double |
Arguments
| :: GenBond b | |
| -> Double | cleanPrice |
| -> GenYieldTermStructure a | |
| -> Compounding | |
| -> Frequency | |
| -> Day | settlementDate |
| -> Double | accuracy |
| -> Word | maxIterations |
| -> Double | guess |
| -> IO Double |
currentCleanPrice :: GenBond a -> IO Double #
theoretical clean price for the current evaluation date and term structure
theoretical dirty price The default bond settlement is used for calculation. Warning the theoretical price calculated from a flat term structure might differ slightly from the price calculated from the corresponding yield by means of the other overload of this function. If the price from a constant yield is desired, it is advisable to use such other overload.
currentDirtyPrice :: GenBond a -> IO Double #
Arguments
| :: Word | settlementDays |
| -> Double | faceAmount |
| -> Schedule | |
| -> [Double] | coupons |
| -> DayCounter | |
| -> BusinessDayConvention | |
| -> Double | redemption |
| -> Maybe Day | issueDate |
| -> [Callability] | |
| -> IO CallableBond |
Arguments
| :: Word | settlementDays |
| -> Double | faceAmount |
| -> Calendar | |
| -> Day | maturityDate |
| -> DayCounter | |
| -> BusinessDayConvention | |
| -> Double | redemption |
| -> Maybe Day | issueDate |
| -> [Callability] | |
| -> IO CallableBond |
Arguments
| :: Exercise | |
| -> Double | conversionRatio |
| -> [Callability] | |
| -> Day | issueDate |
| -> Word | settlementDays |
| -> [Double] | coupons |
| -> DayCounter | |
| -> Schedule | |
| -> Double | redemption |
| -> IO ConvertibleBond |
Arguments
| :: Exercise | |
| -> Double | conversionRatio |
| -> [Callability] | |
| -> Day | issueDate |
| -> Word | settlementDays |
| -> GenIborIndex b | |
| -> Word | fixingDays |
| -> [Double] | spreads |
| -> DayCounter | |
| -> Schedule | |
| -> Double | redemption |
| -> IO ConvertibleBond |
Arguments
| :: Exercise | |
| -> Double | conversionRatio |
| -> [Callability] | |
| -> Day | issueDate |
| -> Word | settlementDays |
| -> DayCounter | |
| -> Schedule | |
| -> Double | |
| -> IO ConvertibleBond |