Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
wrappedmarket.cpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2020 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
20
21namespace ore {
22namespace data {
23
24WrappedMarket::WrappedMarket(const QuantLib::ext::shared_ptr<Market>& m, const bool handlePseudoCurrencies)
25 : Market(handlePseudoCurrencies), market_(m) {}
26
27QuantLib::ext::shared_ptr<Market> WrappedMarket::underlyingMarket() const { return market_; }
28
29Date WrappedMarket::asofDate() const { return market_->asofDate(); }
30
31Handle<YieldTermStructure> WrappedMarket::yieldCurve(const YieldCurveType& type, const string& name,
32 const string& configuration) const {
33 return market_->yieldCurve(type, name, configuration);
34}
35
36Handle<YieldTermStructure> WrappedMarket::discountCurveImpl(const string& ccy, const string& configuration) const {
37 return market_->discountCurve(ccy, configuration);
38}
39
40Handle<YieldTermStructure> WrappedMarket::yieldCurve(const string& name, const string& configuration) const {
41 return market_->yieldCurve(name, configuration);
42}
43
44Handle<IborIndex> WrappedMarket::iborIndex(const string& indexName, const string& configuration) const {
45 return market_->iborIndex(indexName, configuration);
46}
47
48Handle<SwapIndex> WrappedMarket::swapIndex(const string& indexName, const string& configuration) const {
49 return market_->swapIndex(indexName, configuration);
50}
51
52Handle<SwaptionVolatilityStructure> WrappedMarket::swaptionVol(const string& key, const string& configuration) const {
53 return market_->swaptionVol(key, configuration);
54}
55
56string WrappedMarket::shortSwapIndexBase(const string& ccy, const string& configuration) const {
57 return market_->shortSwapIndexBase(ccy, configuration);
58}
59
60string WrappedMarket::swapIndexBase(const string& ccy, const string& configuration) const {
61 return market_->swapIndexBase(ccy, configuration);
62}
63
64Handle<SwaptionVolatilityStructure> WrappedMarket::yieldVol(const string& securityID,
65 const string& configuration) const {
66 return market_->yieldVol(securityID, configuration);
67}
68
69Handle<QuantExt::FxIndex> WrappedMarket::fxIndexImpl(const string& fxIndex, const string& configuration) const {
70 return market_->fxIndex(fxIndex, configuration);
71}
72
73Handle<Quote> WrappedMarket::fxSpotImpl(const string& ccypair, const string& configuration) const {
74 return market_->fxSpot(ccypair, configuration);
75}
76
77Handle<Quote> WrappedMarket::fxRateImpl(const string& ccypair, const string& configuration) const {
78 return market_->fxRate(ccypair, configuration);
79}
80
81Handle<BlackVolTermStructure> WrappedMarket::fxVolImpl(const string& ccypair, const string& configuration) const {
82 return market_->fxVol(ccypair, configuration);
83}
84
85Handle<QuantExt::CreditCurve> WrappedMarket::defaultCurve(const string& name, const string& configuration) const {
86 return market_->defaultCurve(name, configuration);
87}
88
89Handle<Quote> WrappedMarket::recoveryRate(const string& name, const string& configuration) const {
90 return market_->recoveryRate(name, configuration);
91}
92
93Handle<QuantExt::CreditVolCurve> WrappedMarket::cdsVol(const string& name, const string& configuration) const {
94 return market_->cdsVol(name, configuration);
95}
96
97Handle<QuantExt::BaseCorrelationTermStructure> WrappedMarket::baseCorrelation(const string& name,
98 const string& configuration) const {
99 return market_->baseCorrelation(name, configuration);
100}
101
102Handle<OptionletVolatilityStructure> WrappedMarket::capFloorVol(const string& key, const string& configuration) const {
103 return market_->capFloorVol(key, configuration);
104}
105
106std::pair<string, QuantLib::Period> WrappedMarket::capFloorVolIndexBase(const string& key,
107 const string& configuration) const {
108 return market_->capFloorVolIndexBase(key, configuration);
109}
110
111Handle<QuantExt::YoYOptionletVolatilitySurface> WrappedMarket::yoyCapFloorVol(const string& indexName,
112 const string& configuration) const {
113 return market_->yoyCapFloorVol(indexName, configuration);
114}
115
116Handle<ZeroInflationIndex> WrappedMarket::zeroInflationIndex(const string& indexName,
117 const string& configuration) const {
118 return market_->zeroInflationIndex(indexName, configuration);
119}
120
121Handle<YoYInflationIndex> WrappedMarket::yoyInflationIndex(const string& indexName, const string& configuration) const {
122 return market_->yoyInflationIndex(indexName, configuration);
123}
124
125Handle<CPIVolatilitySurface> WrappedMarket::cpiInflationCapFloorVolatilitySurface(const string& indexName,
126 const string& configuration) const {
127 return market_->cpiInflationCapFloorVolatilitySurface(indexName, configuration);
128}
129
130Handle<Quote> WrappedMarket::equitySpot(const string& eqName, const string& configuration) const {
131 return market_->equitySpot(eqName, configuration);
132}
133
134Handle<YieldTermStructure> WrappedMarket::equityDividendCurve(const string& eqName, const string& configuration) const {
135 return market_->equityDividendCurve(eqName, configuration);
136}
137
138Handle<YieldTermStructure> WrappedMarket::equityForecastCurve(const string& eqName, const string& configuration) const {
139 return market_->equityForecastCurve(eqName, configuration);
140}
141
142Handle<QuantExt::EquityIndex2> WrappedMarket::equityCurve(const string& eqName, const string& configuration) const {
143 return market_->equityCurve(eqName, configuration);
144}
145
146Handle<BlackVolTermStructure> WrappedMarket::equityVol(const string& eqName, const string& configuration) const {
147 return market_->equityVol(eqName, configuration);
148}
149
150void WrappedMarket::refresh(const string& s) { market_->refresh(s); }
151
152Handle<Quote> WrappedMarket::securitySpread(const string& securityID, const string& configuration) const {
153 return market_->securitySpread(securityID, configuration);
154}
155
156QuantLib::Handle<QuantExt::PriceTermStructure>
157WrappedMarket::commodityPriceCurve(const std::string& commodityName, const std::string& configuration) const {
158 return market_->commodityPriceCurve(commodityName, configuration);
159}
160
161QuantLib::Handle<QuantExt::CommodityIndex> WrappedMarket::commodityIndex(const std::string& commodityName,
162 const std::string& configuration) const {
163 return market_->commodityIndex(commodityName, configuration);
164}
165
166QuantLib::Handle<QuantLib::BlackVolTermStructure>
167WrappedMarket::commodityVolatility(const std::string& commodityName, const std::string& configuration) const {
168 return market_->commodityVolatility(commodityName, configuration);
169}
170
171QuantLib::Handle<QuantExt::CorrelationTermStructure>
172WrappedMarket::correlationCurve(const std::string& index1, const std::string& index2,
173 const std::string& configuration) const {
174 return market_->correlationCurve(index1, index2, configuration);
175}
176
177Handle<Quote> WrappedMarket::cpr(const string& securityID, const string& configuration) const {
178 return market_->cpr(securityID, configuration);
179}
180
181} // namespace data
182} // namespace ore
QuantLib::Handle< QuantExt::FxIndex > fxIndex(const string &fxIndex, const string &configuration=Market::defaultConfiguration) const
Definition: market.cpp:151
WrappedMarket(const QuantLib::ext::shared_ptr< Market > &market, const bool handlePseudoCurrencies)
QuantLib::ext::shared_ptr< Market > market_
Handle< QuantExt::CreditCurve > defaultCurve(const string &name, const string &configuration=Market::defaultConfiguration) const override
string shortSwapIndexBase(const string &ccy, const string &configuration=Market::defaultConfiguration) const override
Handle< Quote > securitySpread(const string &securityID, const string &configuration=Market::defaultConfiguration) const override
Handle< QuantExt::BaseCorrelationTermStructure > baseCorrelation(const string &name, const string &configuration=Market::defaultConfiguration) const override
QuantLib::Handle< QuantExt::PriceTermStructure > commodityPriceCurve(const std::string &commodityName, const std::string &configuration=Market::defaultConfiguration) const override
Handle< ZeroInflationIndex > zeroInflationIndex(const string &indexName, const string &configuration=Market::defaultConfiguration) const override
Inflation Indexes.
Handle< QuantExt::EquityIndex2 > equityCurve(const string &eqName, const string &configuration=Market::defaultConfiguration) const override
Handle< BlackVolTermStructure > equityVol(const string &eqName, const string &configuration=Market::defaultConfiguration) const override
Handle< QuantExt::YoYOptionletVolatilitySurface > yoyCapFloorVol(const string &indexName, const string &configuration=Market::defaultConfiguration) const override
Handle< Quote > recoveryRate(const string &name, const string &configuration=Market::defaultConfiguration) const override
Handle< YieldTermStructure > discountCurveImpl(const string &ccy, const string &configuration=Market::defaultConfiguration) const override
QuantLib::Handle< QuantLib::BlackVolTermStructure > commodityVolatility(const std::string &commodityName, const std::string &configuration=Market::defaultConfiguration) const override
Handle< Quote > fxSpotImpl(const string &ccypair, const string &configuration=Market::defaultConfiguration) const override
Handle< BlackVolTermStructure > fxVolImpl(const string &ccypair, const string &configuration=Market::defaultConfiguration) const override
Handle< SwaptionVolatilityStructure > yieldVol(const string &securityID, const string &configuration=Market::defaultConfiguration) const override
Handle< CPIVolatilitySurface > cpiInflationCapFloorVolatilitySurface(const string &indexName, const string &configuration=Market::defaultConfiguration) const override
CPI Inflation Cap Floor Volatility Surfaces.
Handle< QuantExt::CreditVolCurve > cdsVol(const string &name, const string &configuration=Market::defaultConfiguration) const override
Date asofDate() const override
Get the asof Date.
QuantLib::Handle< QuantExt::CorrelationTermStructure > correlationCurve(const std::string &index1, const std::string &index2, const std::string &configuration=Market::defaultConfiguration) const override
void refresh(const string &s) override
Refresh term structures for a given configuration.
Handle< YieldTermStructure > equityDividendCurve(const string &eqName, const string &configuration=Market::defaultConfiguration) const override
Handle< QuantExt::FxIndex > fxIndexImpl(const string &fxIndex, const string &configuration=Market::defaultConfiguration) const override
Handle< YieldTermStructure > yieldCurve(const YieldCurveType &type, const string &name, const string &configuration=Market::defaultConfiguration) const override
Handle< Quote > cpr(const string &securityID, const string &configuration=Market::defaultConfiguration) const override
Handle< Quote > fxRateImpl(const string &ccypair, const string &configuration=Market::defaultConfiguration) const override
Handle< Quote > equitySpot(const string &eqName, const string &configuration=Market::defaultConfiguration) const override
string swapIndexBase(const string &ccy, const string &configuration=Market::defaultConfiguration) const override
Handle< SwapIndex > swapIndex(const string &indexName, const string &configuration=Market::defaultConfiguration) const override
QuantLib::ext::shared_ptr< Market > underlyingMarket() const
std::pair< string, QuantLib::Period > capFloorVolIndexBase(const string &key, const string &configuration=Market::defaultConfiguration) const override
Handle< OptionletVolatilityStructure > capFloorVol(const string &key, const string &configuration=Market::defaultConfiguration) const override
Handle< YoYInflationIndex > yoyInflationIndex(const string &indexName, const string &configuration=Market::defaultConfiguration) const override
Handle< SwaptionVolatilityStructure > swaptionVol(const string &key, const string &configuration=Market::defaultConfiguration) const override
Handle< IborIndex > iborIndex(const string &indexName, const string &configuration=Market::defaultConfiguration) const override
QuantLib::Handle< QuantExt::CommodityIndex > commodityIndex(const std::string &commodityName, const std::string &configuration=Market::defaultConfiguration) const override
Handle< YieldTermStructure > equityForecastCurve(const string &eqName, const string &configuration=Market::defaultConfiguration) const override
@ data
Definition: log.hpp:77
YieldCurveType
Definition: market.hpp:59
Serializable Credit Default Swap.
Definition: namespaces.docs:23
string name
wrapped market