Skip to content

Commit 34fcad1

Browse files
author
jenkins
committed
git subrepo pull (merge) ore
subrepo: subdir: "ore" merged: "a7f7c3f3e8" upstream: origin: "git@gitlab.acadiasoft.net:qs/ore.git" branch: "master" commit: "dcbdff3da9" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "73a0129"
2 parents 0143215 + dcbdff3 commit 34fcad1

24 files changed

Lines changed: 99 additions & 194 deletions

Docs/UserGuide/allowablevalues.tex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ \subsection{Allowable Values}
146146
\emph{US-NYSE, New York stock exchange} & US NYSE Calendar \\ \hline
147147
\emph{US with Libor impact} & US Calendar for Libor fixings \\ \hline
148148
\emph{US-NERC} & US NERC Calendar \\ \hline
149+
\emph{US-SOFR} & US SOFR fixing Calendar \\ \hline
149150
\emph{AR, ARG, ARS} & Argentina Calendar \\ \hline
150151
\emph{AU, AUD, AUS} & Australia Calendar \\ \hline
151152
\emph{AT, AUT, ATS} & Austria Calendar \\ \hline
@@ -211,6 +212,7 @@ \subsection{Allowable Values}
211212
\emph{XLON} & UK London Stock Exchange \\ \hline
212213
\emph{XLME} & UK London Metal Exchange \\ \hline
213214
\emph{XNYS} & US New York Stock Exchange Calendar \\ \hline
215+
\emph{XPAR} & Paris stock exchange \\ \hline
214216
\emph{WMR} & Thomson Reuters QM/Reuters Spot \\ \hline
215217
\emph{WeekendsOnly} & Weekends Only Calendar \\ \hline
216218
\emph{ICE\_FuturesUS} & ICE Futures U.S. Currency, Stock and Credit Index, Metal, Nat Gas, Power, Oil and Environmental \\ \hline
@@ -235,7 +237,7 @@ \subsection{Allowable Values}
235237
% \emph{LNB\_NYB\_ZUB} & UK, US and Switzerland Calendar \\ \hline
236238
% \emph{LNB\_NYB\_TRB} & UK, US and Canada Calendar \\ \hline
237239
% \emph{LNB\_NYB\_TKB} & UK, US and Japan Calendar \\ \hline
238-
% \emph{NullCalendar} & Null Calendar, i.e. all days are business days \\ \hline
240+
\emph{NullCalendar, Null} & Null Calendar, i.e. all days are business days \\ \hline
239241
\caption{Allowable Values for Calendar. Combinations of calendars can be provided using comma separated calendar names.}
240242
\label{tab:calendar}
241243
\end{longtable}

Docs/UserGuide/tradedata/callableswap.tex

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
\subsubsection{Callable Swap}\label{ss:callable_swap}
22

33
The \lstinline!CallableSwapData! node is the trade data container for the \emph{CallableSwap} trade type. A Callable Swap is a
4-
two-legged swap that can be cancelled at predefined dates by one of the counterparties. A Callable Swap must have two legs,
5-
one fixed and one floating, each described by a \lstinline!LegData! trade component sub-node as described in section
6-
\ref{ss:leg_data}. There must be at least one full coupon period after the exercise date for European
7-
Callable Swaps, and after the last exercise date for Bermudan and American Callable Swaps. The \lstinline!CallableSwapData! node also contains an \lstinline!OptionData! node which describes
4+
swap that can be cancelled at predefined dates by one of the counterparties. A Callable Swap must have at least one leg, each leg described by a \lstinline!LegData! trade component sub-node as described in section
5+
\ref{ss:leg_data}.
6+
7+
There must be at least one full coupon period after the exercise date for European Callable Swaps, and after the last exercise date for Bermudan and American Callable Swaps.
8+
9+
The \lstinline!CallableSwapData! node also contains an \lstinline!OptionData! node which describes
810
the exercise dates and specifies which party holds the call right, see \ref{ss:option_data}. An example structure of a
911
\lstinline!CallableSwapData! node is shown in Listing \ref{lst:callableswap_data}.
1012

@@ -58,5 +60,7 @@ \subsubsection{Callable Swap}\label{ss:callable_swap}
5860
underlying Swap. A Callable Swap must have at least one leg on the underlying Swap, but can have multiple legs,
5961
i.e. multiple \lstinline!LegData! nodes. The LegType elements must be of types \emph{Floating}, \emph{Fixed} or
6062
\emph{Cashflow}. All legs must have the same \lstinline!Currency!.
63+
64+
Note that the direction of the legs, determined by the \lstinline!Payer! tag, is like for a Swap, from the perspective of the party to the trade. I.e. unlike for a Swaption where the direction of the legs is from the perspective of the party that is long.
6165

6266
\end{itemize}

Docs/UserGuide/tradedata/window_barrieroption.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ \subsubsection{Window Barrier Option}
5555
5656
\item Currency: The payout currency. The result of the payout formula above is treated to be in this currency. Note that
5757
for (non-quanto) FxWindowBarrierOption this should be the domestic (\lstinline!CCY2!) currency. For non-quanto Equity-
58-
and CommodityAccumulators this should be the currency the equity or commodity is quoted in. Notice section
58+
and CommodityWindowBarrierOptions this should be the currency the equity or commodity is quoted in. Notice section
5959
\ref{sss:payccy_st}. \\
6060
6161
Allowable values: See Table \ref{tab:currency} \lstinline!Currency!.
6262
63-
\item FixingAmount: The notional amount. For FxAccumulators: The FixingAmount is expressed in the foreign currency
64-
(\lstinline!CCY1!). For EquityAccumulators: The FixingAmount is expressed as number of shares/units of the underlying
65-
equity or equity index. For CommodityAccumulators: The FixingAmount is expressed as number of units of the underlying
63+
\item FixingAmount: The notional amount. For FxWindowBarrierOptions: The FixingAmount is expressed in the foreign currency
64+
(\lstinline!CCY1!). For EquityWindowBarrierOptions: The FixingAmount is expressed as number of shares/units of the underlying
65+
equity or equity index. For CommodityWindowBarrierOptions: The FixingAmount is expressed as number of units of the underlying
6666
commodity. \\
6767
6868
Allowable values: Any positive real number.
@@ -84,10 +84,10 @@ \subsubsection{Window Barrier Option}
8484
number. The currency provided in this node may be quoted as corresponding minor currency to the underlying major
8585
currency.
8686
87-
\item Strike [Optional]: For FxAccumulators: The the fx strike rate is defined as amount in domestic currency
88-
(\lstinline!CCY2!) for one unit of foreign currency (\lstinline!CCY1!). For Equity- and CommodityAccumulators: The
87+
\item Strike [Optional]: For FxWindowBarrierOptions: The the fx strike rate is defined as amount in domestic currency
88+
(\lstinline!CCY2!) for one unit of foreign currency (\lstinline!CCY1!). For Equity- and CommodityWindowBarrierOptions: The
8989
strike value for one unit/share/contract of the underlying equity or commodity, expressed in the currency the equity
90-
or commodity is quoted in. For EquityAccumulators, the \lstinline!StrikeData! node (see above) should be used. \\
90+
or commodity is quoted in. For EquityWindowBarrierOptions, the \lstinline!StrikeData! node (see above) should be used. \\
9191
9292
Allowable values: Any positive real number.
9393

OREAnalytics/orea/aggregation/dimcalculator.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
#include <ql/errors.hpp>
2525
#include <ql/time/calendars/weekendsonly.hpp>
26-
#include <ql/version.hpp>
2726
#include <ql/math/distributions/normaldistribution.hpp>
2827
#include <ql/math/generallinearleastsquares.hpp>
2928
#include <ql/math/kernelfunctions.hpp>

OREAnalytics/orea/aggregation/dimregressioncalculator.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include <ored/utilities/vectorutils.hpp>
2222
#include <ql/errors.hpp>
2323
#include <ql/time/calendars/weekendsonly.hpp>
24-
#include <ql/version.hpp>
2524

2625
#include <ql/math/distributions/normaldistribution.hpp>
2726
#include <ql/math/generallinearleastsquares.hpp>
@@ -109,13 +108,8 @@ void RegressionDynamicInitialMarginCalculator::build() {
109108
LsmBasisSystem::PolynomialType polynomType = LsmBasisSystem::Monomial;
110109
Size regressionDimension = regressors_.empty() ? 1 : regressors_.size();
111110
LOG("DIM regression dimension = " << regressionDimension);
112-
#if QL_HEX_VERSION > 0x01150000
113111
std::vector<ext::function<Real(Array)>> v(
114112
LsmBasisSystem::multiPathBasisSystem(regressionDimension, polynomOrder, polynomType));
115-
#else // QL 1.14 and below
116-
std::vector<boost::function1<Real, Array>> v(
117-
LsmBasisSystem::multiPathBasisSystem(regressionDimension, polynomOrder, polynomType));
118-
#endif
119113
Real confidenceLevel = QuantLib::InverseCumulativeNormal()(quantile_);
120114
LOG("DIM confidence level " << confidenceLevel);
121115

OREAnalytics/orea/aggregation/postprocess.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <ored/utilities/vectorutils.hpp>
2929
#include <ql/errors.hpp>
3030
#include <ql/time/calendars/weekendsonly.hpp>
31-
#include <ql/version.hpp>
3231

3332
#include <ql/math/distributions/normaldistribution.hpp>
3433
#include <ql/math/generallinearleastsquares.hpp>

OREAnalytics/orea/aggregation/xvacalculator.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <ored/utilities/vectorutils.hpp>
2525

2626
#include <ql/errors.hpp>
27-
#include <ql/version.hpp>
2827

2928
using namespace std;
3029
using namespace QuantLib;

OREAnalytics/orea/scenario/scenariosimmarketparameters.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ void ScenarioSimMarketParameters::fromXML(XMLNode* root) {
815815
auto keys = XMLUtils::getChildrenValues(nodeChild, "Keys", "Key", false);
816816
if(!ccys.empty()) {
817817
keys.insert(keys.end(), ccys.begin(), ccys.end());
818-
ALOG("ScenarioSimMarketParameters: SwaptionVolatilities/Currencies is deprecated, use Keys instead.");
818+
WLOG("ScenarioSimMarketParameters: SwaptionVolatilities/Currencies is deprecated, use Keys instead.");
819819
}
820820
setSwapVolKeys(keys);
821821
QL_REQUIRE(!keys.empty(), "SwaptionVolatilities needs at least one currency");
@@ -835,7 +835,7 @@ void ScenarioSimMarketParameters::fromXML(XMLNode* root) {
835835
string ccyAttr = XMLUtils::getAttribute(expiryNode, "ccy");
836836
if (!ccyAttr.empty()) {
837837
key = ccyAttr;
838-
ALOG("ScenarioSimMarketParameters: SwaptionVolatilities/Expiries: 'ccy' attribute is deprecated, "
838+
WLOG("ScenarioSimMarketParameters: SwaptionVolatilities/Expiries: 'ccy' attribute is deprecated, "
839839
"use 'key' instead.");
840840
}
841841
}
@@ -860,7 +860,7 @@ void ScenarioSimMarketParameters::fromXML(XMLNode* root) {
860860
string ccyAttr = XMLUtils::getAttribute(termNode, "ccy");
861861
if (!ccyAttr.empty()) {
862862
key = ccyAttr;
863-
ALOG("ScenarioSimMarketParameters: SwaptionVolatilities/Terms: 'ccy' attribute is deprecated, "
863+
WLOG("ScenarioSimMarketParameters: SwaptionVolatilities/Terms: 'ccy' attribute is deprecated, "
864864
"use 'key' instead.");
865865
}
866866
}
@@ -984,7 +984,7 @@ void ScenarioSimMarketParameters::fromXML(XMLNode* root) {
984984
auto keys = XMLUtils::getChildrenValues(nodeChild, "Keys", "Key", false);
985985
if(!ccys.empty()) {
986986
keys.insert(keys.end(), ccys.begin(), ccys.end());
987-
ALOG("ScenarioSimMarketParameters: CapFloorVolatilities/Currencies is deprecated, use Keys instead.");
987+
WLOG("ScenarioSimMarketParameters: CapFloorVolatilities/Currencies is deprecated, use Keys instead.");
988988
}
989989
setCapFloorVolKeys(keys);
990990
QL_REQUIRE(!keys.empty(), "CapFloorVolatilities needs at least one entry");
@@ -1005,7 +1005,7 @@ void ScenarioSimMarketParameters::fromXML(XMLNode* root) {
10051005
string ccyAttr = XMLUtils::getAttribute(expiryNode, "ccy");
10061006
if (!ccyAttr.empty()) {
10071007
key = ccyAttr;
1008-
ALOG("ScenarioSimMarketParameters: CapFloorVolatilities/Expiries: 'ccy' attribute is deprecated, "
1008+
WLOG("ScenarioSimMarketParameters: CapFloorVolatilities/Expiries: 'ccy' attribute is deprecated, "
10091009
"use 'key' instead.");
10101010
}
10111011
}
@@ -1030,7 +1030,7 @@ void ScenarioSimMarketParameters::fromXML(XMLNode* root) {
10301030
string ccyAttr = XMLUtils::getAttribute(strikeNode, "ccy");
10311031
if (!ccyAttr.empty()) {
10321032
key = ccyAttr;
1033-
ALOG("ScenarioSimMarketParameters: CapFloorVolatilities/Strikes: 'ccy' attribute is deprecated, "
1033+
WLOG("ScenarioSimMarketParameters: CapFloorVolatilities/Strikes: 'ccy' attribute is deprecated, "
10341034
"use 'key' instead.");
10351035
}
10361036
}

OREAnalytics/orea/scenario/sensitivityscenariodata.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ void SensitivityScenarioData::fromXML(XMLNode* root) {
276276
string ccyAttr = XMLUtils::getAttribute(child, "ccy");
277277
if(!ccyAttr.empty()) {
278278
key = ccyAttr;
279-
ALOG("SensitivityData: attribute 'ccy' for SwaptionVolatilities is deprecated, use 'key' instead.");
279+
WLOG("SensitivityData: attribute 'ccy' for SwaptionVolatilities is deprecated, use 'key' instead.");
280280
}
281281
}
282282
GenericYieldVolShiftData data;
@@ -315,7 +315,7 @@ void SensitivityScenarioData::fromXML(XMLNode* root) {
315315
string ccyAttr = XMLUtils::getAttribute(child, "ccy");
316316
if(!ccyAttr.empty()) {
317317
key = ccyAttr;
318-
ALOG("SensitivityData: attribute 'ccy' for CapFloorVolatilities is deprecated, use 'key' instead.");
318+
WLOG("SensitivityData: attribute 'ccy' for CapFloorVolatilities is deprecated, use 'key' instead.");
319319
}
320320
}
321321
auto data = QuantLib::ext::make_shared<CapFloorVolShiftData>();
@@ -582,7 +582,7 @@ void SensitivityScenarioData::fromXML(XMLNode* root) {
582582
string ccyAttr = XMLUtils::getAttribute(child, "ccy");
583583
if(!ccyAttr.empty()) {
584584
key = ccyAttr;
585-
ALOG("SensitivityData: attribute 'ccy' for CapFloorVolatilities is deprecated, use 'key' instead.");
585+
WLOG("SensitivityData: attribute 'ccy' for CapFloorVolatilities is deprecated, use 'key' instead.");
586586
}
587587
}
588588
CapFloorVolShiftParData data(*capFloorVolShiftData_.find(key)->second);

OREAnalytics/orea/scenario/stressscenariodata.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ void StressTestScenarioData::fromXML(XMLNode* root) {
3636
useSpreadedTermStructures_ =
3737
ore::data::parseBool(XMLUtils::getChildValue(node, "UseSpreadedTermStructures", false, "false"));
3838

39-
40-
4139
for (XMLNode* testCase = XMLUtils::getChildNode(node, "StressTest"); testCase;
4240
testCase = XMLUtils::getNextSibling(testCase)) {
4341

@@ -57,7 +55,7 @@ void StressTestScenarioData::fromXML(XMLNode* root) {
5755
}
5856

5957
LOG("Get recovery rate shift parameters");
60-
58+
6159
test.recoveryRateShifts.clear();
6260
XMLNode* recoveryRates = XMLUtils::getChildNode(testCase, "RecoveryRates");
6361
if (recoveryRates) {
@@ -246,7 +244,7 @@ void StressTestScenarioData::fromXML(XMLNode* root) {
246244
string ccyAttr = XMLUtils::getAttribute(child, "ccy");
247245
if (!ccyAttr.empty()) {
248246
key = ccyAttr;
249-
ALOG("StressScenarioData: 'ccy' is deprecated as an attribute for CapFloorVolatilities, use 'key' "
247+
WLOG("StressScenarioData: 'ccy' is deprecated as an attribute for CapFloorVolatilities, use 'key' "
250248
"instead.");
251249
}
252250
}
@@ -293,8 +291,9 @@ void StressTestScenarioData::fromXML(XMLNode* root) {
293291

294292
void curveShiftDataToXml(ore::data::XMLDocument& doc, XMLNode* node,
295293
const std::map<std::string, StressTestScenarioData::CurveShiftData>& data,
296-
const std::string& identifier, const std::string& nodeName, const std::string& parentNodeName=std::string()) {
297-
std::string name = parentNodeName.empty() ? nodeName + "s" : parentNodeName;
294+
const std::string& identifier, const std::string& nodeName,
295+
const std::string& parentNodeName = std::string()) {
296+
std::string name = parentNodeName.empty() ? nodeName + "s" : parentNodeName;
298297
auto parentNode = XMLUtils::addChild(doc, node, name);
299298
for (const auto& [key, data] : data) {
300299
auto childNode = XMLUtils::addChild(doc, parentNode, nodeName);
@@ -338,7 +337,7 @@ XMLNode* StressTestScenarioData::toXML(ore::data::XMLDocument& doc) const {
338337
// Add test node
339338
auto testNode = XMLUtils::addChild(doc, node, "StressTest");
340339
XMLUtils::addAttribute(doc, testNode, "id", test.label);
341-
// Add Par Shifts node
340+
// Add Par Shifts node
342341
auto parShiftsNode = XMLUtils::addChild(doc, testNode, "ParShifts");
343342
XMLUtils::addChild(doc, parShiftsNode, "IRCurves", test.irCurveParShifts);
344343
XMLUtils::addChild(doc, parShiftsNode, "CapFloorVolatilities", test.irCapFloorParShifts);
@@ -374,16 +373,17 @@ XMLNode* StressTestScenarioData::toXML(ore::data::XMLDocument& doc) const {
374373
XMLUtils::addGenericChildAsList(doc, swaptionVolNode, "ShiftTerms", data.shiftTerms);
375374
XMLUtils::addGenericChildAsList(doc, swaptionVolNode, "ShiftExpiries", data.shiftExpiries);
376375
XMLNode* shiftSizesNode = XMLUtils::addChild(doc, swaptionVolNode, "Shifts");
377-
378-
if(data.shifts.empty()){
376+
377+
if (data.shifts.empty()) {
379378
XMLUtils::addChild(doc, shiftSizesNode, "Shift", ore::data::to_string(data.parallelShiftSize),
380379
swaptionAttributeNames, {"", ""});
381380
} else {
382-
for(const auto& [key, shift] : data.shifts){
381+
for (const auto& [key, shift] : data.shifts) {
383382
const auto& [expiry, term] = key;
384383
std::vector<std::string> attributeValues = {ore::data::to_string(expiry),
385384
ore::data::to_string(term)};
386-
XMLUtils::addChild(doc, shiftSizesNode, "Shift", ore::data::to_string(shift), swaptionAttributeNames, attributeValues);
385+
XMLUtils::addChild(doc, shiftSizesNode, "Shift", ore::data::to_string(shift),
386+
swaptionAttributeNames, attributeValues);
387387
}
388388
}
389389
}

0 commit comments

Comments
 (0)