Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
basecorrelationcurve.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2017 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 ored/marketdata/basecorrelationcurve.hpp
20 \brief Wrapper class for building base correlation structures
21 \ingroup curves
22*/
23
24#pragma once
25
29
31
32namespace ore {
33namespace data {
34
35class ReferenceDataManager;
36
37//! Wrapper class for building Base Correlation structures
38//! \ingroup curves
40public:
42 BaseCorrelationCurve(QuantLib::Date asof, BaseCorrelationCurveSpec spec, const Loader& loader,
44 const QuantLib::ext::shared_ptr<ReferenceDataManager>& referenceData = nullptr);
45
46 //! \name Inspectors
47 //@{
48 const BaseCorrelationCurveSpec& spec() const { return spec_; }
49 //! Base Correlation term structure
50 const QuantLib::ext::shared_ptr<QuantExt::BaseCorrelationTermStructure>& baseCorrelationTermStructure() const {
51 return baseCorrelation_;
52 }
53 //@}
54private:
56 QuantLib::ext::shared_ptr<QuantExt::BaseCorrelationTermStructure> baseCorrelation_;
57 QuantLib::ext::shared_ptr<ReferenceDataManager> referenceData_;
58
59 /*! Use the reference data to adjust the detachment points, \p detachPoints, for existing losses if requested.
60 */
61 std::vector<QuantLib::Real> adjustForLosses(const std::vector<QuantLib::Real>& detachPoints) const;
62};
63} // namespace data
64} // namespace ore
BaseCorrelationCurve(QuantLib::Date asof, BaseCorrelationCurveSpec spec, const Loader &loader, const CurveConfigurations &curveConfigs, const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceData=nullptr)
const BaseCorrelationCurveSpec & spec() const
QuantLib::ext::shared_ptr< QuantExt::BaseCorrelationTermStructure > baseCorrelation_
QuantLib::ext::shared_ptr< ReferenceDataManager > referenceData_
std::vector< QuantLib::Real > adjustForLosses(const std::vector< QuantLib::Real > &detachPoints) const
const QuantLib::ext::shared_ptr< QuantExt::BaseCorrelationTermStructure > & baseCorrelationTermStructure() const
Base Correlation term structure.
Base Correlation surface description.
Definition: curvespec.hpp:179
Container class for all Curve Configurations.
Market data loader base class.
Definition: loader.hpp:47
Curve configuration repository.
Curve requirements specification.
Market Datum Loader Interface.
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
vector< string > curveConfigs