| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.Instrument.Forward
Synopsis
- type Forward = GenForward CForward
- asForward :: GenForward a -> IO Forward
- type ForwardRateAgreement = GenInstrument CForwardRateAgreement
- type BondForward = GenForward CBondForward
- forwardRateAgreement :: GenIborIndex a -> Day -> Day -> PositionType -> Double -> Double -> Maybe (GenYieldTermStructure y) -> IO ForwardRateAgreement
- bondForward :: Day -> Day -> PositionType -> Double -> Word -> DayCounter -> Calendar -> BusinessDayConvention -> GenBond b -> Maybe (GenYieldTermStructure y) -> Maybe (GenYieldTermStructure y2) -> IO BondForward
- cleanForwardPrice :: BondForward -> IO Double
- forwardPrice :: BondForward -> IO Double
- forwardValue :: GenForward a -> IO Double
- impliedYield :: GenForward a -> Double -> Double -> Day -> Compounding -> DayCounter -> IO InterestRate
- settlementDate :: GenForward a -> IO Day
- spotIncome :: GenForward a -> GenYieldTermStructure y -> IO Double
- spotValue :: GenForward a -> IO Double
- forwardRate :: ForwardRateAgreement -> IO InterestRate
Documentation
type ForwardRateAgreement = GenInstrument CForwardRateAgreement #
type BondForward = GenForward CBondForward #
Arguments
| :: GenIborIndex a | |
| -> Day | valueDate |
| -> Day | maturityDate |
| -> PositionType | |
| -> Double | strikeForwardRate |
| -> Double | notionalAmount |
| -> Maybe (GenYieldTermStructure y) | discountCurve |
| -> IO ForwardRateAgreement |
Arguments
| :: Day | valueDate |
| -> Day | maturityDate |
| -> PositionType | |
| -> Double | strike |
| -> Word | settlementDays |
| -> DayCounter | |
| -> Calendar | |
| -> BusinessDayConvention | |
| -> GenBond b | |
| -> Maybe (GenYieldTermStructure y) | discountCurve |
| -> Maybe (GenYieldTermStructure y2) | incomeDiscountCurve |
| -> IO BondForward |
If strike is given in the constructor, can calculate the NPV of the contract via NPV().If strike/forward price is desired, it can be obtained via forwardPrice(). In this case, the strike variable in the constructor is irrelevant and will be ignored.
cleanForwardPrice :: BondForward -> IO Double #
(dirty) forward bond price minus accrued on bond at delivery
(dirty) forward bond price
forwardPrice :: BondForward -> IO Double #
forward valueprice of underlying, discounting incomedividends if this is a bond forward price, is must be a dirty forward price.
forwardValue :: GenForward a -> IO Double #
Simple yield calculation based on underlying spot and forward values, taking into account underlying income. When $ t>0 $, call with: underlyingSpotValue=spotValue(t), forwardValue=strikePrice, to get current yield. For a repo, if $ t=0 $, impliedYield should reproduce the spot repo rate. For FRA's, this should reproduce the relevant zero rate at the FRA's maturityDate_;
Arguments
| :: GenForward a | |
| -> Double | underlyingSpotValue |
| -> Double | forwarValue |
| -> Day | settlementDate |
| -> Compounding | |
| -> DayCounter | |
| -> IO InterestRate |
settlementDate :: GenForward a -> IO Day #
NPV of incomedividendsstorage-costs etc. of underlying instrument.
spotIncome :: GenForward a -> GenYieldTermStructure y -> IO Double #
returns spot value/price of an underlying financial instrument