29 const Date& maturityDate,
31 Rate strikeForwardRate,
33 const ext::shared_ptr<IborIndex>& index,
35 bool useIndexedCoupon)
37 notionalAmount,
std::move(discountCurve)) {
43 Rate strikeForwardRate,
45 const ext::shared_ptr<IborIndex>& index,
48 notionalAmount,
std::move(discountCurve)) {}
51 const Date& valueDate,
53 Rate strikeForwardRate,
57 strikeForwardRate, notionalAmount,
std::move(discountCurve)) {
62 const Date& valueDate,
63 const Date& maturityDate,
65 Rate strikeForwardRate,
68 : fraType_(type), notionalAmount_(notionalAmount), index_(index),
69 useIndexedCoupon_(false), dayCounter_(index->dayCounter()),
70 calendar_(index->fixingCalendar()), businessDayConvention_(index->businessDayConvention()),
71 valueDate_(valueDate), maturityDate_(maturityDate),
79 QL_REQUIRE(notionalAmount > 0.0,
"notionalAmount must be positive");
const YieldTermStructure & discountCurve_
Date adjust(const Date &, BusinessDayConvention convention=Following) const
Time yearFraction(const Date &, const Date &, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date()) const
Returns the period between two dates as a fraction of year.
virtual bool hasOccurred(const Date &refDate=Date(), ext::optional< bool > includeRefDate=ext::nullopt) const
returns true if an event has already occurred before a date
Forward rate agreement (FRA) class
void performCalculations() const override
Handle< YieldTermStructure > discountCurve_
InterestRate strikeForwardRate_
aka FRA fixing rate, contract rate
void calculateForwardRate() const
bool isExpired() const override
A FRA expires/settles on the value date.
QL_DEPRECATED ForwardRateAgreement(const Date &valueDate, const Date &maturityDate, Position::Type type, Rate strikeForwardRate, Real notionalAmount, const ext::shared_ptr< IborIndex > &index, Handle< YieldTermStructure > discountCurve={}, bool useIndexedCoupon=true)
InterestRate forwardRate_
aka FRA rate (the market forward rate)
void calculateAmount() const
void setupExpired() const override
Date maturityDate_
maturityDate of the underlying index; not the date the FRA is settled.
Real amount() const
The payoff on the value date.
Date valueDate_
the valueDate is the date the underlying index starts accruing and the FRA is settled.
InterestRate forwardRate() const
Returns the relevant forward rate associated with the FRA term.
BusinessDayConvention businessDayConvention_
ext::shared_ptr< IborIndex > index_
Shared handle to an observable.
void calculate() const override
virtual void setupExpired() const
Concrete interest rate class.
const DayCounter & dayCounter() const
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
static Settings & instance()
access to the unique instance
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Base class for events associated with a given date.
@ Once
only once, e.g., a zero-coupon
Real Time
continuous quantity with 1-year units
QL_INTEGER Integer
integer number
base class for Inter-Bank-Offered-Rate indexes