Skip to content

Commit d92bfe1

Browse files
author
Roland Lichters
committed
merge github pr 216
2 parents 91ed4f0 + 3363f47 commit d92bfe1

4 files changed

Lines changed: 18 additions & 18 deletions

File tree

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: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,13 @@ void StressTestScenarioData::fromXML(XMLNode* root) {
242242
for (XMLNode* child = XMLUtils::getChildNode(capVols, "CapFloorVolatility"); child;
243243
child = XMLUtils::getNextSibling(child)) {
244244
string key = XMLUtils::getAttribute(child, "key");
245-
if (key.empty()) {
246-
string ccyAttr = XMLUtils::getAttribute(child, "ccy");
247-
if (!ccyAttr.empty()) {
248-
key = ccyAttr;
249-
ALOG("StressScenarioData: 'ccy' is deprecated as an attribute for CapFloorVolatilities, use 'key' "
250-
"instead.");
251-
}
252-
}
245+
if(key.empty()) {
246+
string ccyAttr = XMLUtils::getAttribute(child, "ccy");
247+
if(!ccyAttr.empty()) {
248+
key = ccyAttr;
249+
WLOG("StressScenarioData: 'ccy' is deprecated as an attribute for CapFloorVolatilities, use 'key' instead.");
250+
}
251+
}
253252
CapFloorVolShiftData data;
254253
data.shiftType = parseShiftType(XMLUtils::getChildValue(child, "ShiftType", true));
255254
data.shiftExpiries = XMLUtils::getChildrenValuesAsPeriods(child, "ShiftExpiries", true);

OREData/ored/portfolio/portfolio.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <ored/portfolio/fxforward.hpp>
2121
#include <ored/portfolio/portfolio.hpp>
2222
#include <ored/portfolio/structuredtradeerror.hpp>
23+
#include <ored/portfolio/structuredtradewarning.hpp>
2324
#include <ored/portfolio/swap.hpp>
2425
#include <ored/portfolio/swaption.hpp>
2526
#include <ored/utilities/log.hpp>
@@ -110,7 +111,7 @@ bool Portfolio::remove(const std::string& tradeID) {
110111
void Portfolio::removeMatured(const Date& asof) {
111112
for (auto it = trades_.begin(); it != trades_.end(); /* manual */) {
112113
if ((*it).second->isExpired(asof)) {
113-
StructuredTradeErrorMessage((*it).second, "", "Trade is Matured").log();
114+
StructuredTradeWarningMessage((*it).second, "", "Trade is Matured").log();
114115
it=trades_.erase(it);
115116
} else {
116117
++it;

0 commit comments

Comments
 (0)