29#ifndef quantlib_bond_hpp
30#define quantlib_bond_hpp
86 const Leg& coupons =
Leg());
117 const std::vector<Real>&
notionals()
const;
125 const ext::shared_ptr<CashFlow>&
redemption()
const;
173 Real accuracy = 1.0e-8,
174 Size maxEvaluations = 100,
201 [[deprecated(
"Use the overload taking a Bond::Price argument instead")]]
207 Real accuracy = 1.0e-8,
208 Size maxEvaluations = 100,
219 Real accuracy = 1.0e-8,
220 Size maxEvaluations = 100,
221 Real guess = 0.05)
const;
270 = std::vector<Real>());
Base class for cash flows.
Price(Real amount, Type type)
void validate() const override
Real cleanPrice() const
theoretical clean price
void setupArguments(PricingEngine::arguments *) const override
const std::vector< Real > & notionals() const
Rate previousCouponRate(Date d=Date()) const
Previous coupon already paid at a given date.
Natural settlementDays() const
bool isExpired() const override
returns whether the instrument might have value greater than zero.
void addRedemptionsToCashflows(const std::vector< Real > &redemptions=std::vector< Real >())
Rate yield(const DayCounter &dc, Compounding comp, Frequency freq, Real accuracy=1.0e-8, Size maxEvaluations=100, Real guess=0.05, Bond::Price::Type priceType=Bond::Price::Clean) const
theoretical bond yield
virtual Real accruedAmount(Date d=Date()) const
accrued amount at a given date
void deepUpdate() override
const Calendar & calendar() const
const Leg & cashflows() const
Date nextCashFlowDate(Date d=Date()) const
Real settlementValue() const
theoretical settlement value
std::vector< Real > notionals_
Real dirtyPrice() const
theoretical dirty price
const ext::shared_ptr< CashFlow > & redemption() const
void setSingleRedemption(Real notional, Real redemption, const Date &date)
Date previousCashFlowDate(Date d=Date()) const
Date maturityDate() const
bool isTradable(Date d=Date()) const
const Leg & redemptions() const
void setupExpired() const override
void fetchResults(const PricingEngine::results *) const override
std::vector< Date > notionalSchedule_
void calculateNotionalsFromCashflows()
virtual Real notional(Date d=Date()) const
Date settlementDate(Date d=Date()) const
virtual Rate nextCouponRate(Date d=Date()) const
template base class for option pricing engines
Abstract instrument class.
template class providing a null value for a given type.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Frequency
Frequency of events.
unsigned QL_INTEGER Natural
positive integer
std::size_t Size
size of a container
Abstract instrument class.
Compounding
Interest rate coumpounding rule.
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.