Logo
Fully annotated reference manual - version 1.8.12
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
List of all members
EquityCurve Class Reference

Wrapper class for building Equity curves (spot quote, yield term structure, risk free IR term structure) More...

#include <ored/marketdata/equitycurve.hpp>

+ Collaboration diagram for EquityCurve:

Public Member Functions

Constructors
 EquityCurve ()
 Default constructor. More...
 
 EquityCurve (Date asof, EquityCurveSpec spec, const Loader &loader, const CurveConfigurations &curveConfigs, const map< string, QuantLib::ext::shared_ptr< YieldCurve > > &requiredYieldCurves, const bool buildCalibrationInfo)
 Detailed constructor. More...
 

Inspectors

EquityCurveSpec spec_
 
EquityCurveConfig::Type curveType_
 
vector< Real > quotes_
 
vector< Date > terms_
 
DayCounter dc_
 
YieldCurve::InterpolationVariable dividendInterpVariable_
 
YieldCurve::InterpolationMethod dividendInterpMethod_
 
QuantLib::ext::shared_ptr< QuantExt::EquityIndex2equityIndex_
 
QuantLib::ext::shared_ptr< YieldCurveCalibrationInfocalibrationInfo_
 
const EquityCurveSpecspec () const
 
QuantLib::ext::shared_ptr< QuantExt::EquityIndex2equityIndex () const
 
QuantLib::ext::shared_ptr< YieldCurveCalibrationInfocalibrationInfo () const
 

Detailed Description

Wrapper class for building Equity curves (spot quote, yield term structure, risk free IR term structure)

Definition at line 44 of file equitycurve.hpp.

Constructor & Destructor Documentation

◆ EquityCurve() [1/2]

Default constructor.

Definition at line 49 of file equitycurve.hpp.

49{}

◆ EquityCurve() [2/2]

EquityCurve ( Date  asof,
EquityCurveSpec  spec,
const Loader loader,
const CurveConfigurations curveConfigs,
const map< string, QuantLib::ext::shared_ptr< YieldCurve > > &  requiredYieldCurves,
const bool  buildCalibrationInfo 
)

Detailed constructor.

Definition at line 44 of file equitycurve.cpp.

46 {
47
48 try {
49
50 const QuantLib::ext::shared_ptr<EquityCurveConfig>& config = curveConfigs.equityCurveConfig(spec.curveConfigID());
51
52 dc_ = Actual365Fixed();
53 if (config->dayCountID() == "") {
54 DLOG("No Day Count convention specified for " << spec.curveConfigID() << ", using A365F as default");
55 } else {
56 dc_ = parseDayCounter(config->dayCountID());
57 }
58
59 // set the calendar to the ccy based calendar, if provided by config we try to use that
60 Calendar calendar;
61 if (!config->calendar().empty()) {
62 try {
63 calendar = parseCalendar(config->calendar());
64 } catch (exception& ex) {
65 WLOG("Failed to get Calendar name for " << config->calendar() << ":" << ex.what());
66 }
67 }
68 if (calendar.empty()) {
69 calendar = parseCalendar(config->currency());
70 }
71
72 // Set the Curve type - EquityFwd / OptionPrice / DividendYield
73 curveType_ = config->type();
74
75 // declare spot and yields
76 Handle<Quote> equitySpot;
77 Handle<YieldTermStructure> forecastYieldTermStructure;
78 Handle<YieldTermStructure> dividendYieldTermStructure;
79
80 // Set the Equity Forecast curve
81 YieldCurveSpec ycspec(config->currency(), config->forecastingCurve());
82
83 // at this stage we should have built the curve already
84 // (consider building curve on fly if not? Would need to work around fact that requiredYieldCurves is currently
85 // const ref)
86 auto itr = requiredYieldCurves.find(ycspec.name());
87 QL_REQUIRE(itr != requiredYieldCurves.end(),
88 "Yield Curve Spec - " << ycspec.name() << " - not found during equity curve build");
89 QuantLib::ext::shared_ptr<YieldCurve> yieldCurve = itr->second;
90 forecastYieldTermStructure = yieldCurve->handle();
91
92 // Set the interpolation variables
93 dividendInterpVariable_ = parseYieldCurveInterpolationVariable(config->dividendInterpolationVariable());
94 dividendInterpMethod_ = parseYieldCurveInterpolationMethod(config->dividendInterpolationMethod());
95
96 // We loop over all market data, looking for quotes that match the configuration
97 // until we found the whole set of quotes or do not have more quotes in the
98 // market data
99
100 vector<QuantLib::ext::shared_ptr<EquityForwardQuote>> qt; // for sorting quotes_/terms_ pairs
101 vector<QuantLib::ext::shared_ptr<EquityOptionQuote>> oqt; // store any equity vol quotes
102 Size quotesRead = 0;
103 Size quotesExpired = 0;
104 // in case of wild-card in config
105 auto wildcard = getUniqueWildcard(config->fwdQuotes());
106
107 if ((config->type() == EquityCurveConfig::Type::ForwardPrice ||
109 config->type() == EquityCurveConfig::Type::OptionPremium) &&
110 wildcard) {
111 DLOG("Wild card quote specified for " << config->curveID())
112 } else {
113 if (config->type() == EquityCurveConfig::Type::OptionPremium) {
114 oqt.reserve(config->fwdQuotes().size());
115 } else {
116 quotes_.reserve(config->fwdQuotes().size());
117 terms_.reserve(config->fwdQuotes().size());
118 }
119 }
120
121 // load the quotes
122
123 auto q = QuantLib::ext::dynamic_pointer_cast<EquitySpotQuote>(loader.get(config->equitySpotQuoteID(), asof));
124 QL_REQUIRE(q != nullptr, "expected '" << config->equitySpotQuoteID() << "' to be an EquitySpotQuote");
125 Real spot = convertMinorToMajorCurrency(q->ccy(), q->quote()->value());
126 // convert quote from minor to major currency if needed
127 equitySpot = Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(spot));
128
129 if ((config->type() == EquityCurveConfig::Type::ForwardPrice ||
131 if (wildcard) {
132 for (auto const& md : loader.get(*wildcard, asof)) {
133 auto q = QuantLib::ext::dynamic_pointer_cast<EquityForwardQuote>(md);
134 QL_REQUIRE(q != nullptr, "expected '" << md->name() << "' to be an EquityForwardQuote");
135 QL_REQUIRE(find(qt.begin(), qt.end(), q) == qt.end(),
136 "duplicate market datum found for " << q->name());
137 if (asof < q->expiryDate()) {
138 DLOG("EquityCurve Forward Price found for quote: " << q->name());
139 qt.push_back(q); // terms_ and quotes_
140 quotesRead++;
141 } else {
142 ++quotesExpired;
143 DLOG("Ignore expired ForwardPrice/ForwardDividendPrice quote "
144 << q->name() << ", expired at " << io::iso_date(q->expiryDate()));
145 }
146 }
147 } else {
148 for (auto const& md :
149 loader.get(std::set<std::string>(config->fwdQuotes().begin(), config->fwdQuotes().end()), asof)) {
150 auto q = QuantLib::ext::dynamic_pointer_cast<EquityForwardQuote>(md);
151 QL_REQUIRE(q != nullptr, "expected '" << md->name() << "' to be an EquityForwardQuote");
152 if (asof < q->expiryDate()) {
153 bool isUnique = find(terms_.begin(), terms_.end(), q->expiryDate()) == terms_.end();
154 QL_REQUIRE(isUnique, "duplicate market datum found for " << q->name());
155 terms_.push_back(q->expiryDate());
156 // convert quote from minor to major currency if needed
157 quotes_.push_back(convertMinorToMajorCurrency(q->ccy(), q->quote()->value()));
158 quotesRead++;
159 } else {
160 DLOG("Ignore expired ForwardPrice/ForwardDividendPrice quote "
161 << q->name() << ", expired at " << io::iso_date(q->expiryDate()));
162 ++quotesExpired;
163 }
164 }
165 }
166 }
167
168 if (config->type() == EquityCurveConfig::Type::OptionPremium) {
169 if (wildcard) {
170 for (auto const& md : loader.get(*wildcard, asof)) {
171 auto q = QuantLib::ext::dynamic_pointer_cast<EquityOptionQuote>(md);
172 QL_REQUIRE(q != nullptr, "expected '" << md->name() << "' to be an EquityOptionQuote");
173 QL_REQUIRE(find(oqt.begin(), oqt.end(), q) == oqt.end(),
174 "duplicate market datum found for " << q->name());
175 if (asof < parseDate(q->expiry())) {
176 DLOG("EquityCurve Volatility Price found for quote: " << q->name());
177 oqt.push_back(q);
178 quotesRead++;
179 } else {
180 ++quotesExpired;
181 DLOG("Ignore expired OptionPremium quote " << q->name() << ", expired at " << q->expiry());
182 }
183 }
184 } else {
185 for (auto const& md :
186 loader.get(std::set<std::string>(config->fwdQuotes().begin(), config->fwdQuotes().end()), asof)) {
187 auto q = QuantLib::ext::dynamic_pointer_cast<EquityOptionQuote>(md);
188 QL_REQUIRE(q != nullptr, "expected '" << md->name() << "' to be an EquityOptionQuote");
189 if (asof < parseDate(q->expiry())) {
190 DLOG("EquityCurve Volatility Price found for quote: " << q->name());
191 oqt.push_back(q);
192 quotesRead++;
193 } else {
194 ++quotesExpired;
195 DLOG("Ignore expired OptionPremium quote " << q->name() << ", expired at " << q->expiry());
196 }
197 }
198 }
199 }
200
201 if (config->type() == EquityCurveConfig::Type::DividendYield) {
202 for (auto const& md :
203 loader.get(std::set<std::string>(config->fwdQuotes().begin(), config->fwdQuotes().end()), asof)) {
204 QuantLib::ext::shared_ptr<EquityDividendYieldQuote> q =
205 QuantLib::ext::dynamic_pointer_cast<EquityDividendYieldQuote>(md);
206 QL_REQUIRE(q != nullptr, "expected '" << md->name() << "' to be an EquityDividendYieldQuote");
207 if (q->tenorDate() > asof) {
208 bool isUnique = find(terms_.begin(), terms_.end(), q->tenorDate()) == terms_.end();
209 QL_REQUIRE(isUnique, "duplicate market datum found for " << q->name());
210 DLOG("EquityCurve Dividend Yield found for quote: " << q->name());
211 terms_.push_back(q->tenorDate());
212 quotes_.push_back(q->quote()->value());
213 quotesRead++;
214 } else {
215 DLOG("Ignore expired DividendYield quote " << q->name() << ", expired at "
216 << io::iso_date(q->tenorDate()));
217 ++quotesExpired;
218 }
219 }
220 }
221
222 // some checks on the quotes read
223 DLOG("EquityCurve: read " << quotesRead + quotesExpired << " quotes of type " << config->type());
224 DLOG("EquityCurve: ignored " << quotesExpired << " expired quotes.");
225
226 if (!wildcard) {
227 QL_REQUIRE(quotesRead + quotesExpired == config->fwdQuotes().size(),
228 "read " << quotesRead << "quotes and " << quotesExpired << " expire quotes, but "
229 << config->fwdQuotes().size() << " required.");
230 }
231
232 // Sort the quotes and terms by date
233
234 QL_REQUIRE(terms_.size() == quotes_.size(), "Internal error: terms and quotes mismatch");
235 if (!terms_.empty()) {
236 vector<pair<Date, Real>> tmpSort;
237
238 std::transform(terms_.begin(), terms_.end(), quotes_.begin(), back_inserter(tmpSort),
239 [](const Date& d, const Real& q) { return make_pair(d, q); });
240
241 std::sort(tmpSort.begin(), tmpSort.end(), [](const pair<Date, Real>& left, const pair<Date, Real>& right) {
242 return left.first < right.first;
243 });
244
245 for (Size i = 0; i < tmpSort.size(); ++i) {
246 terms_[i] = tmpSort[i].first;
247 quotes_[i] = tmpSort[i].second;
248 }
249
250 for (Size i = 0; i < terms_.size(); i++) {
251 QL_REQUIRE(terms_[i] > asof, "Invalid Fwd Expiry " << terms_[i] << " vs. " << asof);
252 if (i > 0) {
253 QL_REQUIRE(terms_[i] > terms_[i - 1], "terms must be increasing in curve config");
254 }
255 }
256 }
257
258 // the curve type that we will build
259 EquityCurveConfig::Type buildCurveType = curveType_;
260
261 // for curveType ForwardPrice or OptionPremium populate the terms_ and quotes_ with forward prices
264
265 if (qt.size() > 0) {
266 DLOG("Building Equity Dividend Yield curve from Forward/Future prices");
267
268 // sort quotes and terms in case of wild-card
269 if (wildcard) {
270 QL_REQUIRE(quotesRead > 0, "Wild card quote specified, but no quotes read.");
271
272 // sort
273 std::sort(qt.begin(), qt.end(),
274 [](const QuantLib::ext::shared_ptr<EquityForwardQuote>& a,
275 const QuantLib::ext::shared_ptr<EquityForwardQuote>& b) -> bool {
276 return a->expiryDate() < b->expiryDate();
277 });
278
279 // populate individual quote, term vectors
280 for (Size i = 0; i < qt.size(); i++) {
281 terms_.push_back(qt[i]->expiryDate());
282 // convert quote from minor to major currency if needed
283 quotes_.push_back(convertMinorToMajorCurrency(qt[i]->ccy(), qt[i]->quote()->value()));
284 }
285 }
286 }
287 if (quotes_.size() == 0) {
288 DLOG("No Equity Forward quotes provided for " << config->curveID()
289 << ", continuing without dividend curve.");
291 }
293
294 if (oqt.size() == 0) {
295 DLOG("No Equity Option quotes provided for " << config->curveID()
296 << ", continuing without dividend curve.");
298 } else {
299 DLOG("Building Equity Dividend Yield curve from Option Volatilities");
300 vector<QuantLib::ext::shared_ptr<EquityOptionQuote>> calls, puts;
301 vector<Date> callDates, putDates;
302 vector<Real> callStrikes, putStrikes;
303 vector<Real> callPremiums, putPremiums;
304 Calendar cal = NullCalendar();
305
306 // Split the quotes into call and puts
307 for (auto q : oqt) {
308 if (q->quote()->value() > 0) {
309 if (q->isCall()) {
310 calls.push_back(q);
311 } else {
312 puts.push_back(q);
313 }
314 }
315 }
316
317 // loop through the quotes and get the expiries, strikes, vols and types
318 // We only want overlapping expiry/strike pairs
319 for (Size i = 0; i < calls.size(); i++) {
320 for (Size j = 0; j < puts.size(); j++) {
321 if (calls[i]->expiry() == puts[j]->expiry()) {
322 auto callAbsoluteStrike = QuantLib::ext::dynamic_pointer_cast<AbsoluteStrike>(calls[i]->strike());
323 auto putAbsoluteStrike = QuantLib::ext::dynamic_pointer_cast<AbsoluteStrike>(puts[j]->strike());
324 QL_REQUIRE(callAbsoluteStrike, "Expected absolute strike for quote " << calls[i]->name());
325 QL_REQUIRE(putAbsoluteStrike, "Expected absolute strike for quote " << puts[j]->name());
326 if (*calls[i]->strike() == *puts[j]->strike()) {
327 TLOG("Adding Call and Put for strike/expiry pair : " << calls[i]->expiry() << "/"
328 << calls[i]->strike()->toString());
329 callDates.push_back(getDateFromDateOrPeriod(calls[i]->expiry(), asof));
330 putDates.push_back(getDateFromDateOrPeriod(puts[j]->expiry(), asof));
331
332 // convert strike to major currency if quoted in minor
333 Real callStrike =
334 convertMinorToMajorCurrency(calls[i]->ccy(), callAbsoluteStrike->strike());
335 Real putStrike =
336 convertMinorToMajorCurrency(puts[j]->ccy(), putAbsoluteStrike->strike());
337 callStrikes.push_back(callStrike);
338 putStrikes.push_back(putStrike);
339 // convert premium to major currency if quoted in minor
340 callPremiums.push_back(
341 convertMinorToMajorCurrency(calls[i]->ccy(), calls[i]->quote()->value()));
342 putPremiums.push_back(
343 convertMinorToMajorCurrency(puts[j]->ccy(), puts[j]->quote()->value()));
344 }
345 }
346 }
347 }
348
349 if (callDates.size() > 0 && putDates.size() > 0) {
350 DLOG("Found " << callDates.size() << " Call and Put Option Volatilities");
351
352 DLOG("Building a Sparse Volatility surface for calls and puts");
353 // Build a Black Variance Sparse matrix
354 QuantLib::ext::shared_ptr<OptionPriceSurface> callSurface =
355 QuantLib::ext::make_shared<OptionPriceSurface>(asof, callDates, callStrikes, callPremiums, dc_);
356 QuantLib::ext::shared_ptr<OptionPriceSurface> putSurface =
357 QuantLib::ext::make_shared<OptionPriceSurface>(asof, putDates, putStrikes, putPremiums, dc_);
358 DLOG("CallSurface contains " << callSurface->expiries().size() << " expiries.");
359
360 DLOG("Stripping equity forwards from the option premium surfaces");
361 QuantLib::ext::shared_ptr<EquityForwardCurveStripper> efcs = QuantLib::ext::make_shared<EquityForwardCurveStripper>(
362 callSurface, putSurface, forecastYieldTermStructure, equitySpot, config->exerciseStyle());
363
364 // set terms and quotes from the stripper
365 terms_ = efcs->expiries();
366 quotes_ = efcs->forwards();
367 } else {
368 DLOG("No overlapping call and put quotes for equity " << spec.curveConfigID()
369 << " building NoDividends curve");
371 }
372 }
373 }
374
375 // Build the Dividend Yield curve from the quotes loaded
376 vector<Rate> dividendRates;
377 if (buildCurveType == EquityCurveConfig::Type::ForwardPrice ||
379 buildCurveType == EquityCurveConfig::Type::OptionPremium) {
380 // Convert Fwds into dividends.
381 // Fwd = Spot e^{(r-q)T}
382 // => q = 1/T Log(Spot/Fwd) + r
383 for (Size i = 0; i < quotes_.size(); i++) {
384 QL_REQUIRE(quotes_[i] > 0, "Invalid Forward Price " << quotes_[i] << " for " << spec_.name()
385 << ", expiry: " << terms_[i]);
386 Time t = dc_.yearFraction(asof, terms_[i]);
387 Rate ir_rate = forecastYieldTermStructure->zeroRate(t, Continuous);
388 dividendRates.push_back(::log(equitySpot->value() / quotes_[i]) / t + ir_rate);
389 }
390 } else if (buildCurveType == EquityCurveConfig::Type::DividendYield) {
391 DLOG("Building Equity Dividend Yield curve from Dividend Yield rates");
392 dividendRates = quotes_;
393 } else if (buildCurveType == EquityCurveConfig::Type::NoDividends) {
394 DLOG("Building flat Equity Dividend Yield curve as no quotes provided");
395 // Return a flat curve @ 0%
396 dividendYieldTermStructure = Handle<YieldTermStructure>(QuantLib::ext::make_shared<FlatForward>(asof, 0.0, dc_));
398 QuantLib::ext::make_shared<EquityIndex2>(spec.curveConfigID(), calendar, parseCurrency(config->currency()),
399 equitySpot, forecastYieldTermStructure, dividendYieldTermStructure);
400 return;
401 } else
402 QL_FAIL("Invalid Equity curve configuration type for " << spec_.name());
403
404 QL_REQUIRE(dividendRates.size() > 0, "No dividend yield rates extracted for " << spec_.name());
405 QL_REQUIRE(dividendRates.size() == terms_.size(), "vector size mismatch - dividend rates ("
406 << dividendRates.size() << ") vs terms (" << terms_.size()
407 << ")");
408
409 // store "dividend discount factors" - in case we wish to interpolate according to discounts
410 vector<Real> dividendDiscountFactors;
411 for (Size i = 0; i < quotes_.size(); i++) {
412 Time t = dc_.yearFraction(asof, terms_[i]);
413 dividendDiscountFactors.push_back(std::exp(-dividendRates[i] * t));
414 }
415
416 QuantLib::ext::shared_ptr<YieldTermStructure> baseDivCurve;
417 // Build Dividend Term Structure
418 if (dividendRates.size() == 1) {
419 // We only have 1 quote so we build a flat curve
420 baseDivCurve.reset(new FlatForward(asof, dividendRates[0], dc_));
421 } else {
422 // Build a ZeroCurve
423 Size n = terms_.size();
424 vector<Date> dates(n + 1); // n+1 so we include asof
425 vector<Rate> rates(n + 1);
426 vector<Real> discounts(n + 1);
427 for (Size i = 0; i < n; i++) {
428 dates[i + 1] = terms_[i];
429 rates[i + 1] = dividendRates[i];
430 discounts[i + 1] = dividendDiscountFactors[i];
431 }
432 dates[0] = asof;
433 rates[0] = rates[1];
434 discounts[0] = 1.0;
435 if (forecastYieldTermStructure->maxDate() > dates.back()) {
436 dates.push_back(forecastYieldTermStructure->maxDate());
437 rates.push_back(rates.back());
438 Time maxTime = dc_.yearFraction(asof, forecastYieldTermStructure->maxDate());
439 discounts.push_back(
440 std::exp(-rates.back() * maxTime)); // flat zero extrapolation used to imply dividend DF
441 }
443 baseDivCurve = zerocurve(dates, rates, dc_, dividendInterpMethod_);
445 baseDivCurve = discountcurve(dates, discounts, dc_, dividendInterpMethod_);
446 } else {
447 QL_FAIL("Unsupported interpolation variable for dividend yield curve");
448 }
449 }
450
451 QuantLib::ext::shared_ptr<YieldTermStructure> divCurve;
452 if (config->extrapolation()) {
453 divCurve = baseDivCurve;
454 divCurve->enableExtrapolation();
455 } else {
456 divCurve = QuantLib::ext::make_shared<FlatForwardDividendCurve>(
457 asof, Handle<YieldTermStructure>(baseDivCurve), forecastYieldTermStructure);
458 if (config->dividendExtrapolation())
459 divCurve->enableExtrapolation();
460 }
461
462 dividendYieldTermStructure = Handle<YieldTermStructure>(divCurve);
463
465 QuantLib::ext::make_shared<EquityIndex2>(spec.curveConfigID(), calendar, parseCurrency(config->currency()),
466 equitySpot, forecastYieldTermStructure, dividendYieldTermStructure);
467
468 if (buildCalibrationInfo) {
469
470 // set calibration info
471
472 calibrationInfo_ = QuantLib::ext::make_shared<YieldCurveCalibrationInfo>();
473 calibrationInfo_->dayCounter = dc_.name();
474 calibrationInfo_->currency = config->currency();
475 for (auto const& p : YieldCurveCalibrationInfo::defaultPeriods) {
476 Date d = asof + p;
477 calibrationInfo_->pillarDates.push_back(d);
478 calibrationInfo_->zeroRates.push_back(dividendYieldTermStructure->zeroRate(d, dc_, Continuous));
479 calibrationInfo_->discountFactors.push_back(dividendYieldTermStructure->discount(d));
480 calibrationInfo_->times.push_back(dividendYieldTermStructure->timeFromReference(d));
481 }
482 }
483
484 } catch (std::exception& e) {
485 QL_FAIL("equity curve building failed: " << e.what());
486 } catch (...) {
487 QL_FAIL("equity curve building failed: unknown error");
488 }
489};
const std::string & curveConfigID() const
Definition: curvespec.hpp:83
string name() const
returns the unique curve name
Definition: curvespec.hpp:78
Type
Supported equity curve types.
const EquityCurveSpec & spec() const
Definition: equitycurve.hpp:56
EquityCurveConfig::Type curveType_
Definition: equitycurve.hpp:62
YieldCurve::InterpolationVariable dividendInterpVariable_
Definition: equitycurve.hpp:66
vector< Date > terms_
Definition: equitycurve.hpp:64
YieldCurve::InterpolationMethod dividendInterpMethod_
Definition: equitycurve.hpp:67
vector< Real > quotes_
Definition: equitycurve.hpp:63
EquityCurveSpec spec_
Definition: equitycurve.hpp:61
QuantLib::ext::shared_ptr< YieldCurveCalibrationInfo > calibrationInfo_
Definition: equitycurve.hpp:69
QuantLib::ext::shared_ptr< QuantExt::EquityIndex2 > equityIndex_
Definition: equitycurve.hpp:68
SafeStack< ValueType > value
Date getDateFromDateOrPeriod(const string &token, Date asof, QuantLib::Calendar cal, QuantLib::BusinessDayConvention bdc)
Get a date from a date string or period.
Calendar parseCalendar(const string &s)
Convert text to QuantLib::Calendar.
Definition: parsers.cpp:157
Date parseDate(const string &s)
Convert std::string to QuantLib::Date.
Definition: parsers.cpp:51
QuantLib::Real convertMinorToMajorCurrency(const std::string &s, QuantLib::Real value)
Convert a value from a minor ccy to major.
Definition: parsers.cpp:324
Currency parseCurrency(const string &s)
Convert text to QuantLib::Currency.
Definition: parsers.cpp:290
DayCounter parseDayCounter(const string &s)
Convert text to QuantLib::DayCounter.
Definition: parsers.cpp:209
#define DLOG(text)
Logging Macro (Level = Debug)
Definition: log.hpp:554
#define WLOG(text)
Logging Macro (Level = Warning)
Definition: log.hpp:550
#define TLOG(text)
Logging Macro (Level = Data)
Definition: log.hpp:556
Calendar calendar
Definition: utilities.cpp:441
RandomVariable log(RandomVariable x)
YieldCurve::InterpolationVariable parseYieldCurveInterpolationVariable(const string &s)
Helper function for parsing interpolation variable.
Definition: yieldcurve.cpp:223
QuantLib::ext::shared_ptr< YieldTermStructure > discountcurve(const vector< Date > &dates, const vector< DiscountFactor > &dfs, const DayCounter &dayCounter, YieldCurve::InterpolationMethod interpolationMethod, Size n)
Create a Interpolated Discount Curve and apply interpolators.
Definition: yieldcurve.cpp:166
YieldCurve::InterpolationMethod parseYieldCurveInterpolationMethod(const string &s)
Helper function for parsing interpolation method.
Definition: yieldcurve.cpp:180
QuantLib::ext::shared_ptr< YieldTermStructure > zerocurve(const vector< Date > &dates, const vector< Rate > &yields, const DayCounter &dayCounter, YieldCurve::InterpolationMethod interpolationMethod, Size n)
Create a Interpolated Zero Curve and apply interpolators.
Definition: yieldcurve.cpp:160
boost::optional< Wildcard > getUniqueWildcard(const C &c)
checks if at most one element in C has a wild card and returns it in this case
Definition: wildcard.hpp:65
static const std::vector< QuantLib::Period > defaultPeriods
vector< string > curveConfigs
string name
+ Here is the call graph for this function:

Member Function Documentation

◆ spec()

const EquityCurveSpec & spec ( ) const

Definition at line 56 of file equitycurve.hpp.

56{ return spec_; };
+ Here is the caller graph for this function:

◆ equityIndex()

QuantLib::ext::shared_ptr< QuantExt::EquityIndex2 > equityIndex ( ) const

Definition at line 57 of file equitycurve.hpp.

57{ return equityIndex_; };

◆ calibrationInfo()

QuantLib::ext::shared_ptr< YieldCurveCalibrationInfo > calibrationInfo ( ) const

Definition at line 58 of file equitycurve.hpp.

58{ return calibrationInfo_; }

Member Data Documentation

◆ spec_

EquityCurveSpec spec_
private

Definition at line 61 of file equitycurve.hpp.

◆ curveType_

EquityCurveConfig::Type curveType_
private

Definition at line 62 of file equitycurve.hpp.

◆ quotes_

vector<Real> quotes_
private

Definition at line 63 of file equitycurve.hpp.

◆ terms_

vector<Date> terms_
private

Definition at line 64 of file equitycurve.hpp.

◆ dc_

DayCounter dc_
private

Definition at line 65 of file equitycurve.hpp.

◆ dividendInterpVariable_

YieldCurve::InterpolationVariable dividendInterpVariable_
private

Definition at line 66 of file equitycurve.hpp.

◆ dividendInterpMethod_

YieldCurve::InterpolationMethod dividendInterpMethod_
private

Definition at line 67 of file equitycurve.hpp.

◆ equityIndex_

QuantLib::ext::shared_ptr<QuantExt::EquityIndex2> equityIndex_
private

Definition at line 68 of file equitycurve.hpp.

◆ calibrationInfo_

QuantLib::ext::shared_ptr<YieldCurveCalibrationInfo> calibrationInfo_
private

Definition at line 69 of file equitycurve.hpp.