File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,7 +192,10 @@ void RiskParticipationAgreement::buildWithSwapUnderlying(const QuantLib::ext::sh
192192 engineFactory->configuration (MarketContext::pricing))
193193 ->value ());
194194 }
195- notional_ = envelope ().additionalField (" im_model" ) == " Schedule" ? notional_ * participationRate_ : notional_;
195+ for (auto const & af: envelope ().additionalFields ()){
196+ if (af.first == " im_model" && af.second ==" Schedule" )
197+ notional_ = notional_ * participationRate_;
198+ }
196199 legs_ = underlyingLegs;
197200 legCurrencies_ = underlyingCcys;
198201 legPayers_ = underlyingPayer;
@@ -238,7 +241,11 @@ void RiskParticipationAgreement::buildWithTlockUnderlying(const QuantLib::ext::s
238241 // set currency and notional
239242
240243 npvCurrency_ = notionalCurrency_ = tlockData_.bondData ().currency ();
241- notional_ = envelope ().additionalField (" im_model" ) == " Schedule" ? tlockData_.bondData ().bondNotional () * participationRate_ : tlockData_.bondData ().bondNotional ();
244+ notional_ = tlockData_.bondData ().bondNotional ();
245+ for (auto const & af: envelope ().additionalFields ()){
246+ if (af.first == " im_model" && af.second ==" Schedule" )
247+ notional_ = notional_ * participationRate_;
248+ }
242249
243250 // checks
244251
You can’t perform that action at this time.
0 commit comments