QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
bkbm.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4Copyright (C) 2016 Fabrice Lecuyer
5
6This file is part of QuantLib, a free-software/open-source library
7for financial quantitative analysts and developers - http://quantlib.org/
8
9QuantLib is free software: you can redistribute it and/or modify it
10under the terms of the QuantLib license. You should have received a
11copy 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
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file bkbm.hpp
21\brief %Bkbm index
22*/
23
24#ifndef quantlib_bkbm_hpp
25#define quantlib_bkbm_hpp
26
31
32namespace QuantLib {
33
34 //! %Bkbm index
35 /*! Bkbm rate fixed by NZFMA.
36
37 See <http://www.nzfma.org/Site/data/default.aspx>.
38 */
39 class Bkbm : public IborIndex {
40 public:
42 const Handle<YieldTermStructure>& h = {})
43 : IborIndex("Bkbm", tenor,
44 0, // settlement days
47 Actual365Fixed(), h) {
48 QL_REQUIRE(this->tenor().units() != Days,
49 "for daily tenors (" << this->tenor() <<
50 ") dedicated DailyTenor constructor must be used");
51 }
52 };
53
54 //! 1-month %Bkbm index
55 class Bkbm1M : public Bkbm {
56 public:
57 explicit Bkbm1M(const Handle<YieldTermStructure>& h = {})
58 : Bkbm(Period(1, Months), h) {}
59 };
60
61 //! 2-months %Bkbm index
62 class Bkbm2M : public Bkbm {
63 public:
64 explicit Bkbm2M(const Handle<YieldTermStructure>& h = {})
65 : Bkbm(Period(2, Months), h) {}
66 };
67
68 //! 3-months %Bkbm index
69 class Bkbm3M : public Bkbm {
70 public:
71 explicit Bkbm3M(const Handle<YieldTermStructure>& h = {})
72 : Bkbm(Period(3, Months), h) {}
73 };
74
75 //! 4-months %Bkbm index
76 class Bkbm4M : public Bkbm {
77 public:
78 explicit Bkbm4M(const Handle<YieldTermStructure>& h = {})
79 : Bkbm(Period(4, Months), h) {}
80 };
81
82 //! 5-months %Bkbm index
83 class Bkbm5M : public Bkbm {
84 public:
85 explicit Bkbm5M(const Handle<YieldTermStructure>& h = {})
86 : Bkbm(Period(5, Months), h) {}
87 };
88
89 //! 6-months %Bkbm index
90 class Bkbm6M : public Bkbm {
91 public:
92 explicit Bkbm6M(const Handle<YieldTermStructure>& h = {})
93 : Bkbm(Period(6, Months), h) {}
94 };
95
96}
97
98#endif
Actual/365 (Fixed) day counter.
Actual/365 (Fixed) day count convention.
1-month Bkbm index
Definition: bkbm.hpp:55
Bkbm1M(const Handle< YieldTermStructure > &h={})
Definition: bkbm.hpp:57
2-months Bkbm index
Definition: bkbm.hpp:62
Bkbm2M(const Handle< YieldTermStructure > &h={})
Definition: bkbm.hpp:64
3-months Bkbm index
Definition: bkbm.hpp:69
Bkbm3M(const Handle< YieldTermStructure > &h={})
Definition: bkbm.hpp:71
4-months Bkbm index
Definition: bkbm.hpp:76
Bkbm4M(const Handle< YieldTermStructure > &h={})
Definition: bkbm.hpp:78
5-months Bkbm index
Definition: bkbm.hpp:83
Bkbm5M(const Handle< YieldTermStructure > &h={})
Definition: bkbm.hpp:85
6-months Bkbm index
Definition: bkbm.hpp:90
Bkbm6M(const Handle< YieldTermStructure > &h={})
Definition: bkbm.hpp:92
Bkbm index
Definition: bkbm.hpp:39
Bkbm(const Period &tenor, const Handle< YieldTermStructure > &h={})
Definition: bkbm.hpp:41
Shared handle to an observable.
Definition: handle.hpp:41
base class for Inter-Bank-Offered-Rate indexes (e.g. Libor, etc.)
Definition: iborindex.hpp:35
New Zealand dollar.
Definition: oceania.hpp:56
New Zealand calendar.
Definition: newzealand.hpp:59
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Definition: errors.hpp:117
base class for Inter-Bank-Offered-Rate indexes
Definition: any.hpp:35
New Zealand calendar.
Oceanian currencies.