/src/quantlib/ql/indexes/ibor/cdi.hpp
Line | Count | Source |
1 | | /* |
2 | | Copyright (C) 2025 Sotirios Papathanasopoulos |
3 | | |
4 | | This file is part of QuantLib, a free-software/open-source library |
5 | | for financial quantitative analysts and developers - http://quantlib.org/ |
6 | | QuantLib is free software: you can redistribute it and/or modify it |
7 | | under the terms of the QuantLib license. You should have received a |
8 | | copy of the license along with this program; if not, please email |
9 | | <quantlib-dev@lists.sf.net>. The license is also available online at |
10 | | <https://www.quantlib.org/license.shtml>. |
11 | | This program is distributed in the hope that it will be useful, but WITHOUT |
12 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
13 | | FOR A PARTICULAR PURPOSE. See the license for more details. |
14 | | */ |
15 | | |
16 | | #ifndef quantlib_cdi_hpp |
17 | | #define quantlib_cdi_hpp |
18 | | |
19 | | #include <ql/currencies/america.hpp> |
20 | | #include <ql/indexes/iborindex.hpp> |
21 | | #include <ql/time/calendars/brazil.hpp> |
22 | | #include <ql/time/daycounters/business252.hpp> |
23 | | |
24 | | namespace QuantLib { |
25 | | |
26 | | //! BRL-CDI Index: relevant for https://en.wikipedia.org/wiki/Brazilian_Swap |
27 | | |
28 | | class Cdi : public OvernightIndex { |
29 | | public: |
30 | | explicit Cdi(const Handle<YieldTermStructure>& h = {}) |
31 | 0 | : OvernightIndex("CDI", 0, BRLCurrency(), Brazil(Brazil::Settlement), Business252(), h) {} |
32 | | |
33 | | Rate forecastFixing(const Date& fixingDate) const override; |
34 | | |
35 | | }; |
36 | | |
37 | | } |
38 | | |
39 | | #endif |