@@ -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
294292void 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