Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
fxbsdata.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/fxbsdata.hpp
20 \brief FX 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//! FX Model Parameters
43/*!
44 Specification for a FX model component in the Cross Ccy LGM (i.e. lognormal FX with
45 stochastic IR differential).
46 The specification applies to the volatility component (sigma) of the FX model only.
47
48 \ingroup models
49*/
50class FxBsData {
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& foreignCcy() { return foreignCcy_; }
67 std::string& domesticCcy() { return domesticCcy_; }
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 FxBsData& rhs);
86 bool operator!=(const FxBsData& rhs);
87 //@}
88
89private:
90 std::string foreignCcy_;
91 std::string domesticCcy_;
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
FX Model Parameters.
Definition: fxbsdata.hpp:50
std::string foreignCcy_
Definition: fxbsdata.hpp:90
CalibrationType & calibrationType()
Definition: fxbsdata.hpp:68
std::string domesticCcy_
Definition: fxbsdata.hpp:91
std::vector< std::string > & optionStrikes()
Definition: fxbsdata.hpp:74
void fromXML(XMLNode *node)
Definition: fxbsdata.cpp:39
bool operator!=(const FxBsData &rhs)
Definition: fxbsdata.cpp:37
CalibrationType calibrationType_
Definition: fxbsdata.hpp:92
ParamType sigmaType_
Definition: fxbsdata.hpp:94
std::vector< Real > & sigmaValues()
Definition: fxbsdata.hpp:72
ParamType & sigmaParamType()
Definition: fxbsdata.hpp:70
std::string & domesticCcy()
Definition: fxbsdata.hpp:67
std::vector< std::string > optionExpiries_
Definition: fxbsdata.hpp:97
XMLNode * toXML(XMLDocument &doc)
Definition: fxbsdata.cpp:77
std::vector< Time > sigmaTimes_
Definition: fxbsdata.hpp:95
std::vector< std::string > & optionExpiries()
Definition: fxbsdata.hpp:73
std::vector< Time > & sigmaTimes()
Definition: fxbsdata.hpp:71
std::vector< Real > sigmaValues_
Definition: fxbsdata.hpp:96
FxBsData()
Default constructor.
Definition: fxbsdata.hpp:53
bool operator==(const FxBsData &rhs)
Definition: fxbsdata.cpp:26
FxBsData(std::string foreignCcy, std::string domesticCcy, 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: fxbsdata.hpp:56
std::string & foreignCcy()
Definition: fxbsdata.hpp:66
bool & calibrateSigma()
Definition: fxbsdata.hpp:69
std::vector< std::string > optionStrikes_
Definition: fxbsdata.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
XML utility functions.