QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
floatingratebond.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2007 Ferdinando Ametrano
5 Copyright (C) 2007 Chiara Fornarola
6
7 This file is part of QuantLib, a free-software/open-source library
8 for financial quantitative analysts and developers - http://quantlib.org/
9
10 QuantLib is free software: you can redistribute it and/or modify it
11 under the terms of the QuantLib license. You should have received a
12 copy of the license along with this program; if not, please email
13 <quantlib-dev@lists.sf.net>. The license is also available online at
14 <http://quantlib.org/license.shtml>.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the license for more details.
19*/
20
21/*! \file floatingratebond.hpp
22 \brief floating-rate bond
23*/
24
25#ifndef quantlib_floating_rate_bond_hpp
26#define quantlib_floating_rate_bond_hpp
27
30
31namespace QuantLib {
32
33 class Schedule;
34 class IborIndex;
35
36 //! floating-rate bond (possibly capped and/or floored)
37 /*! \ingroup instruments
38
39 \test calculations are tested by checking results against
40 cached values.
41 */
42 class FloatingRateBond : public Bond {
43 public:
45 Real faceAmount,
46 Schedule schedule,
47 const ext::shared_ptr<IborIndex>& iborIndex,
48 const DayCounter& accrualDayCounter,
49 BusinessDayConvention paymentConvention = Following,
50 Natural fixingDays = Null<Natural>(),
51 const std::vector<Real>& gearings = { 1.0 },
52 const std::vector<Spread>& spreads = { 0.0 },
53 const std::vector<Rate>& caps = {},
54 const std::vector<Rate>& floors = {},
55 bool inArrears = false,
56 Real redemption = 100.0,
57 const Date& issueDate = Date(),
58 const Period& exCouponPeriod = Period(),
59 const Calendar& exCouponCalendar = Calendar(),
60 BusinessDayConvention exCouponConvention = Unadjusted,
61 bool exCouponEndOfMonth = false);
62 };
63
64}
65
66#endif
concrete bond class
Base bond class.
Definition: bond.hpp:59
Natural settlementDays() const
Definition: bond.hpp:332
Date issueDate() const
Definition: bond.hpp:352
const ext::shared_ptr< CashFlow > & redemption() const
Definition: bond.cpp:140
calendar class
Definition: calendar.hpp:61
Concrete date class.
Definition: date.hpp:125
day counter class
Definition: daycounter.hpp:44
floating-rate bond (possibly capped and/or floored)
template class providing a null value for a given type.
Definition: null.hpp:76
Payment schedule.
Definition: schedule.hpp:40
date generation rule
BusinessDayConvention
Business Day conventions.
QL_REAL Real
real number
Definition: types.hpp:50
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
Definition: any.hpp:35