Coverage Report

Created: 2025-10-14 06:32

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/quantlib/ql/indexes/swap/usdliborswap.cpp
Line
Count
Source
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
 Copyright (C) 2008, 2011 Ferdinando Ametrano
5
6
 This file is part of QuantLib, a free-software/open-source library
7
 for financial quantitative analysts and developers - http://quantlib.org/
8
9
 QuantLib is free software: you can redistribute it and/or modify it
10
 under the terms of the QuantLib license.  You should have received a
11
 copy 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
 <https://www.quantlib.org/license.shtml>.
14
15
 This program is distributed in the hope that it will be useful, but WITHOUT
16
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17
 FOR A PARTICULAR PURPOSE.  See the license for more details.
18
*/
19
20
#include <ql/indexes/swap/usdliborswap.hpp>
21
#include <ql/indexes/ibor/usdlibor.hpp>
22
#include <ql/time/calendars/target.hpp>
23
#include <ql/time/daycounters/thirty360.hpp>
24
#include <ql/currencies/america.hpp>
25
26
namespace QuantLib {
27
28
    UsdLiborSwapIsdaFixAm::UsdLiborSwapIsdaFixAm(
29
                                const Period& tenor,
30
                                const Handle<YieldTermStructure>& h)
31
0
    : SwapIndex("UsdLiborSwapIsdaFixAm", // familyName
32
0
                tenor,
33
0
                2, // settlementDays
34
0
                USDCurrency(),
35
0
                UnitedStates(UnitedStates::GovernmentBond),
36
0
                6*Months, // fixedLegTenor
37
0
                ModifiedFollowing, // fixedLegConvention
38
0
                Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
39
0
                ext::shared_ptr<IborIndex>(new USDLibor(3*Months, h))) {}
40
41
    UsdLiborSwapIsdaFixAm::UsdLiborSwapIsdaFixAm(
42
                                const Period& tenor,
43
                                const Handle<YieldTermStructure>& forwarding,
44
                                const Handle<YieldTermStructure>& discounting)
45
0
    : SwapIndex("UsdLiborSwapIsdaFixAm", // familyName
46
0
                tenor,
47
0
                2, // settlementDays
48
0
                USDCurrency(),
49
0
                UnitedStates(UnitedStates::GovernmentBond),
50
0
                6*Months, // fixedLegTenor
51
0
                ModifiedFollowing, // fixedLegConvention
52
0
                Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
53
0
                ext::shared_ptr<IborIndex>(new USDLibor(3*Months, forwarding)),
54
0
                discounting) {}
55
56
    UsdLiborSwapIsdaFixPm::UsdLiborSwapIsdaFixPm(
57
                                const Period& tenor,
58
                                const Handle<YieldTermStructure>& h)
59
0
    : SwapIndex("UsdLiborSwapIsdaFixPm", // familyName
60
0
                tenor,
61
0
                2, // settlementDays
62
0
                USDCurrency(),
63
0
                UnitedStates(UnitedStates::GovernmentBond),
64
0
                6*Months, // fixedLegTenor
65
0
                ModifiedFollowing, // fixedLegConvention
66
0
                Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
67
0
                ext::shared_ptr<IborIndex>(new USDLibor(3*Months, h))) {}
68
69
    UsdLiborSwapIsdaFixPm::UsdLiborSwapIsdaFixPm(
70
                                const Period& tenor,
71
                                const Handle<YieldTermStructure>& forwarding,
72
                                const Handle<YieldTermStructure>& discounting)
73
0
    : SwapIndex("UsdLiborSwapIsdaFixPm", // familyName
74
0
                tenor,
75
0
                2, // settlementDays
76
0
                USDCurrency(),
77
0
                UnitedStates(UnitedStates::GovernmentBond),
78
0
                6*Months, // fixedLegTenor
79
0
                ModifiedFollowing, // fixedLegConvention
80
0
                Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
81
0
                ext::shared_ptr<IborIndex>(new USDLibor(3*Months, forwarding)),
82
0
                discounting) {}
83
84
}