QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
bbsw.hpp
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
24#ifndef quantlib_bbsw_hpp
25#define quantlib_bbsw_hpp
26
27#include <ql/indexes/iborindex.hpp>
28#include <ql/time/calendars/australia.hpp>
29#include <ql/time/daycounters/actual365fixed.hpp>
30#include <ql/currencies/oceania.hpp>
31
32namespace QuantLib {
33
35
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
55 class Bbsw1M : public Bbsw {
56 public:
57 explicit Bbsw1M(const Handle<YieldTermStructure>& h = {})
58 : Bbsw(Period(1, Months), h) {}
59 };
60
62 class Bbsw2M : public Bbsw {
63 public:
64 explicit Bbsw2M(const Handle<YieldTermStructure>& h = {})
65 : Bbsw(Period(2, Months), h) {}
66 };
67
69 class Bbsw3M : public Bbsw {
70 public:
71 explicit Bbsw3M(const Handle<YieldTermStructure>& h = {})
72 : Bbsw(Period(3, Months), h) {}
73 };
74
76 class Bbsw4M : public Bbsw {
77 public:
78 explicit Bbsw4M(const Handle<YieldTermStructure>& h = {})
79 : Bbsw(Period(4, Months), h) {}
80 };
81
83 class Bbsw5M : public Bbsw {
84 public:
85 explicit Bbsw5M(const Handle<YieldTermStructure>& h = {})
86 : Bbsw(Period(5, Months), h) {}
87 };
88
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
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
Definition: any.hpp:35