Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
eqbsdata.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2016 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/eqbsdata.hpp
20 \brief EQ 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 {
40using namespace QuantLib;
41
42//! EQ Model Parameters
43/*!
44 Specification for a EQ model component in the Cross Asset LGM (i.e. lognormal Equity with
45 stochastic IR/FX differential).
46 The specification applies to the volatility component (sigma) of the EQ model only.
47
48 \ingroup models
49*/
50class EqBsData {
51public:
52 //! Default constructor
54
55 //! Detailed constructor
57 ParamType sigmaType, const std::vector<Time>& sigmaTimes, const std::vector<Real>& sigmaValues,
58 std::vector<std::string> optionExpiries = std::vector<std::string>(),
59 std::vector<std::string> optionStrikes = std::vector<std::string>())
63
64 //! \name Setters/Getters
65 //@{
66 std::string& eqName() { return name_; }
67 std::string& currency() { return ccy_; }
69 bool& calibrateSigma() { return calibrateSigma_; }
71 std::vector<Time>& sigmaTimes() { return sigmaTimes_; }
72 std::vector<Real>& sigmaValues() { return sigmaValues_; }
73 std::vector<std::string>& optionExpiries() { return optionExpiries_; }
74 std::vector<std::string>& optionStrikes() { return optionStrikes_; }
75 //@}
76
77 //! \name Serialisation
78 //@{
79 void fromXML(XMLNode* node);
81 //@}
82
83 //! \name Operators
84 //@{
85 bool operator==(const EqBsData& rhs);
86 bool operator!=(const EqBsData& rhs);
87 //@}
88
89private:
90 std::string name_;
91 std::string ccy_;
95 std::vector<Time> sigmaTimes_;
96 std::vector<Real> sigmaValues_;
97 std::vector<std::string> optionExpiries_;
98 std::vector<std::string> optionStrikes_;
99};
100} // namespace data
101} // namespace ore
EQ Model Parameters.
Definition: eqbsdata.hpp:50
std::string ccy_
Definition: eqbsdata.hpp:91
CalibrationType & calibrationType()
Definition: eqbsdata.hpp:68
std::vector< std::string > & optionStrikes()
Definition: eqbsdata.hpp:74
void fromXML(XMLNode *node)
Definition: eqbsdata.cpp:39
std::string & eqName()
Definition: eqbsdata.hpp:66
CalibrationType calibrationType_
Definition: eqbsdata.hpp:92
ParamType sigmaType_
Definition: eqbsdata.hpp:94
std::string name_
Definition: eqbsdata.hpp:90
std::vector< Real > & sigmaValues()
Definition: eqbsdata.hpp:72
ParamType & sigmaParamType()
Definition: eqbsdata.hpp:70
std::string & currency()
Definition: eqbsdata.hpp:67
EqBsData(std::string name, std::string currency, CalibrationType calibrationType, bool calibrateSigma, ParamType sigmaType, const std::vector< Time > &sigmaTimes, const std::vector< Real > &sigmaValues, std::vector< std::string > optionExpiries=std::vector< std::string >(), std::vector< std::string > optionStrikes=std::vector< std::string >())
Detailed constructor.
Definition: eqbsdata.hpp:56
std::vector< std::string > optionExpiries_
Definition: eqbsdata.hpp:97
XMLNode * toXML(XMLDocument &doc)
Definition: eqbsdata.cpp:77
std::vector< Time > sigmaTimes_
Definition: eqbsdata.hpp:95
EqBsData()
Default constructor.
Definition: eqbsdata.hpp:53
std::vector< std::string > & optionExpiries()
Definition: eqbsdata.hpp:73
std::vector< Time > & sigmaTimes()
Definition: eqbsdata.hpp:71
std::vector< Real > sigmaValues_
Definition: eqbsdata.hpp:96
bool operator==(const EqBsData &rhs)
Definition: eqbsdata.cpp:26
bool operator!=(const EqBsData &rhs)
Definition: eqbsdata.cpp:37
bool & calibrateSigma()
Definition: eqbsdata.hpp:69
std::vector< std::string > optionStrikes_
Definition: eqbsdata.hpp:98
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
string name
XML utility functions.