Coverage Report

Created: 2025-11-04 06:12

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/quantlib/ql/indexes/ibor/eurlibor.hpp
Line
Count
Source
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
 Copyright (C) 2007 Ferdinando Ametrano
5
 Copyright (C) 2006, 2007 Chiara Fornarola
6
 Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl
7
 Copyright (C) 2003, 2004, 2005, 2006 StatPro Italia srl
8
9
 This file is part of QuantLib, a free-software/open-source library
10
 for financial quantitative analysts and developers - http://quantlib.org/
11
12
 QuantLib is free software: you can redistribute it and/or modify it
13
 under the terms of the QuantLib license.  You should have received a
14
 copy of the license along with this program; if not, please email
15
 <quantlib-dev@lists.sf.net>. The license is also available online at
16
 <https://www.quantlib.org/license.shtml>.
17
18
 This program is distributed in the hope that it will be useful, but WITHOUT
19
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20
 FOR A PARTICULAR PURPOSE.  See the license for more details.
21
*/
22
23
/*! \file eurlibor.hpp
24
    \brief %EUR %LIBOR rate
25
*/
26
27
#ifndef quantlib_eur_libor_hpp
28
#define quantlib_eur_libor_hpp
29
30
#include <ql/indexes/iborindex.hpp>
31
32
namespace QuantLib {
33
34
    //! base class for all ICE %EUR %LIBOR indexes but the O/N
35
    /*! Euro LIBOR fixed by ICE.
36
37
        See <https://www.theice.com/marketdata/reports/170>.
38
39
        \warning This is the rate fixed in London by BBA. Use Euribor if
40
                 you're interested in the fixing by the ECB.
41
    */
42
    class EURLibor : public IborIndex {
43
      public:
44
        EURLibor(const Period& tenor,
45
                 const Handle<YieldTermStructure>& h = {});
46
        /*! \name Date calculations
47
48
            See <https://www.theice.com/marketdata/reports/170>.
49
            @{
50
        */
51
        Date fixingDate(const Date& valueDate) const override;
52
        Date valueDate(const Date& fixingDate) const override;
53
        Date maturityDate(const Date& valueDate) const override;
54
        // @}
55
        //! \name IborIndex interface
56
        //@{
57
        ext::shared_ptr<IborIndex> clone(const Handle<YieldTermStructure>& h) const override;
58
        // @}
59
      private:
60
        Calendar target_;
61
    };
62
63
    //! base class for the one day deposit ICE %EUR %LIBOR indexes
64
    /*! Euro O/N LIBOR fixed by ICE. It can be also used for T/N and S/N
65
        indexes, even if such indexes do not have ICE fixing.
66
67
        See <https://www.theice.com/marketdata/reports/170>.
68
69
        \warning This is the rate fixed in London by ICE. Use Eonia if
70
                 you're interested in the fixing by the ECB.
71
    */
72
    class DailyTenorEURLibor : public IborIndex {
73
      public:
74
        DailyTenorEURLibor(Natural settlementDays,
75
                           const Handle<YieldTermStructure>& h = {});
76
    };
77
78
    //! Overnight %EUR %Libor index
79
    class EURLiborON : public DailyTenorEURLibor {
80
      public:
81
        explicit EURLiborON(const Handle<YieldTermStructure>& h = {})
82
0
        : DailyTenorEURLibor(0, h) {}
83
    };
84
85
    //! 1-month %EUR %Libor index
86
    class EURLibor1M : public EURLibor {
87
      public:
88
        explicit EURLibor1M(const Handle<YieldTermStructure>& h = {})
89
0
        : EURLibor(Period(1, Months), h) {}
90
    };
91
92
    //! 3-months %EUR %Libor index
93
    class EURLibor3M : public EURLibor {
94
      public:
95
        explicit EURLibor3M(const Handle<YieldTermStructure>& h = {})
96
0
        : EURLibor(Period(3, Months), h) {}
97
    };
98
99
    //! 6-months %EUR %Libor index
100
    class EURLibor6M : public EURLibor {
101
      public:
102
        explicit EURLibor6M(const Handle<YieldTermStructure>& h = {})
103
0
        : EURLibor(Period(6, Months), h) {}
104
    };
105
106
    //! 1-year %EUR %Libor index
107
    class EURLibor1Y : public EURLibor {
108
      public:
109
        explicit EURLibor1Y(const Handle<YieldTermStructure>& h = {})
110
0
        : EURLibor(Period(1, Years), h) {}
111
    };
112
113
114
}
115
116
#endif