Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
yieldvolcurve.cpp
Go to the documentation of this file.
1/*
2Copyright (C) 2019 Quaternion Risk Management Ltd
3All rights reserved.
4
5This file is part of ORE, a free-software/open-source library
6for transparent pricing and risk analysis - http://opensourcerisk.org
7
8ORE is free software: you can redistribute it and/or modify it
9under the terms of the Modified BSD License. You should have received a
10copy of the license along with this program.
11The license is also available online at <http://opensourcerisk.org>
12
13This program is distributed on the basis that it will form a useful
14contribution to risk analytics and model standardisation, but WITHOUT
15ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19#include <algorithm>
21
22using namespace QuantLib;
23using namespace std;
24
25namespace ore {
26namespace data {
27
29 const CurveConfigurations& curveConfigs, const bool buildCalibrationInfo)
31 asof, loader, curveConfigs, curveConfigs.yieldVolCurveConfig(spec.curveConfigID()), {}, {},
32 [](const QuantLib::ext::shared_ptr<MarketDatum>& md, Period& expiry, Period& term) -> bool {
33 QuantLib::ext::shared_ptr<BondOptionQuote> q = QuantLib::ext::dynamic_pointer_cast<BondOptionQuote>(md);
34 if (q == nullptr)
35 return false;
36 expiry = q->expiry();
37 term = q->term();
38 return q->instrumentType() == MarketDatum::InstrumentType::BOND_OPTION;
39 },
40 [](const QuantLib::ext::shared_ptr<MarketDatum>& md, Period& expiry, Period& term, Real& strike) {
41 QuantLib::ext::shared_ptr<SwaptionQuote> q = QuantLib::ext::dynamic_pointer_cast<SwaptionQuote>(md);
42 return false;
43 },
44 [](const QuantLib::ext::shared_ptr<MarketDatum>& md, Period& term) {
45 QuantLib::ext::shared_ptr<SwaptionShiftQuote> q = QuantLib::ext::dynamic_pointer_cast<SwaptionShiftQuote>(md);
46 if (q == nullptr)
47 return false;
48 term = q->term();
49 return true;
50 },
51 buildCalibrationInfo),
52 spec_(spec) {}
53
54} // namespace data
55} // namespace ore
Container class for all Curve Configurations.
Wrapper class for building Generic yield volatility structures.
Market data loader base class.
Definition: loader.hpp:47
YieldVolCurve()
Default constructor.
Yield volatility curve description.
Definition: curvespec.hpp:222
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
vector< string > curveConfigs
Wrapper class for building yield volatility structures.