hasquant
Safe HaskellNone
LanguageHaskell2010

QuantLib.Instrument.Forward

Synopsis

Documentation

type Forward = GenForward CForward #

asForward :: GenForward a -> IO Forward #

type ForwardRateAgreement = GenInstrument CForwardRateAgreement #

type BondForward = GenForward CBondForward #

forwardRateAgreement #

Arguments

:: GenIborIndex a 
-> Day

valueDate

-> Day

maturityDate

-> PositionType 
-> Double

strikeForwardRate

-> Double

notionalAmount

-> Maybe (GenYieldTermStructure y)

discountCurve

-> IO ForwardRateAgreement 

bondForward #

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_;

impliedYield #

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

spotValue :: GenForward a -> IO Double #

Returns the relevant forward rate associated with the FRA term.