|
QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
|
Forward rate agreement (FRA) class More...
#include <ql/instruments/forwardrateagreement.hpp>
Public Member Functions | |
| ForwardRateAgreement (const ext::shared_ptr< IborIndex > &index, const Date &valueDate, Position::Type type, Rate strikeForwardRate, Real notionalAmount, Handle< YieldTermStructure > discountCurve={}) | |
| ForwardRateAgreement (const ext::shared_ptr< IborIndex > &index, const Date &valueDate, const Date &maturityDate, Position::Type type, Rate strikeForwardRate, Real notionalAmount, Handle< YieldTermStructure > discountCurve={}) | |
| Public Member Functions inherited from Instrument | |
| Real | NPV () const |
| returns the net present value of the instrument. | |
| Real | errorEstimate () const |
| returns the error estimate on the NPV when available. | |
| const Date & | valuationDate () const |
| returns the date the net present value refers to. | |
| template<typename T> | |
| T | result (const std::string &tag) const |
| returns any additional result returned by the pricing engine. | |
| const std::map< std::string, ext::any > & | additionalResults () const |
| returns all additional result returned by the pricing engine. | |
| void | setPricingEngine (const ext::shared_ptr< PricingEngine > &) |
| set the pricing engine to be used. | |
| virtual void | setupArguments (PricingEngine::arguments *) const |
| virtual void | fetchResults (const PricingEngine::results *) const |
| Public Member Functions inherited from LazyObject | |
| void | update () override |
| bool | isCalculated () const |
| void | forwardFirstNotificationOnly () |
| void | alwaysForwardNotifications () |
| void | recalculate () |
| void | freeze () |
| void | unfreeze () |
| Public Member Functions inherited from Observable | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| Observable (Observable &&)=delete | |
| Observable & | operator= (Observable &&)=delete |
| void | notifyObservers () |
| Public Member Functions inherited from Observer | |
| Observer (const Observer &) | |
| Observer & | operator= (const Observer &) |
| std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
| void | registerWithObservables (const ext::shared_ptr< Observer > &) |
| Size | unregisterWith (const ext::shared_ptr< Observable > &) |
| void | unregisterWithAll () |
| virtual void | deepUpdate () |
Calculations | |
| Position::Type | fraType_ |
| InterestRate | forwardRate_ |
| aka FRA rate (the market forward rate) | |
| InterestRate | strikeForwardRate_ |
| aka FRA fixing rate, contract rate | |
| Real | notionalAmount_ |
| ext::shared_ptr< IborIndex > | index_ |
| bool | useIndexedCoupon_ |
| DayCounter | dayCounter_ |
| Calendar | calendar_ |
| BusinessDayConvention | businessDayConvention_ |
| Date | valueDate_ |
| the valueDate is the date the underlying index starts accruing and the FRA is settled. | |
| Date | maturityDate_ |
| maturityDate of the underlying index; not the date the FRA is settled. | |
| Handle< YieldTermStructure > | discountCurve_ |
| bool | isExpired () const override |
| A FRA expires/settles on the value date. | |
| Real | amount () const |
| The payoff on the value date. | |
| const Calendar & | calendar () const |
| BusinessDayConvention | businessDayConvention () const |
| const DayCounter & | dayCounter () const |
| Handle< YieldTermStructure > | discountCurve () const |
| term structure relevant to the contract (e.g. repo curve) | |
| Date | fixingDate () const |
| InterestRate | forwardRate () const |
| Returns the relevant forward rate associated with the FRA term. | |
| void | setupExpired () const override |
| void | performCalculations () const override |
Additional Inherited Members | |
| Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
| Protected Member Functions inherited from Instrument | |
| void | calculate () const override |
| void | performCalculations () const override |
| Protected Attributes inherited from Instrument | |
| Real | NPV_ |
| Real | errorEstimate_ |
| Date | valuationDate_ |
| std::map< std::string, ext::any > | additionalResults_ |
| ext::shared_ptr< PricingEngine > | engine_ |
| bool | calculated_ = false |
| bool | frozen_ = false |
| bool | alwaysForward_ |
Forward rate agreement (FRA) class
Example: valuation of a forward-rate agreement
| ForwardRateAgreement | ( | const ext::shared_ptr< IborIndex > & | index, |
| const Date & | valueDate, | ||
| Position::Type | type, | ||
| Rate | strikeForwardRate, | ||
| Real | notionalAmount, | ||
| Handle< YieldTermStructure > | discountCurve = {} ) |
When using this constructor, the forward rate will be forecast by the passed index. This corresponds to useIndexedCoupon=true in the FraRateHelper class.
| ForwardRateAgreement | ( | const ext::shared_ptr< IborIndex > & | index, |
| const Date & | valueDate, | ||
| const Date & | maturityDate, | ||
| Position::Type | type, | ||
| Rate | strikeForwardRate, | ||
| Real | notionalAmount, | ||
| Handle< YieldTermStructure > | discountCurve = {} ) |
When using this constructor, a par-rate approximation will be used, i.e., the forward rate will be forecast from value date to maturity date by the forecast curve contained in the index. This corresponds to useIndexedCoupon=false in the FraRateHelper class.
|
overridevirtual |
A FRA expires/settles on the value date.
Implements Instrument.
|
overrideprotectedvirtual |
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented from Instrument.
|
overrideprotectedvirtual |
This method must implement any calculations which must be (re)done in order to calculate the desired results.
Implements LazyObject.