QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
bbsw.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 bbsw.hpp
21 \brief %Bbsw index
22*/
23
24#ifndef quantlib_bbsw_hpp
25#define quantlib_bbsw_hpp
26
31
32namespace QuantLib {
33
34 //! %Bbsw index
35 /*! Bbsw rate fixed by AFMA.
36
37 See <http://www.afma.com.au/data/BBSW>.
38 */
39 class Bbsw : public IborIndex {
40 public:
42 const Handle<YieldTermStructure>& h = {})
43 : IborIndex("Bbsw", 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 %Bbsw index
55 class Bbsw1M : public Bbsw {
56 public:
57 explicit Bbsw1M(const Handle<YieldTermStructure>& h = {})
58 : Bbsw(Period(1, Months), h) {}
59 };
60
61 //! 2-months %Bbsw index
62 class Bbsw2M : public Bbsw {
63 public:
64 explicit Bbsw2M(const Handle<YieldTermStructure>& h = {})
65 : Bbsw(Period(2, Months), h) {}
66 };
67
68 //! 3-months %Bbsw index
69 class Bbsw3M : public Bbsw {
70 public:
71 explicit Bbsw3M(const Handle<YieldTermStructure>& h = {})
72 : Bbsw(Period(3, Months), h) {}
73 };
74
75 //! 4-months %Bbsw index
76 class Bbsw4M : public Bbsw {
77 public:
78 explicit Bbsw4M(const Handle<YieldTermStructure>& h = {})
79 : Bbsw(Period(4, Months), h) {}
80 };
81
82 //! 5-months %Bbsw index
83 class Bbsw5M : public Bbsw {
84 public:
85 explicit Bbsw5M(const Handle<YieldTermStructure>& h = {})
86 : Bbsw(Period(5, Months), h) {}
87 };
88
89 //! 6-months %Bbsw index
90 class Bbsw6M : public Bbsw {
91 public:
92 explicit Bbsw6M(const Handle<YieldTermStructure>& h = {})
93 : Bbsw(Period(6, Months), h) {}
94 };
95
96}
97
98#endif
Actual/365 (Fixed) day counter.
Australian calendar.
Australian dollar.
Definition: oceania.hpp:45
Actual/365 (Fixed) day count convention.
Australian calendar.
Definition: australia.hpp:52
1-month Bbsw index
Definition: bbsw.hpp:55
Bbsw1M(const Handle< YieldTermStructure > &h={})
Definition: bbsw.hpp:57
2-months Bbsw index
Definition: bbsw.hpp:62
Bbsw2M(const Handle< YieldTermStructure > &h={})
Definition: bbsw.hpp:64
3-months Bbsw index
Definition: bbsw.hpp:69
Bbsw3M(const Handle< YieldTermStructure > &h={})
Definition: bbsw.hpp:71
4-months Bbsw index
Definition: bbsw.hpp:76
Bbsw4M(const Handle< YieldTermStructure > &h={})
Definition: bbsw.hpp:78
5-months Bbsw index
Definition: bbsw.hpp:83
Bbsw5M(const Handle< YieldTermStructure > &h={})
Definition: bbsw.hpp:85
6-months Bbsw index
Definition: bbsw.hpp:90
Bbsw6M(const Handle< YieldTermStructure > &h={})
Definition: bbsw.hpp:92
Bbsw index
Definition: bbsw.hpp:39
Bbsw(const Period &tenor, const Handle< YieldTermStructure > &h={})
Definition: bbsw.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
#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
Oceanian currencies.