Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
crifconfiguration.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2024 AcadiaSoft Inc.
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 orea/simm/crifconfiguration.hpp
20 \brief CRIF configuration interface
21*/
22
23#pragma once
24
28#include <ql/indexes/interestrateindex.hpp>
29#include <ql/time/period.hpp>
30#include <string>
31
32namespace ore {
33namespace analytics {
34
36public:
37 virtual ~CrifConfiguration() {};
38
39 //virtual bool isValidSensitivity(const ore::analytics::RiskFactorKey::KeyType& rfkey) const = 0;
40
41 //! Returns the SIMM configuration name
42 virtual const std::string& name() const = 0;
43
44 //! Returns the SIMM configuration version
45 virtual const std::string& version() const = 0;
46
47 /*! Return the CRIF <em>bucket</em> name for the given risk type \p rt
48 and \p qualifier
49
50 \warning Throws an error if there are no buckets for the risk type \p rt
51 */
52 virtual std::string bucket(const ore::analytics::CrifRecord::RiskType& rt, const std::string& qualifier) const = 0;
53
54 virtual bool hasBucketMapping(const ore::analytics::CrifRecord::RiskType& rt, const std::string& qualifier) const = 0;
55
56 //! Returns the SIMM bucket mapper used by the configuration
57 virtual const QuantLib::ext::shared_ptr<SimmBucketMapper>& bucketMapper() const = 0;
58
59 /*! Return the CRIF <em>Label2</em> value for the given interest rate index
60 \p irIndex. For interest rate indices, this is the CRIF sub curve name
61 e.g. 'Libor1m', 'Libor3m' etc.
62 */
63 virtual std::string label2(const QuantLib::ext::shared_ptr<QuantLib::InterestRateIndex>& irIndex) const;
64
65 /*! Return the CRIF <em>Label2</em> value for the given Libor tenor
66 \p p. This is the CRIF sub curve name, e.g. 'Libor1m', 'Libor3m' etc.
67 */
68 virtual std::string label2(const QuantLib::Period& p) const;
69};
70} // namespace analytics
71} // namespace ore
virtual const std::string & version() const =0
Returns the SIMM configuration version.
virtual const QuantLib::ext::shared_ptr< SimmBucketMapper > & bucketMapper() const =0
Returns the SIMM bucket mapper used by the configuration.
virtual std::string label2(const QuantLib::ext::shared_ptr< QuantLib::InterestRateIndex > &irIndex) const
virtual const std::string & name() const =0
Returns the SIMM configuration name.
virtual std::string bucket(const ore::analytics::CrifRecord::RiskType &rt, const std::string &qualifier) const =0
virtual bool hasBucketMapping(const ore::analytics::CrifRecord::RiskType &rt, const std::string &qualifier) const =0
Struct for holding a CRIF record.
Scenario class.
Abstract base class for classes that map SIMM qualifiers to buckets.