Skip to content

Commit a4a8acd

Browse files
author
jenkins
committed
git subrepo pull (merge) ore
subrepo: subdir: "ore" merged: "e488b2e2ff" upstream: origin: "git@gitlab.acadiasoft.net:qs/ore.git" branch: "master" commit: "f8ab7f6d12" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "73a0129"
2 parents 2e5c247 + f8ab7f6 commit a4a8acd

8 files changed

Lines changed: 44 additions & 11 deletions

File tree

Docs/UserGuide/allowablevalues.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ \subsection{Allowable Values}
7676
TWD,TZS,UAH,UGX,USD,USN,UYI,UYU,UYW,UZS,
7777
VES,VND,VUV,WST,XAF,XAU,XCD,XOF,
7878
XPF,XSU,XUA,YER,ZAR,ZMW,ZWL}
79-
\\ \hline Minor Currencies & \makecell[l]{\emph{GBp, GBX} (for pennies of GBP) \\ \emph{ILa, ILX} (for agorot of ILS) \\ \emph{ZAc, ZAC, ZAX} (for cents of ZAR) \\
79+
\\ \hline Minor Currencies & \makecell[l]{\emph{GBp, GBX} (for pennies of GBP) \\ \emph{ILa, ILX, ILs, ILA} (for agorot of ILS) \\ \emph{ZAc, ZAC, ZAX} (for cents of ZAR) \\
8080
Note: Minor Currency codes are only supported for equity products. } \\ \hline
8181
%Pre-Eurozone Currencies & \emph{ATS, BEF, DEM, ESP, FIM, FRF, GRD, IEP, ITL, LUF, NLG, PTE} \\ \hline
8282
Precious Metals treated as Currencies & \emph{XAG, XAU, XPD, XPT} \\ \hline

OREAnalytics/orea/app/reportwriter.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include <qle/cashflows/equitycoupon.hpp>
3939
#include <qle/currencies/currencycomparator.hpp>
4040
#include <qle/instruments/cashflowresults.hpp>
41+
#include <qle/cashflows/durationadjustedcmscoupon.hpp>
4142

4243
#include <ql/cashflows/averagebmacoupon.hpp>
4344
#include <ql/cashflows/indexedcashflow.hpp>
@@ -401,7 +402,11 @@ void ReportWriter::writeCashflow(ore::data::Report& report, const std::string& b
401402
swaptionTenor = cms->swapIndex()->tenor();
402403
qlIndexName = cms->swapIndex()->iborIndex()->name();
403404
usesSwaptionVol = true;
404-
} else if (auto ibor = QuantLib::ext::dynamic_pointer_cast<IborCoupon>(tmp->underlying())) {
405+
}else if(auto cms = boost::dynamic_pointer_cast<DurationAdjustedCmsCoupon>(tmp->underlying())) {
406+
swaptionTenor = cms->swapIndex()->tenor();
407+
qlIndexName = cms->swapIndex()->iborIndex()->name();
408+
usesSwaptionVol = true;
409+
}else if (auto ibor = QuantLib::ext::dynamic_pointer_cast<IborCoupon>(tmp->underlying())) {
405410
qlIndexName = ibor->index()->name();
406411
usesCapVol = true;
407412
}

OREData/ored/portfolio/scriptedtrade.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ void ScriptedTrade::setIsdaTaxonomyFields() {
121121
additionalData_["isdaSubProduct"] = string("Other");
122122
additionalData_["isdaTransaction"] = string("");
123123
} else if (scheduleProductClass_ == "Commodity") {
124-
WLOG("ISDA taxonomy for trade " << id() << " and product class " << scheduleProductClass_
124+
DLOG("ISDA taxonomy for trade " << id() << " and product class " << scheduleProductClass_
125125
<< " follows the Equity template");
126126
additionalData_["isdaAssetClass"] = string("Commodity");
127127
additionalData_["isdaBaseProduct"] = string("Other");
128128
additionalData_["isdaSubProduct"] = string("");
129129
additionalData_["isdaTransaction"] = string("");
130130
} else {
131-
ALOG("ISDA taxonomy not set for trade " << id() << " and product class " << scheduleProductClass_);
131+
DLOG("ISDA taxonomy not set for trade " << id() << " and product class " << scheduleProductClass_);
132132
}
133133
}
134134

@@ -143,7 +143,7 @@ QuantLib::Real ScriptedTrade::notional() const {
143143
} catch (const std::exception& e) {
144144
if (st->lastCalculationWasValid()) {
145145
// calculation was valid, just the result is not provided
146-
ALOG("error when retrieving notional: " << e.what() << ", return null");
146+
DLOG("notional was not retrieved: " << e.what() << ", return null");
147147
} else {
148148
// calculation threw an error, propagate this
149149
QL_FAIL(e.what());
@@ -164,14 +164,14 @@ std::string ScriptedTrade::notionalCurrency() const {
164164
} catch (const std::exception& e) {
165165
if (st->lastCalculationWasValid()) {
166166
// calculation was valid, just the result is not provided
167-
ALOG("error when retrieving notional ccy: " << e.what() << ", return empty string");
167+
DLOG("notional ccy was not retrieved: " << e.what() << ", return empty string");
168168
} else {
169169
// calculation threw an error, propagate this
170170
QL_FAIL(e.what());
171171
}
172172
}
173173
// if not provided, return an empty string
174-
return "";
174+
return std::string();
175175
}
176176

177177
void ScriptedTrade::clear() {

OREData/ored/portfolio/swap.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ std::string isdaSubProductSwap(const std::string& tradeId, const vector<LegData>
328328
std::string type = legData[i].legType();
329329
if (type == "Fixed" ||
330330
type == "ZeroCouponFixed" ||
331-
type == "Cashflow")
331+
type == "Cashflow"||
332+
type == "CommodityFixed")
332333
nFixed++;
333334
else if (type == "Floating" ||
334335
type == "CPI" ||
@@ -338,7 +339,11 @@ std::string isdaSubProductSwap(const std::string& tradeId, const vector<LegData>
338339
type == "CMSSpread" ||
339340
type == "DigitalCMSSpread" ||
340341
type == "CMB" ||
341-
type == "Equity")
342+
type == "Equity"||
343+
type == "DurationAdjustedCMS"||
344+
type == "FormulaBased"||
345+
type =="CommodityFloating"||
346+
type =="EquityMargin")
342347
nFloating++;
343348
else {
344349
ALOG("leg type " << type << " not mapped for trade " << tradeId);

OREData/ored/utilities/calendarparser.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ void CalendarParser::reset() {
320320
{"GBX", UnitedKingdom()},
321321
{"ILa", QuantLib::Israel()},
322322
{"ILX", QuantLib::Israel()},
323+
{"ILs", QuantLib::Israel()},
324+
{"ILA", QuantLib::Israel()},
323325
{"ZAc", SouthAfrica()},
324326
{"ZAC", SouthAfrica()},
325327
{"ZAX", SouthAfrica()},

OREData/ored/utilities/currencyparser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ void CurrencyParser::reset() {
229229
{"ZAR", ZARCurrency()}, {"ZMW", ZMWCurrency()}};
230230

231231
minorCurrencies_ = {{"GBp", GBPCurrency()}, {"GBX", GBPCurrency()}, {"ILa", ILSCurrency()}, {"ILX", ILSCurrency()},
232-
{"KWf", KWDCurrency()}, {"ZAc", ZARCurrency()}, {"ZAC", ZARCurrency()}, {"ZAX", ZARCurrency()}};
232+
{"ILs", ILSCurrency()}, {"KWf", KWDCurrency()}, {"ILA", ILSCurrency()}, {"ZAc", ZARCurrency()},
233+
{"ZAC", ZARCurrency()}, {"ZAX", ZARCurrency()}};
233234

234235
preciousMetals_ = {{"XAG", XAGCurrency()}, {"XAU", XAUCurrency()}, {"XPT", XPTCurrency()}, {"XPD", XPDCurrency()}};
235236

Tools/PythonTools/comparison_config.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,6 +1817,24 @@
18171817
"rel_tol": null
18181818
}
18191819
]
1820+
},
1821+
"saccr.json": {
1822+
"settings": [
1823+
{
1824+
"names": [
1825+
"addOn",
1826+
"cC",
1827+
"eAD",
1828+
"multiplier",
1829+
"npv",
1830+
"pfe",
1831+
"rC",
1832+
"rW"
1833+
],
1834+
"abs_tol": 0.1,
1835+
"rel_tol": 1e-12
1836+
}
1837+
]
18201838
}
18211839
}
18221840
}

xsd/ore_types.xsd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@
270270
<xs:enumeration value="GBp" />
271271
<xs:enumeration value="GBX" />
272272
<xs:enumeration value="ILa" />
273+
<xs:enumeration value="ILA" />
273274
<xs:enumeration value="ILX" />
275+
<xs:enumeration value="ILs" />
274276
<xs:enumeration value="KWf" />
275277
<xs:enumeration value="ZAc" />
276278
<xs:enumeration value="ZAC" />
@@ -321,7 +323,7 @@
321323

322324
<xs:simpleType name="calendar">
323325
<xs:restriction base="xs:string">
324-
<xs:pattern value="(JoinHolidays\(|JoinBusinessDays\()?((,)?(, )?(^)?(TGT|TARGET|CN-IB|US-FED|US-GOV|US-NERC|US-NYSE|US-SET||Australia|Australia settlement|Botswana|Brazil|Canada|Denmark|Hungary|Japan|Norway|Switzerland|Sweden|Belgium|Finland|Luxembourg|Spain|Austria|Romania|Poland|New Zealand|FRA|CATO|CHZU|JPTO|GBLO|SEST|TRIS|USNY|EUTA|BEBR|AE|AT|AR|AU|BW|BR|CA|CL|CN|CO|CZ|DK|FI|FR|DE|HK|HU|IE|IS|IN|ID|IL|IT|JE|JP|MX|MY|NL|NO|NZ|PE|PH|PL|RO|RU|SG|ZA|KR|SE|CH|TW|TH|TR|UA|GB|US|BE|LU|ES|ARE|ARG|AUS|BWA|BRA|CAN|CHL|CHN|COL|CZE|DNK|FIN|DEU|HKG|HUN|ISL|IND|IDN|ISR|ITA|JOD|JPN|KES|LKR|MEX|MUR|MYS|NLD|NOR|NZL|PER|PHL|POL|ROU|RSD|RUS|SAU|SGP|UGX|ZAF|ZMW|KOR|SWE|CHE|TWN|THA|TUR|UKR|GBR|USA|BEL|LUX|ESP|AUT|ARS|AUD|BGN|BWP|BRL|CAD|CLP|CNH|CNY|COP|CZK|DKK|FRF|GHS|HKD|HRK|HUF|INR|IDR|ILS|IRL|ISK|ITL|JPY|MXN|MYR|NOK|NZD|PEN|PHP|PLN|RON|RUB|SAR|SGD|ZAR|KRW|SEK|CHF|EUR|TWD|THB|TRY|UAH|GBP|USD|BEF|LUF|ATS|AED|BHD|CLF|EGP|KWD|KZT|MAD|MXV|NGN|OMR|PKR|QAR|UYU|TND|AOA|GEL|ETB|XOF|VND|GBp|GBX|ILa|ILX|ZAc|ZAC|ZAX|XASX|BVMF|XTSE|XSHG|XFRA|XDUB|XETR|ECAG|EUWA|XJKT|XIDX|XTAE|XMIL|MISX|XKRX|XSWX|XLON|XLME|XNYS|DEN|TSX|Australia exchange|BOVESPA|Euwax|CME Group|Eurex|Xetra|Frankfurt stock exchange|French settlement|German settlement|Paris stock exchange|Telbor|National Stock Exchange of India|London stock exchange|LNB|London metals exchange|Iceland stock exchange|New York stock exchange|Italian settlement|Santiago Stock Exchange|Ukrainian stock exchange|NGL|NYB|SA|SS|SYB|TKB|TRB|UK|UK settlement|Jakarta stock exchange|US settlement|Belgian settlement|US with Libor impact|US government bond market|North American Energy Reliability Council|Federal Reserve Bankwire System|WMR|ZUB|ICE_FuturesUS|ICE_FuturesUS_1|ICE_FuturesUS_2|ICE_FuturesEU|ICE_FuturesEU_1|ICE_EndexEnergy|ICE_EndexEquities|ICE_SwapTradeUS|ICE Futures U.S.|ICE Futures U.S. 1|ICE Futures U.S. 2|ICE Futures Europe|ICE Futures Europe 1|ICE Endex Energy|ICE Endex Equities|ICE Swap Trade U.S.|ICE Swap Trade U.K.|ICE Futures Singapore|ICE_SwapTradeUK|ICE_FuturesSingapore|CME|Thailand stock exchange|Turkey|Milan stock exchange|Taiwan stock exchange|South-Korean settlement|South-Korea exchange|South Africa|Bratislava stock exchange|Moscow exchange|Mexican stock exchange|Russian settlement|Spanish settlement|Luxembourgish settlement|Dutch settlement|Austrian settlement|Tadawul|Tel Aviv stock exchange|Bucharest stock exchange|Singapore exchange|Hong Kong stock exchange|Vienna stock exchange|Prague stock exchange|China inter bank market|Shanghai stock exchange|Colombia Stock Exchange|Buenos Aires stock exchange|Philippine stock exchange|Lima stock exchange|SIX Swiss Exchange|Malaysia Stock Exchange|Thomson Reuters QM/Reuters Spot|Israel Telbor Implementation|WeekendsOnly|weekends only|UNMAPPED|Null|NullCalendar|[A-Z]{4}|CUSTOM_.*))*(\))?"/>
326+
<xs:pattern value="(JoinHolidays\(|JoinBusinessDays\()?((,)?(, )?(^)?(TGT|TARGET|CN-IB|US-FED|US-GOV|US-NERC|US-NYSE|US-SET||Australia|Australia settlement|Botswana|Brazil|Canada|Denmark|Hungary|Japan|Norway|Switzerland|Sweden|Belgium|Finland|Luxembourg|Spain|Austria|Romania|Poland|New Zealand|FRA|CATO|CHZU|JPTO|GBLO|SEST|TRIS|USNY|EUTA|BEBR|AE|AT|AR|AU|BW|BR|CA|CL|CN|CO|CZ|DK|FI|FR|DE|HK|HU|IE|IS|IN|ID|IL|IT|JE|JP|MX|MY|NL|NO|NZ|PE|PH|PL|RO|RU|SG|ZA|KR|SE|CH|TW|TH|TR|UA|GB|US|BE|LU|ES|ARE|ARG|AUS|BWA|BRA|CAN|CHL|CHN|COL|CZE|DNK|FIN|DEU|HKG|HUN|ISL|IND|IDN|ISR|ITA|JOD|JPN|KES|LKR|MEX|MUR|MYS|NLD|NOR|NZL|PER|PHL|POL|ROU|RSD|RUS|SAU|SGP|UGX|ZAF|ZMW|KOR|SWE|CHE|TWN|THA|TUR|UKR|GBR|USA|BEL|LUX|ESP|AUT|ARS|AUD|BGN|BWP|BRL|CAD|CLP|CNH|CNY|COP|CZK|DKK|FRF|GHS|HKD|HRK|HUF|INR|IDR|ILS|IRL|ISK|ITL|JPY|MXN|MYR|NOK|NZD|PEN|PHP|PLN|RON|RUB|SAR|SGD|ZAR|KRW|SEK|CHF|EUR|TWD|THB|TRY|UAH|GBP|USD|BEF|LUF|ATS|AED|BHD|CLF|EGP|KWD|KZT|MAD|MXV|NGN|OMR|PKR|QAR|UYU|TND|AOA|GEL|ETB|XOF|VND|GBp|GBX|ILa|ILA|ILs|ILX|ZAc|ZAC|ZAX|XASX|BVMF|XTSE|XSHG|XFRA|XDUB|XETR|ECAG|EUWA|XJKT|XIDX|XTAE|XMIL|MISX|XKRX|XSWX|XLON|XLME|XNYS|DEN|TSX|Australia exchange|BOVESPA|Euwax|CME Group|Eurex|Xetra|Frankfurt stock exchange|French settlement|German settlement|Paris stock exchange|Telbor|National Stock Exchange of India|London stock exchange|LNB|London metals exchange|Iceland stock exchange|New York stock exchange|Italian settlement|Santiago Stock Exchange|Ukrainian stock exchange|NGL|NYB|SA|SS|SYB|TKB|TRB|UK|UK settlement|Jakarta stock exchange|US settlement|Belgian settlement|US with Libor impact|US government bond market|North American Energy Reliability Council|Federal Reserve Bankwire System|WMR|ZUB|ICE_FuturesUS|ICE_FuturesUS_1|ICE_FuturesUS_2|ICE_FuturesEU|ICE_FuturesEU_1|ICE_EndexEnergy|ICE_EndexEquities|ICE_SwapTradeUS|ICE Futures U.S.|ICE Futures U.S. 1|ICE Futures U.S. 2|ICE Futures Europe|ICE Futures Europe 1|ICE Endex Energy|ICE Endex Equities|ICE Swap Trade U.S.|ICE Swap Trade U.K.|ICE Futures Singapore|ICE_SwapTradeUK|ICE_FuturesSingapore|CME|Thailand stock exchange|Turkey|Milan stock exchange|Taiwan stock exchange|South-Korean settlement|South-Korea exchange|South Africa|Bratislava stock exchange|Moscow exchange|Mexican stock exchange|Russian settlement|Spanish settlement|Luxembourgish settlement|Dutch settlement|Austrian settlement|Tadawul|Tel Aviv stock exchange|Bucharest stock exchange|Singapore exchange|Hong Kong stock exchange|Vienna stock exchange|Prague stock exchange|China inter bank market|Shanghai stock exchange|Colombia Stock Exchange|Buenos Aires stock exchange|Philippine stock exchange|Lima stock exchange|SIX Swiss Exchange|Malaysia Stock Exchange|Thomson Reuters QM/Reuters Spot|Israel Telbor Implementation|WeekendsOnly|weekends only|UNMAPPED|Null|NullCalendar|[A-Z]{4}|CUSTOM_.*))*(\))?"/>
325327
</xs:restriction>
326328
</xs:simpleType>
327329
<xs:simpleType name="dayCounter">

0 commit comments

Comments
 (0)