QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
fixedratebond.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) 2004 Jeff Yu
5 Copyright (C) 2004 M-Dimension Consulting Inc.
6 Copyright (C) 2005 StatPro Italia srl
7 Copyright (C) 2007, 2008, 2010 Ferdinando Ametrano
8 Copyright (C) 2009 Piter Dias
9
10 This file is part of QuantLib, a free-software/open-source library
11 for financial quantitative analysts and developers - http://quantlib.org/
12
13 QuantLib is free software: you can redistribute it and/or modify it
14 under the terms of the QuantLib license. You should have received a
15 copy of the license along with this program; if not, please email
16 <quantlib-dev@lists.sf.net>. The license is also available online at
17 <http://quantlib.org/license.shtml>.
18
19 This program is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21 FOR A PARTICULAR PURPOSE. See the license for more details.
22*/
23
24/*! \file fixedratebond.hpp
25 \brief fixed-rate bond
26*/
27
28#ifndef quantlib_fixed_rate_bond_hpp
29#define quantlib_fixed_rate_bond_hpp
30
34#include <ql/interestrate.hpp>
35
36namespace QuantLib {
37
38 class Schedule;
39
40 //! fixed-rate bond
41 /*! \ingroup instruments
42
43 \test calculations are tested by checking results against
44 cached values.
45 */
46 class FixedRateBond : public Bond {
47 public:
48 //! simple annual compounding coupon rates
50 Real faceAmount,
51 Schedule schedule,
52 const std::vector<Rate>& coupons,
53 const DayCounter& accrualDayCounter,
54 BusinessDayConvention paymentConvention = Following,
55 Real redemption = 100.0,
56 const Date& issueDate = Date(),
57 const Calendar& paymentCalendar = Calendar(),
58 const Period& exCouponPeriod = Period(),
59 const Calendar& exCouponCalendar = Calendar(),
60 BusinessDayConvention exCouponConvention = Unadjusted,
61 bool exCouponEndOfMonth = false,
63
64 Frequency frequency() const { return frequency_; }
65 const DayCounter& dayCounter() const { return dayCounter_; }
67 protected:
71 };
72
73}
74
75#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
const DayCounter & dayCounter() const
DayCounter firstPeriodDayCounter_
const DayCounter & firstPeriodDayCounter() const
Frequency frequency() const
Payment schedule.
Definition: schedule.hpp:40
date generation rule
day counter class
Frequency
Frequency of events.
Definition: frequency.hpp:37
BusinessDayConvention
Business Day conventions.
QL_REAL Real
real number
Definition: types.hpp:50
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
Instrument rate class.
Definition: any.hpp:35