Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Canadian Overnight Repo Rate Average (CORRA) #1705

Merged
merged 4 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion QuantLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@
<ClInclude Include="ql\indexes\ibor\cadlibor.hpp" />
<ClInclude Include="ql\indexes\ibor\cdor.hpp" />
<ClInclude Include="ql\indexes\ibor\chflibor.hpp" />
<ClInclude Include="ql\indexes\ibor\corra.hpp" />
<ClInclude Include="ql\indexes\ibor\dkklibor.hpp" />
<ClInclude Include="ql\indexes\ibor\eonia.hpp" />
<ClInclude Include="ql\indexes\ibor\estr.hpp" />
Expand Down Expand Up @@ -2129,6 +2130,7 @@
<ClCompile Include="ql\indexes\bmaindex.cpp" />
<ClCompile Include="ql\indexes\equityindex.cpp" />
<ClCompile Include="ql\indexes\ibor\bibor.cpp" />
<ClCompile Include="ql\indexes\ibor\corra.cpp" />
<ClCompile Include="ql\indexes\ibor\eonia.cpp" />
<ClCompile Include="ql\indexes\ibor\estr.cpp" />
<ClCompile Include="ql\indexes\ibor\euribor.cpp" />
Expand Down Expand Up @@ -2830,4 +2832,4 @@
<Import Project=".\Build.props" Condition="Exists('.\Build.props')" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
8 changes: 7 additions & 1 deletion QuantLib.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,9 @@
<ClInclude Include="ql\indexes\ibor\chflibor.hpp">
<Filter>indexes\ibor</Filter>
</ClInclude>
<ClInclude Include="ql\indexes\ibor\corra.hpp">
<Filter>indexes\ibor</Filter>
</ClInclude>
<ClInclude Include="ql\indexes\ibor\dkklibor.hpp">
<Filter>indexes\ibor</Filter>
</ClInclude>
Expand Down Expand Up @@ -4584,6 +4587,9 @@
<ClCompile Include="ql\indexes\ibor\bibor.cpp">
<Filter>indexes\ibor</Filter>
</ClCompile>
<ClCompile Include="ql\indexes\ibor\corra.cpp">
<Filter>indexes\ibor</Filter>
</ClCompile>
<ClCompile Include="ql\indexes\ibor\eonia.cpp">
<Filter>indexes\ibor</Filter>
</ClCompile>
Expand Down Expand Up @@ -7184,4 +7190,4 @@
<Filter>time\daycounters</Filter>
</ClCompile>
</ItemGroup>
</Project>
</Project>
2 changes: 2 additions & 0 deletions ql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ set(QL_SOURCES
indexes/bmaindex.cpp
indexes/equityindex.cpp
indexes/ibor/bibor.cpp
indexes/ibor/corra.cpp
indexes/ibor/eonia.cpp
indexes/ibor/estr.cpp
indexes/ibor/euribor.cpp
Expand Down Expand Up @@ -1250,6 +1251,7 @@ set(QL_HEADERS
indexes/ibor/cadlibor.hpp
indexes/ibor/cdor.hpp
indexes/ibor/chflibor.hpp
indexes/ibor/corra.hpp
indexes/ibor/dkklibor.hpp
indexes/ibor/eonia.hpp
indexes/ibor/estr.hpp
Expand Down
2 changes: 2 additions & 0 deletions ql/indexes/ibor/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ this_include_HEADERS = \
cadlibor.hpp \
cdor.hpp \
chflibor.hpp \
corra.hpp \
dkklibor.hpp \
eonia.hpp \
estr.hpp \
Expand Down Expand Up @@ -41,6 +42,7 @@ this_include_HEADERS = \

cpp_files = \
bibor.cpp \
corra.cpp \
eonia.cpp \
estr.cpp \
euribor.cpp \
Expand Down
1 change: 1 addition & 0 deletions ql/indexes/ibor/all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <ql/indexes/ibor/cadlibor.hpp>
#include <ql/indexes/ibor/cdor.hpp>
#include <ql/indexes/ibor/chflibor.hpp>
#include <ql/indexes/ibor/corra.hpp>
#include <ql/indexes/ibor/dkklibor.hpp>
#include <ql/indexes/ibor/eonia.hpp>
#include <ql/indexes/ibor/estr.hpp>
Expand Down
27 changes: 27 additions & 0 deletions ql/indexes/ibor/corra.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

/*
Copyright (C) 2023 Aditya Narayan Das

This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/

QuantLib is free software: you can redistribute it and/or modify it
under the terms of the QuantLib license. You should have received a
copy of the license along with this program; if not, please email
<[email protected]>. The license is also available online at
<http://quantlib.org/license.shtml>.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/

#include <ql/currencies/america.hpp>
#include <ql/indexes/ibor/corra.hpp>
#include <ql/time/calendars/canada.hpp>

namespace QuantLib {
Corra::Corra(const Handle<YieldTermStructure>& h)
: OvernightIndex("CORRA", 0, CADCurrency(), Canada(), Actual365Fixed(), h) {}
}
33 changes: 33 additions & 0 deletions ql/indexes/ibor/corra.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

/*
Copyright (C) 2023 Aditya Narayan Das

This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/

QuantLib is free software: you can redistribute it and/or modify it
under the terms of the QuantLib license. You should have received a
copy of the license along with this program; if not, please email
<[email protected]>. The license is also available online at
<http://quantlib.org/license.shtml>.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/

#ifndef quantlib_corra_hpp
#define quantlib_corra_hpp

#include <ql/indexes/iborindex.hpp>

namespace QuantLib {
class Corra : public OvernightIndex {
public:
explicit Corra(const Handle<YieldTermStructure>& h = {});
};
}


#endif