Coverage Report

Created: 2025-08-11 06:28

/src/quantlib/ql/indexes/swap/eurliborswap.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
 Copyright (C) 2006, 2007, 2008 Ferdinando Ametrano
5
 Copyright (C) 2006 Chiara Fornarola
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/eurliborswap.hpp>
22
#include <ql/indexes/ibor/eurlibor.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
    EurLiborSwapIsdaFixA::EurLiborSwapIsdaFixA(
30
                                        const Period& tenor,
31
                                        const Handle<YieldTermStructure>& h)
32
0
    : SwapIndex("EurLiborSwapIsdaFixA", // familyName
33
0
                tenor,
34
0
                2, // settlementDays
35
0
                EURCurrency(),
36
0
                TARGET(),
37
0
                1*Years, // fixedLegTenor
38
0
                ModifiedFollowing, // fixedLegConvention
39
0
                Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
40
0
                tenor > 1*Years ?
41
0
                    ext::shared_ptr<IborIndex>(new EURLibor(6*Months, h)) :
42
0
                    ext::shared_ptr<IborIndex>(new EURLibor(3*Months, h))) {}
43
44
    EurLiborSwapIsdaFixA::EurLiborSwapIsdaFixA(
45
                                const Period& tenor,
46
                                const Handle<YieldTermStructure>& forwarding,
47
                                const Handle<YieldTermStructure>& discounting)
48
0
    : SwapIndex("EurLiborSwapIsdaFixA", // familyName
49
0
                tenor,
50
0
                2, // settlementDays
51
0
                EURCurrency(),
52
0
                TARGET(),
53
0
                1*Years, // fixedLegTenor
54
0
                ModifiedFollowing, // fixedLegConvention
55
0
                Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
56
0
                tenor > 1*Years ?
57
0
                    ext::shared_ptr<IborIndex>(new EURLibor(6*Months, forwarding)) :
58
0
                    ext::shared_ptr<IborIndex>(new EURLibor(3*Months, forwarding)),
59
0
                discounting) {}
60
61
    EurLiborSwapIsdaFixB::EurLiborSwapIsdaFixB(
62
                                        const Period& tenor,
63
                                        const Handle<YieldTermStructure>& h)
64
0
    : SwapIndex("EurLiborSwapIsdaFixB", // familyName
65
0
                tenor,
66
0
                2, // settlementDays
67
0
                EURCurrency(),
68
0
                TARGET(),
69
0
                1*Years, // fixedLegTenor
70
0
                ModifiedFollowing, // fixedLegConvention
71
0
                Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
72
0
                tenor > 1*Years ?
73
0
                    ext::shared_ptr<IborIndex>(new EURLibor(6*Months, h)) :
74
0
                    ext::shared_ptr<IborIndex>(new EURLibor(3*Months, h))) {}
75
76
    EurLiborSwapIsdaFixB::EurLiborSwapIsdaFixB(
77
                                const Period& tenor,
78
                                const Handle<YieldTermStructure>& forwarding,
79
                                const Handle<YieldTermStructure>& discounting)
80
0
    : SwapIndex("EurLiborSwapIsdaFixB", // familyName
81
0
                tenor,
82
0
                2, // settlementDays
83
0
                EURCurrency(),
84
0
                TARGET(),
85
0
                1*Years, // fixedLegTenor
86
0
                ModifiedFollowing, // fixedLegConvention
87
0
                Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
88
0
                tenor > 1*Years ?
89
0
                    ext::shared_ptr<IborIndex>(new EURLibor(6*Months, forwarding)) :
90
0
                    ext::shared_ptr<IborIndex>(new EURLibor(3*Months, forwarding)),
91
0
                discounting) {}
92
93
    EurLiborSwapIfrFix::EurLiborSwapIfrFix(
94
                                        const Period& tenor,
95
                                        const Handle<YieldTermStructure>& h)
96
0
    : SwapIndex("EurLiborSwapIfrFix", // familyName
97
0
                tenor,
98
0
                2, // settlementDays
99
0
                EURCurrency(),
100
0
                TARGET(),
101
0
                1*Years, // fixedLegTenor
102
0
                ModifiedFollowing, // fixedLegConvention
103
0
                Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
104
0
                tenor > 1*Years ?
105
0
                    ext::shared_ptr<IborIndex>(new EURLibor(6*Months, h)) :
106
0
                    ext::shared_ptr<IborIndex>(new EURLibor(3*Months, h))) {}
107
108
    EurLiborSwapIfrFix::EurLiborSwapIfrFix(
109
                                const Period& tenor,
110
                                const Handle<YieldTermStructure>& forwarding,
111
                                const Handle<YieldTermStructure>& discounting)
112
0
    : SwapIndex("EurLiborSwapIfrFix", // familyName
113
0
                tenor,
114
0
                2, // settlementDays
115
0
                EURCurrency(),
116
0
                TARGET(),
117
0
                1*Years, // fixedLegTenor
118
0
                ModifiedFollowing, // fixedLegConvention
119
0
                Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
120
0
                tenor > 1*Years ?
121
0
                    ext::shared_ptr<IborIndex>(new EURLibor(6*Months, forwarding)) :
122
0
                    ext::shared_ptr<IborIndex>(new EURLibor(3*Months, forwarding)),
123
0
                discounting) {}
124
125
}