File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -301,13 +301,6 @@ void TRS::build(const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory) {
301301 creditQualifierMapping_.clear ();
302302 notionalCurrency_ = returnData_.currency ();
303303
304- // propagate additional data from underlyings to trs trade
305- for (Size i = 0 ; i < underlying_.size (); ++i) {
306- for (auto const & [key, value] : underlying_[i]->additionalData ()) {
307- additionalData_[" und_ad_" + std::to_string (i + 1 ) + " _" + key] = value;
308- }
309- }
310-
311304 // checks
312305
313306 std::set<bool > fundingLegPayers;
@@ -349,6 +342,13 @@ void TRS::build(const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory) {
349342 }
350343 }
351344
345+ // propagate additional data from underlyings to trs trade
346+ for (Size i = 0 ; i < underlying_.size (); ++i) {
347+ for (auto const & [key, value] : underlying_[i]->additionalData ()) {
348+ additionalData_[" und_ad_" + std::to_string (i + 1 ) + " _" + key] = value;
349+ }
350+ }
351+
352352 // we use dirty prices, so we need accrued amounts in the past
353353 requiredFixings_.unsetPayDates ();
354354
You can’t perform that action at this time.
0 commit comments