Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
cacpi.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2019 Quaternion Risk Management Ltd
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file qle/indexes/cacpi.hpp
20 \brief CAD CPI index
21*/
22
23#ifndef quantext_cacpi_hpp
24#define quantext_cacpi_hpp
25
26#include <ql/currencies/america.hpp>
27#include <ql/indexes/inflationindex.hpp>
29
30namespace QuantExt {
31
32//! Canadian CPI index
33class CACPI : public QuantLib::ZeroInflationIndex {
34public:
35 CACPI(const QuantLib::Handle<QuantLib::ZeroInflationTermStructure>& ts =
36 QuantLib::Handle<QuantLib::ZeroInflationTermStructure>())
37 : QuantLib::ZeroInflationIndex("CPI", CanadaRegion(), false, QuantLib::Monthly,
38 QuantLib::Period(1, QuantLib::Months), QuantLib::CADCurrency(), ts) {}
39
40 QL_DEPRECATED_DISABLE_WARNING
41 QL_DEPRECATED
42 CACPI(bool interpolated, const QuantLib::Handle<QuantLib::ZeroInflationTermStructure>& ts =
43 QuantLib::Handle<QuantLib::ZeroInflationTermStructure>())
44 : QuantLib::ZeroInflationIndex("CPI", CanadaRegion(), false, interpolated, QuantLib::Monthly,
45 QuantLib::Period(1, QuantLib::Months), QuantLib::CADCurrency(), ts) {}
46 QL_DEPRECATED_ENABLE_WARNING
47};
48
49} // namespace QuantExt
50
51#endif
Canadian CPI index.
Definition: cacpi.hpp:33
CACPI(const QuantLib::Handle< QuantLib::ZeroInflationTermStructure > &ts=QuantLib::Handle< QuantLib::ZeroInflationTermStructure >())
Definition: cacpi.hpp:35
QL_DEPRECATED_DISABLE_WARNING QL_DEPRECATED CACPI(bool interpolated, const QuantLib::Handle< QuantLib::ZeroInflationTermStructure > &ts=QuantLib::Handle< QuantLib::ZeroInflationTermStructure >())
Definition: cacpi.hpp:42
Canada as geographical/economic region.
Definition: region.hpp:43
Region, i.e. geographical area, specification.