QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
amortizingfixedratebond.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) 2008 Simon Ibbotson
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file amortizingfixedratebond.hpp
21 \brief amortizing fixed-rate bond
22*/
23
24#ifndef quantlib_amortizing_fixed_rate_bond_hpp
25#define quantlib_amortizing_fixed_rate_bond_hpp
26
29#include <ql/time/schedule.hpp>
30#include <ql/interestrate.hpp>
31
32namespace QuantLib {
33
34 //! amortizing fixed-rate bond
36 public:
38 const std::vector<Real>& notionals,
39 Schedule schedule,
40 const std::vector<Rate>& coupons,
41 const DayCounter& accrualDayCounter,
42 BusinessDayConvention paymentConvention = Following,
43 const Date& issueDate = Date(),
44 const Period& exCouponPeriod = Period(),
45 const Calendar& exCouponCalendar = Calendar(),
46 BusinessDayConvention exCouponConvention = Unadjusted,
47 bool exCouponEndOfMonth = false,
48 const std::vector<Real>& redemptions = { 100.0 },
49 Integer paymentLag = 0);
50
51 Frequency frequency() const { return frequency_; }
52 const DayCounter& dayCounter() const { return dayCounter_; }
53 protected:
56 };
57
58 //! returns a schedule for French amortization
59 Schedule sinkingSchedule(const Date& startDate,
60 const Period& bondLength,
61 const Frequency& frequency,
62 const Calendar& paymentCalendar);
63
64 //! returns a sequence of notionals for French amortization
65 std::vector<Real> sinkingNotionals(const Period& bondLength,
66 const Frequency& frequency,
67 Rate couponRate,
68 Real initialNotional);
69
70}
71
72#endif
concrete bond class
Base bond class.
Definition: bond.hpp:59
const std::vector< Real > & notionals() const
Definition: bond.hpp:340
Natural settlementDays() const
Definition: bond.hpp:332
Date issueDate() const
Definition: bond.hpp:352
const Leg & redemptions() const
Definition: bond.hpp:348
calendar class
Definition: calendar.hpp:61
Concrete date class.
Definition: date.hpp:125
day counter class
Definition: daycounter.hpp:44
Payment schedule.
Definition: schedule.hpp:40
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
QL_INTEGER Integer
integer number
Definition: types.hpp:35
Real Rate
interest rates
Definition: types.hpp:70
Instrument rate class.
Definition: any.hpp:35
Schedule sinkingSchedule(const Date &startDate, const Period &bondLength, const Frequency &frequency, const Calendar &paymentCalendar)
returns a schedule for French amortization
std::vector< Real > sinkingNotionals(const Period &bondLength, const Frequency &sinkingFrequency, Rate couponRate, Real initialNotional)
returns a sequence of notionals for French amortization
date schedule