QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
indexes
swap
euriborswap.cpp
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) 2006, 2007, 2008, 2009 Ferdinando Ametrano
5
Copyright (C) 2006 Katiuscia Manzoni
6
7
This file is part of QuantLib, a free-software/open-source library
8
for financial quantitative analysts and developers - http://quantlib.org/
9
10
QuantLib is free software: you can redistribute it and/or modify it
11
under the terms of the QuantLib license. You should have received a
12
copy of the license along with this program; if not, please email
13
<quantlib-dev@lists.sf.net>. The license is also available online at
14
<http://quantlib.org/license.shtml>.
15
16
This program is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18
FOR A PARTICULAR PURPOSE. See the license for more details.
19
*/
20
21
#include <
ql/indexes/swap/euriborswap.hpp
>
22
#include <
ql/indexes/ibor/euribor.hpp
>
23
#include <
ql/time/calendars/target.hpp
>
24
#include <
ql/time/daycounters/thirty360.hpp
>
25
#include <
ql/currencies/europe.hpp
>
26
27
namespace
QuantLib
{
28
29
EuriborSwapIsdaFixA::EuriborSwapIsdaFixA
(
30
const
Period
& tenor,
31
const
Handle<YieldTermStructure>
& h)
32
:
SwapIndex
(
"EuriborSwapIsdaFixA"
,
// familyName
33
tenor,
34
2,
// settlementDays
35
EURCurrency
(),
36
TARGET
(),
37
1*
Years
,
// fixedLegTenor
38
ModifiedFollowing
,
// fixedLegConvention
39
Thirty360
(
Thirty360
::BondBasis),
// fixedLegDaycounter
40
tenor > 1*
Years
?
41
ext::shared_ptr<
IborIndex
>(new
Euribor
(6*
Months
, h)) :
42
ext::shared_ptr<
IborIndex
>(new
Euribor
(3*
Months
, h))) {}
43
44
EuriborSwapIsdaFixA::EuriborSwapIsdaFixA
(
45
const
Period
& tenor,
46
const
Handle<YieldTermStructure>
& forwarding,
47
const
Handle<YieldTermStructure>
& discounting)
48
:
SwapIndex
(
"EuriborSwapIsdaFixA"
,
// familyName
49
tenor,
50
2,
// settlementDays
51
EURCurrency
(),
52
TARGET
(),
53
1*
Years
,
// fixedLegTenor
54
ModifiedFollowing
,
// fixedLegConvention
55
Thirty360
(
Thirty360
::BondBasis),
// fixedLegDaycounter
56
tenor > 1*
Years
?
57
ext::shared_ptr<
IborIndex
>(new
Euribor
(6*
Months
, forwarding)) :
58
ext::shared_ptr<
IborIndex
>(new
Euribor
(3*
Months
, forwarding)),
59
discounting) {}
60
61
EuriborSwapIsdaFixB::EuriborSwapIsdaFixB
(
62
const
Period
& tenor,
63
const
Handle<YieldTermStructure>
& h)
64
:
SwapIndex
(
"EuriborSwapIsdaFixB"
,
// familyName
65
tenor,
66
2,
// settlementDays
67
EURCurrency
(),
68
TARGET
(),
69
1*
Years
,
// fixedLegTenor
70
ModifiedFollowing
,
// fixedLegConvention
71
Thirty360
(
Thirty360
::BondBasis),
// fixedLegDaycounter
72
tenor > 1*
Years
?
73
ext::shared_ptr<
IborIndex
>(new
Euribor
(6*
Months
, h)) :
74
ext::shared_ptr<
IborIndex
>(new
Euribor
(3*
Months
, h))) {}
75
76
EuriborSwapIsdaFixB::EuriborSwapIsdaFixB
(
77
const
Period
& tenor,
78
const
Handle<YieldTermStructure>
& forwarding,
79
const
Handle<YieldTermStructure>
& discounting)
80
:
SwapIndex
(
"EuriborSwapIsdaFixB"
,
// familyName
81
tenor,
82
2,
// settlementDays
83
EURCurrency
(),
84
TARGET
(),
85
1*
Years
,
// fixedLegTenor
86
ModifiedFollowing
,
// fixedLegConvention
87
Thirty360
(
Thirty360
::BondBasis),
// fixedLegDaycounter
88
tenor > 1*
Years
?
89
ext::shared_ptr<
IborIndex
>(new
Euribor
(6*
Months
, forwarding)) :
90
ext::shared_ptr<
IborIndex
>(new
Euribor
(3*
Months
, forwarding)),
91
discounting) {}
92
93
94
EuriborSwapIfrFix::EuriborSwapIfrFix
(
const
Period
& tenor,
95
const
Handle<YieldTermStructure>
& h)
96
:
SwapIndex
(
"EuriborSwapIfrFix"
,
// familyName
97
tenor,
98
2,
// settlementDays
99
EURCurrency
(),
100
TARGET
(),
101
1*
Years
,
// fixedLegTenor
102
ModifiedFollowing
,
// fixedLegConvention
103
Thirty360
(
Thirty360
::BondBasis),
// fixedLegDaycounter
104
tenor > 1*
Years
?
105
ext::shared_ptr<
IborIndex
>(new
Euribor
(6*
Months
, h)) :
106
ext::shared_ptr<
IborIndex
>(new
Euribor
(3*
Months
, h))) {}
107
108
EuriborSwapIfrFix::EuriborSwapIfrFix
(
109
const
Period
& tenor,
110
const
Handle<YieldTermStructure>
& forwarding,
111
const
Handle<YieldTermStructure>
& discounting)
112
:
SwapIndex
(
"EuriborSwapIfrFix"
,
// familyName
113
tenor,
114
2,
// settlementDays
115
EURCurrency
(),
116
TARGET
(),
117
1*
Years
,
// fixedLegTenor
118
ModifiedFollowing
,
// fixedLegConvention
119
Thirty360
(
Thirty360
::BondBasis),
// fixedLegDaycounter
120
tenor > 1*
Years
?
121
ext::shared_ptr<
IborIndex
>(new
Euribor
(6*
Months
, forwarding)) :
122
ext::shared_ptr<
IborIndex
>(new
Euribor
(3*
Months
, forwarding)),
123
discounting) {}
124
125
126
}
QuantLib::EURCurrency
European Euro.
Definition:
europe.hpp:123
QuantLib::Euribor
Euribor index
Definition:
euribor.hpp:42
QuantLib::EuriborSwapIfrFix::EuriborSwapIfrFix
EuriborSwapIfrFix(const Period &tenor, const Handle< YieldTermStructure > &h={})
Definition:
euriborswap.cpp:94
QuantLib::EuriborSwapIsdaFixA::EuriborSwapIsdaFixA
EuriborSwapIsdaFixA(const Period &tenor, const Handle< YieldTermStructure > &h={})
Definition:
euriborswap.cpp:29
QuantLib::EuriborSwapIsdaFixB::EuriborSwapIsdaFixB
EuriborSwapIsdaFixB(const Period &tenor, const Handle< YieldTermStructure > &h={})
Definition:
euriborswap.cpp:61
QuantLib::Handle
Shared handle to an observable.
Definition:
handle.hpp:41
QuantLib::IborIndex
base class for Inter-Bank-Offered-Rate indexes (e.g. Libor, etc.)
Definition:
iborindex.hpp:35
QuantLib::Period
Definition:
period.hpp:44
QuantLib::SwapIndex
base class for swap-rate indexes
Definition:
swapindex.hpp:41
QuantLib::TARGET
TARGET calendar
Definition:
target.hpp:50
QuantLib::Thirty360
30/360 day count convention
Definition:
thirty360.hpp:76
euribor.hpp
Euribor index
euriborswap.hpp
Euribor Swap indexes.
europe.hpp
European currencies.
QuantLib::Months
@ Months
Definition:
timeunit.hpp:39
QuantLib::Years
@ Years
Definition:
timeunit.hpp:40
QuantLib::ModifiedFollowing
@ ModifiedFollowing
Definition:
businessdayconvention.hpp:45
QuantLib
Definition:
any.hpp:35
target.hpp
TARGET calendar.
thirty360.hpp
30/360 day counters
Generated by
Doxygen
1.9.5