hasquant
Safe HaskellNone
LanguageHaskell2010

QuantLib.Instrument.Forward

Synopsis

Types

type GenForward f = GenInstrument (AnyOf CForward' f) Source #

type Forward = GenForward CForward Source #

An Instrument; see the hierarchy under GenInstrument.

type ForwardRateAgreement = GenInstrument CForwardRateAgreement Source #

An Instrument; see the hierarchy under GenInstrument.

type BondForward = GenForward CBondForward Source #

A Forward; see the hierarchy under GenInstrument.

type FxForward = GenInstrument CFxForward Source #

An Instrument; see the hierarchy under GenInstrument.

Constructors

forwardRateAgreement Source #

Arguments

:: GenIborIndex ibor 
-> Day

valueDate

-> Day

maturityDate

-> PositionType 
-> Double

strikeForwardRate

-> Double

notionalAmount

-> Maybe (GenYieldTermStructure y)

discountCurve

-> IO ForwardRateAgreement 

FRA with a par-rate approximation: the forward rate is forecast from valueDate to maturityDate by the index's forecast curve (useIndexedCoupon=false).

bondForward Source #

Arguments

:: Day

valueDate

-> Day

maturityDate

-> PositionType 
-> Double

strike

-> Word

settlementDays

-> DayCounter 
-> Calendar 
-> BusinessDayConvention 
-> GenBond b 
-> Maybe (GenYieldTermStructure y1)

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.

fxForward Source #

Arguments

:: Double

sourceNominal

-> Currency

sourceCurrency

-> Double

targetNominal

-> Currency

targetCurrency

-> Day

maturityDate

-> Bool

paySourceCurrency

-> Word

settlementDays

-> Calendar

paymentCalendar

-> IO FxForward 

FX forward using nominal amounts in both currencies.

fxForwardFromRate Source #

Arguments

:: Double

sourceNominal

-> Currency

sourceCurrency

-> Currency

targetCurrency

-> Double

forwardRate

-> Day

maturityDate

-> Bool

paySourceCurrency

-> Word

settlementDays

-> Calendar

paymentCalendar

-> IO FxForward 

FX forward using a source nominal amount and a contracted forward rate (target/source).

Inspectors

cleanForwardPrice :: BondForward -> IO Double Source #

(dirty) forward bond price minus accrued on bond at delivery

forwardPrice :: BondForward -> IO Double Source #

(dirty) forward bond price

forwardValue :: GenForward f -> IO Double Source #

forward valueprice of underlying, discounting incomedividends if this is a bond forward price, is must be a dirty forward price.

impliedYield Source #

Arguments

:: GenForward f 
-> Double

underlyingSpotValue

-> Double

forwarValue

-> Day

settlementDate

-> Compounding 
-> DayCounter 
-> IO InterestRate 

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

settlementDate :: GenForward f -> IO Day Source #

Date on which the forward contract settles.

spotIncome :: GenForward f -> GenYieldTermStructure y -> IO Double Source #

NPV of incomedividendsstorage-costs etc. of underlying instrument.

spotValue :: GenForward f -> IO Double Source #

returns spot value/price of an underlying financial instrument

amount :: ForwardRateAgreement -> IO Double Source #

The payoff on the value date: the discounted difference between the FRA's forward rate and its strike (contract) rate, scaled by the notional and accrual, negated for a short position.

forwardRate :: ForwardRateAgreement -> IO InterestRate Source #

Returns the relevant forward rate associated with the FRA term.

fxForwardRate :: FxForward -> Double Source #

The contracted forward exchange rate (target/source), computed as targetNominal / sourceNominal -- distinct from fairForwardRate, the market-implied rate.

fairForwardRate :: FxForward -> IO Double Source #

The market-implied fair forward rate, computed by the pricing engine.

npvSourceCurrency :: FxForward -> IO Double Source #

NPV in source currency terms.

npvTargetCurrency :: FxForward -> IO Double Source #

NPV in target currency terms.