Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
crlgmdata.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 model/crlgmdata.hpp
20 \brief CR component data for the cross asset model
21 \ingroup models
22*/
23
24#pragma once
25
26#include <vector>
27
28#include <ql/time/daycounters/actualactual.hpp>
29#include <ql/types.hpp>
30
32
37
38namespace ore {
39namespace data {
40
41using namespace QuantLib;
42
43//! CR LGM Model Parameters
44/*!
45 \ingroup models
46*/
47
48class CrLgmData : public LgmData {
49public:
50 //! Default constructor
52
53 //! Detailed constructor
55 bool calibrateH, ParamType hType, std::vector<Time> hTimes, std::vector<Real> hValues, bool calibrateA,
56 ParamType aType, std::vector<Time> aTimes, std::vector<Real> aValues, Real shiftHorizon = 0.0,
57 Real scaling = 1.0, std::vector<std::string> optionExpiries = std::vector<std::string>(),
58 std::vector<std::string> optionTerms = std::vector<std::string>(),
59 std::vector<std::string> optionStrikes = std::vector<std::string>())
60 : LgmData(name, calibrationType, revType, volType, calibrateH, hType, hTimes, hValues, calibrateA, aType,
62
63 //! \name Setters/Getters
64 //@{
65 std::string& name() { return name_; }
66 //@}
67
68 //! \name Serialisation
69 //@{
70 void fromXML(XMLNode* node) override;
71 XMLNode* toXML(XMLDocument& doc) const override;
72 //@}
73 void clear() override { LgmData::clear(); }
74 void reset() override {
76 name_ = "";
77 }
78
79private:
80 std::string name_;
81};
82} // namespace data
83} // namespace ore
CR LGM Model Parameters.
Definition: crlgmdata.hpp:48
CrLgmData()
Default constructor.
Definition: crlgmdata.hpp:51
std::string name_
Definition: crlgmdata.hpp:80
CrLgmData(std::string name, CalibrationType calibrationType, ReversionType revType, VolatilityType volType, bool calibrateH, ParamType hType, std::vector< Time > hTimes, std::vector< Real > hValues, bool calibrateA, ParamType aType, std::vector< Time > aTimes, std::vector< Real > aValues, Real shiftHorizon=0.0, Real scaling=1.0, std::vector< std::string > optionExpiries=std::vector< std::string >(), std::vector< std::string > optionTerms=std::vector< std::string >(), std::vector< std::string > optionStrikes=std::vector< std::string >())
Detailed constructor.
Definition: crlgmdata.hpp:54
void fromXML(XMLNode *node) override
Definition: crlgmdata.cpp:26
std::string & name()
Definition: crlgmdata.hpp:65
XMLNode * toXML(XMLDocument &doc) const override
Definition: crlgmdata.cpp:56
void reset() override
Reset member variables to defaults.
Definition: crlgmdata.hpp:74
void clear() override
Clear list of calibration instruments.
Definition: crlgmdata.hpp:73
CalibrationType & calibrationType()
Linear Gauss Markov Model Parameters.
Definition: lgmdata.hpp:53
std::vector< Time > & hTimes()
Definition: lgmdata.hpp:112
std::vector< std::string > & optionExpiries() const
Definition: lgmdata.hpp:121
std::vector< Time > & aTimes()
Definition: lgmdata.hpp:116
Real & scaling()
Definition: lgmdata.hpp:119
std::vector< Real > & hValues()
Definition: lgmdata.hpp:113
ReversionType
Supported mean reversion types.
Definition: lgmdata.hpp:56
std::vector< Real > & aValues()
Definition: lgmdata.hpp:117
VolatilityType
Supported volatility types.
Definition: lgmdata.hpp:67
std::vector< std::string > & optionTerms() const
Definition: lgmdata.hpp:122
Real & shiftHorizon()
Definition: lgmdata.hpp:118
bool & calibrateH()
Definition: lgmdata.hpp:110
bool & calibrateA()
Definition: lgmdata.hpp:114
std::vector< std::string > & optionStrikes() const
Definition: lgmdata.hpp:123
void reset() override
Reset member variables to defaults.
Definition: lgmdata.cpp:129
void clear() override
Clear list of calibration instruments.
Definition: lgmdata.cpp:123
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
Currency and instrument specific conventions/defaults.
Linear Gauss Markov model data.
@ data
Definition: log.hpp:77
Base Market class.
CalibrationType
Supported calibration types.
Definition: irmodeldata.hpp:46
ParamType
Supported calibration parameter type.
Definition: irmodeldata.hpp:35
Serializable Credit Default Swap.
Definition: namespaces.docs:23
XML utility functions.