Commit 8b6a7fcc by Amelin Konstantin

Add CommoditySwapTemplate

parent 4ab58a85
<?xml version='1.0' encoding='windows-1251'?>
<nonpublicExecutionReport xmlns="http://www.fpml.org/FpML-5/recordkeeping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fpmlext="http://www.fpml.org/FpML-5/ext" xmlns:nsdext="http://www.fpml.org/FpML-5/recordkeeping/nsd-ext" xsi:schemaLocation="http://www.fpml.org/FpML-5/recordkeeping fpml-recordkeeping-merged-schema.xsd http://www.fpml.org/FpML-5/recordkeeping/nsd-ext nsd-ext-merged-schema.xsd" fpmlVersion="5-4">
<header>
<messageId messageIdScheme="http://repository.nsd.ru/coding-scheme/messageid(nsdrus)">BCSN1C6ac72915743c2a9e65e00f315e8f2</messageId>
<sentBy>RP0058900001</sentBy>
<sendTo>NDC000000000</sendTo>
<creationTimestamp>2018-10-17T13:36:29.346115</creationTimestamp>
<implementationSpecification>
<version>4.4</version>
</implementationSpecification>
</header>
<isCorrection>false</isCorrection>
<correlationId correlationIdScheme="http://repository.nsd.ru/coding-scheme/correlationId(nsdrus)">[RP0058900001]-[2018]-[BCSN1C6ac72915743c2a9e65e00f315e8f2]</correlationId>
<asOfDate>2018-10-17</asOfDate>
<trade xsi:type="nsdext:TradeNsd">
<tradeHeader>
<partyTradeIdentifier>
<partyReference href="TradeRepository"/>
<tradeId>NONREF</tradeId>
<linkId linkIdScheme="http://repository.nsd.ru/coding-scheme/linkid(nsdrus)">MA0005996325</linkId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party1"/>
<tradeId>01/171018-sw-493552/18-</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party2"/>
<tradeId>01/171018-sw</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="UTIGeneratingParty"/>
<tradeId>253400GRCV94X91GAW80TRGSS01171018SW49355218M</tradeId>
</partyTradeIdentifier>
<partyTradeInformation>
<partyReference href="TradeRepository"/>
<reportingRegime>
<name reportingRegimeNameScheme="http://www.fpml.org/coding-scheme/reporting-regime">RussianFederation</name>
</reportingRegime>
</partyTradeInformation>
<tradeDate>2018-10-17</tradeDate>
</tradeHeader>
<commoditySwap>
<productType productTypeScheme="http://www.fpml.org/coding-scheme/product-taxonomy">Commodity:Swap:Physical</productType>
<productId>SCFXNNN</productId>
<effectiveDate>
<adjustableDate>
<unadjustedDate>2018-10-17</unadjustedDate>
</adjustableDate>
</effectiveDate>
<terminationDate>
<adjustableDate>
<unadjustedDate>2018-12-10</unadjustedDate>
</adjustableDate>
</terminationDate>
<settlementCurrency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">RUB</settlementCurrency>
<fixedLeg>
<payerPartyReference href="Party2"/>
<receiverPartyReference href="Party1"/>
<calculationDates>
<unadjustedDate>2018-10-17</unadjustedDate>
</calculationDates>
<totalPrice>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">RUB</currency>
<amount>8296000.0</amount>
</totalPrice>
<totalNotionalQuantity>200.0</totalNotionalQuantity>
<paymentDates>
<adjustableDates>
<unadjustedDate>2018-10-17</unadjustedDate>
</adjustableDates>
</paymentDates>
</fixedLeg>
<nsdext:commoditySwapPhysicalLeg>
<nsdext:commodity xsi:type="nsdext:CommodityBasket" id="Commodity1">
<instrumentId instrumentIdScheme="">Commodity:Energy:Oil </instrumentId>
<unit quantityUnitScheme="http://www.fpml.org/coding-scheme/price-quote-units">MT</unit>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">RUB</currency>
</nsdext:commodity>
<payerPartyReference href="Party1"/>
<receiverPartyReference href="Party2"/>
<nsdext:deliveryPeriods>
<periods>
<unadjustedDate>2018-12-08</unadjustedDate>
</periods>
</nsdext:deliveryPeriods>
<nsdext:deliveryQuantity>
<totalPhysicalQuantity>
<quantityUnit quantityUnitScheme="http://www.fpml.org/coding-scheme/price-quote-units">MT</quantityUnit>
<quantity>200.0</quantity>
</totalPhysicalQuantity>
</nsdext:deliveryQuantity>
</nsdext:commoditySwapPhysicalLeg>
<fixedLeg>
<payerPartyReference href="Party1"/>
<receiverPartyReference href="Party2"/>
<calculationDates>
<unadjustedDate>2018-12-09</unadjustedDate>
</calculationDates>
<totalPrice>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">RUB</currency>
<amount>8463249.21</amount>
</totalPrice>
<totalNotionalQuantity>200.0</totalNotionalQuantity>
<paymentDates>
<adjustableDates>
<unadjustedDate>2018-12-09</unadjustedDate>
</adjustableDates>
</paymentDates>
</fixedLeg>
<nsdext:commoditySwapPhysicalLeg>
<nsdext:commodity xsi:type="nsdext:CommodityBasket" id="Commodity2">
<instrumentId instrumentIdScheme="">Commodity:Energy:Oil </instrumentId>
<unit quantityUnitScheme="http://www.fpml.org/coding-scheme/price-quote-units">MT</unit>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">RUB</currency>
</nsdext:commodity>
<payerPartyReference href="Party2"/>
<receiverPartyReference href="Party1"/>
<nsdext:deliveryPeriods>
<periods>
<unadjustedDate>2018-12-10</unadjustedDate>
</periods>
</nsdext:deliveryPeriods>
<nsdext:deliveryQuantity>
<totalPhysicalQuantity>
<quantityUnit quantityUnitScheme="http://www.fpml.org/coding-scheme/price-quote-units">MT</quantityUnit>
<quantity>200.0</quantity>
</totalPhysicalQuantity>
</nsdext:deliveryQuantity>
</nsdext:commoditySwapPhysicalLeg>
</commoditySwap>
<nsdext:collateral>
<nsdext:marginType>U</nsdext:marginType>
<nsdext:collateralForm>U</nsdext:collateralForm>
</nsdext:collateral>
<nsdext:nsdSpecificTradeFields>
<nsdext:cleared>N</nsdext:cleared>
<nsdext:reconciliationType>GENF</nsdext:reconciliationType>
<nsdext:clearSettlementType clearSettlementTypeScheme="http://repository.nsd.ru/coding-scheme/clear-settlement-type">OTC</nsdext:clearSettlementType>
<nsdext:clearSettlementMethod clearSettlementMethodScheme="http://repository.nsd.ru/coding-scheme/clear-settlement-method">P</nsdext:clearSettlementMethod>
<nsdext:confirmationMethod>MXME</nsdext:confirmationMethod>
<nsdext:automaticExecution>N</nsdext:automaticExecution>
<nsdext:startAgreementDate>2018-10-17</nsdext:startAgreementDate>
<nsdext:endAgreementDate>2018-12-10</nsdext:endAgreementDate>
<nsdext:productSpecificCodes>
<nsdext:productGeneralCodes>
<nsdext:classificationCode>
<nsdext:specificCode>ProductRelation</nsdext:specificCode>
<nsdext:code>S</nsdext:code>
</nsdext:classificationCode>
</nsdext:productGeneralCodes>
</nsdext:productSpecificCodes>
<nsdext:clientDetails>
<nsdext:servicingParty href="Party1"/>
<nsdext:type>L</nsdext:type>
<nsdext:id>INN_7700956847</nsdext:id>
<nsdext:name> ""</nsdext:name>
<nsdext:country countryScheme="http://www.fpml.org/ext/iso3166">RU</nsdext:country>
</nsdext:clientDetails>
<nsdext:clientDetails>
<nsdext:servicingParty href="Party2"/>
<nsdext:ownTrade>true</nsdext:ownTrade>
</nsdext:clientDetails>
</nsdext:nsdSpecificTradeFields>
</trade>
<party id="TradeRepository">
<partyId>NDC000000000</partyId>
<partyId>LEI_253400M18U5TB02TW421</partyId>
<partyName> </partyName>
</party>
<party id="Party1">
<partyId>RP0058900001</partyId>
<partyId>LEI_253400GRCV94X91GAW80</partyId>
<partyName> " "</partyName>
<classification>B</classification>
<country>RU</country>
<organizationType>L</organizationType>
</party>
<party id="Party2">
<partyId>NONREF</partyId>
<partyId>INN_5407526491</partyId>
<partyName> " "</partyName>
<classification>Other</classification>
<country>RU</country>
<organizationType>L</organizationType>
</party>
<party id="Sender">
<partyId>RP0058900001</partyId>
<partyId>LEI_253400GRCV94X91GAW80</partyId>
<partyName> " "</partyName>
</party>
<party id="UTIGeneratingParty">
<partyId>RP0058900001</partyId>
<partyId>LEI_253400GRCV94X91GAW80</partyId>
<partyName> " "</partyName>
</party>
</nonpublicExecutionReport>
<?xml version="1.0" encoding="utf-8"?>
<nonpublicExecutionReport xmlns="http://www.fpml.org/FpML-5/recordkeeping" xmlns:nsdext="http://www.fpml.org/FpML-5/recordkeeping/nsd-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fpmlext="http://www.fpml.org/FpML-5/ext" xsi:schemaLocation="http://www.fpml.org/FpML-5/recordkeeping ../fpml-recordkeeping-merged-schema.xsd http://www.fpml.org/FpML-5/recordkeeping/nsd-ext ../nsd-ext-merged-schema.xsd" fpmlVersion="5-4" actualBuild="5">
<!--Заголовок сообщения.-->
<!--Message header.-->
<header>
<!--Номер сообщения-->
<!--Message identifier-->
<messageId messageIdScheme="http://repository.nsd.ru/coding-scheme/messageid(nsdrus)">MesIdfra-1</messageId>
<!--Отправитель сообщения-->
<!--Message sender-->
<sentBy>P00000000111</sentBy>
<!--Получатель сообщения-->
<!--Message receiver-->
<sendTo>NDC000000000</sendTo>
<!--Время создания сообщения-->
<!--Message creation time-->
<creationTimestamp>2015-07-27T19:03:13</creationTimestamp>
<!--Версия спецификации.-->
<!--The version(s) of specifications.-->
<implementationSpecification>
<!--Версия спецификации.-->
<!--Version of specification.-->
<version>4.4</version>
</implementationSpecification>
</header>
<!--Признак корректирующего сообщения-->
<!--Correction message mark-->
<isCorrection>false</isCorrection>
<!--Уникальный код цепочки сообщений-->
<!--Messages chain identifier-->
<correlationId correlationIdScheme="http://repository.nsd.ru/coding-scheme/correlationId(nsdrus)">[P00000000111]-[2015]-[MesIdfra-1]</correlationId>
<!--Дата совершения отчитываемого события-->
<!--Event's actual date-->
<asOfDate>2013-01-21</asOfDate>
<!--Регистрация Анкеты-->
<!--Form initial registration-->
<trade xsi:type="nsdext:TradeNsd">
<!--Общая информация о генсоглашении/договоре.-->
<!--Trade/Master agreement general information.-->
<tradeHeader>
<!--Регистрационный номер, присвоенный участником-->
<!--Party's identifiers-->
<partyTradeIdentifier>
<!--Участник.-->
<!--Party.-->
<partyReference href="TradeRepository" />
<!--Регистрационный номер-->
<!--Trade/Master agreement/Report identifier-->
<tradeId>NONREF</tradeId>
<!--Регистрационный номер генерального соглашения-->
<!--Master agreement identifier.-->
<linkId linkIdScheme="http://repository.nsd.ru/coding-scheme/linkid(nsdrus)">MA0000000123</linkId>
</partyTradeIdentifier>
<!--Регистрационный номер, присвоенный участником-->
<!--Party's identifiers-->
<partyTradeIdentifier>
<!--Участник.-->
<!--Party.-->
<partyReference href="Party1" />
<!--Регистрационный номер-->
<!--Trade/Master agreement/Report identifier-->
<tradeId>Fra-Party1-NUM1</tradeId>
</partyTradeIdentifier>
<!--Регистрационный номер, присвоенный участником-->
<!--Party's identifiers-->
<partyTradeIdentifier>
<!--Участник.-->
<!--Party.-->
<partyReference href="Party2" />
<!--Регистрационный номер-->
<!--Trade/Master agreement/Report identifier-->
<tradeId>NONREF</tradeId>
</partyTradeIdentifier>
<!--Регистрационный номер, присвоенный участником-->
<!--Party's identifiers-->
<partyTradeIdentifier>
<!--Участник.-->
<!--Party.-->
<partyReference href="UTIGeneratingParty" />
<!--Регистрационный номер-->
<!--Trade/Master agreement/Report identifier-->
<tradeId>VRKSDFKJH000000004DA2A92861A8A4A1B822DFGP5M2809T02</tradeId>
</partyTradeIdentifier>
<!--Информация стороны о сделке.-->
<!--Party trade information.-->
<partyTradeInformation>
<!--Участник.-->
<!--Party.-->
<partyReference href="TradeRepository" />
<!--Регулятивный режим отчетности.-->
<!--Reporting regime.-->
<reportingRegime>
<!--Наименование правил регулятивной отчетности.-->
<!--Reporting regime name.-->
<name reportingRegimeNameScheme="http://www.fpml.org/coding-scheme/reporting-regime">RussianFederation</name>
</reportingRegime>
</partyTradeInformation>
<!--Дата сделки.-->
<!--Trade date.-->
<tradeDate>2013-01-21</tradeDate>
</tradeHeader>
<!--Товарный своп.-->
<!--Commodity swap.-->
<commoditySwap>
<!--Тип продукта.-->
<!--Product type.-->
<productType productTypeScheme="http://www.fpml.org/coding-scheme/product-taxonomy">Commodity:Swap:Cash</productType>
<!--Код классификации ПФИ и договоров РЕПО-->
<!--Derivatives classification code.-->
<productId>SCDWNNNNN</productId>
<!--Дата начала срока.-->
<!--Effetive date.-->
<effectiveDate>
<!--Дата.-->
<!--Date-->
<adjustableDate>
<!--Дата-->
<!--Date-->
<unadjustedDate>2013-01-28</unadjustedDate>
</adjustableDate>
</effectiveDate>
<!--Дата окончания срока.-->
<!--Termination date.-->
<terminationDate>
<!--Дата.-->
<!--Date-->
<adjustableDate>
<!--Дата-->
<!--Date-->
<unadjustedDate>2014-01-28</unadjustedDate>
</adjustableDate>
</terminationDate>
<!--Валюта расчетов.-->
<!--Settlement currency.-->
<settlementCurrency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">USD</settlementCurrency>
<!--Часть сделки с фиксированной ценой.-->
<!--Fixed price leg.-->
<fixedLeg>
<!--Сторона-плательщик.-->
<!--Payer.-->
<payerPartyReference href="Party1" />
<!--Сторона-получатель.-->
<!--Receiver.-->
<receiverPartyReference href="Party2" />
<!--Расчетные даты.-->
<!--Calculation dates.-->
<calculationDates>
<!--Дата.-->
<!--Date-->
<unadjustedDate>2015-09-10</unadjustedDate>
</calculationDates>
<!--Итоговая цена.-->
<!--Total price.-->
<totalPrice>
<!--Валюта суммы.-->
<!--Currency of money amount.-->
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">RUB</currency>
<!--Сумма денежных средств.-->
<!--Amount.-->
<amount>123.0000000</amount>
</totalPrice>
<!--Общее номинальное количество.-->
<!--Total notional quantity.-->
<totalNotionalQuantity>12</totalNotionalQuantity>
<!--Даты платежей.-->
<!--Payment dates.-->
<paymentDates>
<!--Скорректированные даты.-->
<!--Dates-->
<adjustableDates>
<!--Дата.-->
<!--Date-->
<unadjustedDate>2015-09-10</unadjustedDate>
</adjustableDates>
</paymentDates>
</fixedLeg>
</commoditySwap>
<!--Обеспечение по сделке-->
<!--Collateral-->
<nsdext:collateral>
<!--Тип обеспечения по договору.-->
<!--Collateral type for the trade.-->
<nsdext:marginType>FC</nsdext:marginType>
<!--Форма обеспечения-->
<!--Form of collateral-->
<nsdext:collateralForm>T</nsdext:collateralForm>
</nsdext:collateral>
<!--Специальные атрибуты сделок.-->
<!--Specific regulatory trade attributes.-->
<nsdext:nsdSpecificTradeFields>
<!--Обязанность централизованного клиринга-->
<!--Cleared-->
<nsdext:cleared>N</nsdext:cleared>
<!--Код клиринговой организации.-->
<!--Clearing organization code.-->
<nsdext:clearingOrganizationCode>NDC000000001</nsdext:clearingOrganizationCode>
<!--Дата включения обязательств из договора в клиринговый пул-->
<!--Cleared date-->
<nsdext:clearedDate>2015-04-15</nsdext:clearedDate>
<!--Условия согласования параметров сделки (договора).-->
<!--Trade parameters reconciliation type.-->
<nsdext:reconciliationType>FULL</nsdext:reconciliationType>
<!--Тип расчетов.-->
<!--Settlement type.-->
<nsdext:clearSettlementType clearSettlementTypeScheme="http://repository.nsd.ru/coding-scheme/clear-settlement-type">CS</nsdext:clearSettlementType>
<!--Метод расчетов.-->
<!--Settlement method.-->
<nsdext:clearSettlementMethod clearSettlementMethodScheme="http://repository.nsd.ru/coding-scheme/clear-settlement-method">C</nsdext:clearSettlementMethod>
<!--Способ подтверждения сделки-->
<!--Contract details matching method-->
<nsdext:confirmationMethod>MATH</nsdext:confirmationMethod>
<!--Автоматическое закрытие сделки в дату окончания срока действия договора-->
<!--Automatic trade execution on the agreement end date-->
<nsdext:automaticExecution>Y</nsdext:automaticExecution>
<!--Признак связанности стороны 1 и стороны 2-->
<!--Parties are affiliated-->
<nsdext:partiesAreAffiliated>N</nsdext:partiesAreAffiliated>
<!--Регуляторный тип сделки.-->
<!--Transaction regulatory class.-->
<nsdext:regulatoryStatus regulatoryAdviceScheme="http://repository.nsd.ru/coding-scheme/regulatory-status">Derivative</nsdext:regulatoryStatus>
<!--Дата начала срока действия договора.-->
<!--Agreement start date.-->
<nsdext:startAgreementDate>2015-07-17</nsdext:startAgreementDate>
<!--Дата окончания срока действия договора.-->
<!--Agreement end date.-->
<nsdext:endAgreementDate>2015-07-09</nsdext:endAgreementDate>
<!--Информация о клиенте стороны-->
<!--Information about Party clients-->
<nsdext:clientDetails>
<!--Сторона, обслуживающая клиента-->
<!--Party, servicing a client-->
<nsdext:servicingParty href="Party1" />
<!--Тип клиента-->
<!--Client type-->
<nsdext:type>P</nsdext:type>
<!--Идентификатор клиента-->
<!--Identifier-->
<nsdext:id>INN_123456789</nsdext:id>
<!--Наименование клиента-->
<!--Name-->
<nsdext:name>Клиент физическое лицо</nsdext:name>
<!--Код страны клиента-->
<!--Country code-->
<nsdext:country countryScheme="http://www.fpml.org/ext/iso3166">AE</nsdext:country>
</nsdext:clientDetails>
<!--Информация о клиенте стороны-->
<!--Information about Party clients-->
<nsdext:clientDetails>
<!--Сторона, обслуживающая клиента-->
<!--Party, servicing a client-->
<nsdext:servicingParty href="Party2" />
<!--Договор заключен не в интересах клиента-->
<!--Own party trade-->
<nsdext:ownTrade>true</nsdext:ownTrade>
</nsdext:clientDetails>
</nsdext:nsdSpecificTradeFields>
</trade>
<!--Участники Анкеты-->
<!--Party-->
<party id="TradeRepository">
<!--Идентификационный код-->
<!--Party's identifier.-->
<partyId>NDC000000000</partyId>
<!--Идентификационный код-->
<!--Party's identifier.-->
<partyId>LEI_00000000000000000001</partyId>
<!--Наименование участника.-->
<!--Party's name.-->
<partyName>НКО АО НРД</partyName>
</party>
<!--Участники Анкеты-->
<!--Party-->
<party id="UTIGeneratingParty">
<!--Идентификационный код-->
<!--Party's identifier.-->
<partyId>P00000000111</partyId>
<!--Идентификационный код-->
<!--Party's identifier.-->
<partyId>LEI_00000000000000000001</partyId>
<!--Наименование участника.-->
<!--Party's name.-->
<partyName>Клиент репозитария 1</partyName>
</party>
<!--Участники Анкеты-->
<!--Party-->
<party id="Party1">
<!--Идентификационный код-->
<!--Party's identifier.-->
<partyId>P00000000111</partyId>
<!--Идентификационный код-->
<!--Party's identifier.-->
<partyId>LEI_00000000000000000001</partyId>
<!--Наименование участника.-->
<!--Party's name.-->
<partyName>Клиент репозитария 1</partyName>
<!--Вид экономической деятельности-->
<!--Industry classification-->
<classification industryClassificationScheme="http://www.fpml.org/coding-scheme/external/north-american-industry-classification-system">Other</classification>
<!--Страна.-->
<!--Country.-->
<country countryScheme="http://www.fpml.org/ext/iso3166">RU</country>
<!--Тип лица-->
<!--Organization type-->
<organizationType organizationTypeScheme="http://www.fpml.org/coding-scheme/organization-type">L</organizationType>
</party>
<!--Участники Анкеты-->
<!--Party-->
<party id="Party2">
<!--Идентификационный код-->
<!--Party's identifier.-->
<partyId>P00000000222</partyId>
<!--Идентификационный код-->
<!--Party's identifier.-->
<partyId>LEI_00000000000000000002</partyId>
<!--Наименование участника.-->
<!--Party's name.-->
<partyName>Клиент репозитария 2</partyName>
<!--Вид экономической деятельности-->
<!--Industry classification-->
<classification industryClassificationScheme="http://www.fpml.org/coding-scheme/external/north-american-industry-classification-system">Other</classification>
<!--Страна.-->
<!--Country.-->
<country countryScheme="http://www.fpml.org/ext/iso3166">RU</country>
<!--Тип лица-->
<!--Organization type-->
<organizationType organizationTypeScheme="http://www.fpml.org/coding-scheme/organization-type">L</organizationType>
</party>
<!--Участники Анкеты-->
<!--Party-->
<party id="Sender">
<!--Идентификационный код-->
<!--Party's identifier.-->
<partyId>P00000000111</partyId>
<!--Идентификационный код-->
<!--Party's identifier.-->
<partyId>LEI_00000000000000000001</partyId>
<!--Наименование участника.-->
<!--Party's name.-->
<partyName>Клиент репозитария 1</partyName>
</party>
</nonpublicExecutionReport>
......@@ -34,6 +34,8 @@ object Main {
if (debugMode) new EquityForwardTemplate(source) with Logger else new EquityForwardTemplate(source)
case v if v == "commodityForward" =>
if (debugMode) new CommodityForwardTemplate(source) with Logger else new CommodityForwardTemplate(source)
case v if v == "commoditySwap" =>
if (debugMode) new CommoditySwapTemplate(source) with Logger else new CommoditySwapTemplate(source)
case v => throw new Exception("Undefined trade type")
}
}
......
......@@ -14,8 +14,8 @@ class CommodityForwardTemplate(source: Node) extends TradeTemplate(source) {
</fpml:adjustableDate>
</fpml:valueDate>
<fpml:fixedLeg>
<fpml:buyerPartyReference href={ get(source \ "trade" \ "commodityForward" \ "fixedLeg" \ "buyerPartyReference", "href") }/>
<fpml:sellerPartyReference href={ get(source \ "trade" \ "commodityForward" \ "fixedLeg" \ "sellerPartyReference", "href") }/>
<fpml:payerPartyReference href={ get(source \ "trade" \ "commodityForward" \ "fixedLeg" \ "payerPartyReference", "href") }/>
<fpml:receiverPartyReference href={ get(source \ "trade" \ "commodityForward" \ "fixedLeg" \ "receiverPartyReference", "href") }/>
<fpml:fixedPrice>
<fpml:price>{ get(source \ "trade" \ "commodityForward" \ "fixedLeg" \ "fixedPrice" \ "price") }</fpml:price>
<fpml:priceCurrency>{ get(source \ "trade" \ "commodityForward" \ "fixedLeg" \ "fixedPrice" \ "priceCurrency") }</fpml:priceCurrency>
......
package templates
import scala.xml.Node
class CommoditySwapTemplate(source: Node) extends TradeTemplate(source) {
protected[this] def templateTradeBody: Node = {
<fpml:commoditySwap>
{ /* <fpml:productType>{ get(source \ "trade" \ "commoditySwap" \ "productType") }</fpml:productType> */}
<fpml:productId>{ get(source \ "trade" \ "commoditySwap" \ "productId") }</fpml:productId>
<fpml:effectiveDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>{ get(source \ "trade" \ "commoditySwap" \ "effectiveDate" \\ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpml:effectiveDate>
<fpml:terminationDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>{ get(source \ "trade" \ "commoditySwap" \ "terminationDate" \\ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpml:terminationDate>
<fpml:settlementCurrency>{ get(source \ "trade" \ "commoditySwap" \ "settlementCurrency") }</fpml:settlementCurrency>
{ for (s <- source \ "trade" \ "commoditySwap" \ "fixedLeg") yield {
<fpml:fixedLeg>
<fpml:payerPartyReference href={get(s \ "payerPartyReference", "href")}/>
<fpml:receiverPartyReference href={get(s \ "receiverPartyReference", "href")}/>
<fpml:calculationDates>
<fpml:unadjustedDate>{ get(s \ "calculationDates" \ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:calculationDates>
<fpml:fixedPrice>
<fpml:price>{ get(s \ "fixedPrice" \ "price") }</fpml:price>
<fpml:priceCurrency>{ get(s \ "fixedPrice" \ "priceCurrency") }</fpml:priceCurrency>
<fpml:priceUnit>{ get(s \ "fixedPrice" \ "priceUnit") }</fpml:priceUnit>
</fpml:fixedPrice>
<fpml:totalPrice>
<fpml:currency>{ get(s \ "totalPrice" \ "currency") }</fpml:currency>
<fpml:amount>{ get(s \ "totalPrice" \ "amount") }</fpml:amount>
</fpml:totalPrice>
<fpml:totalNotionalQuantity>{ get(s \ "totalNotionalQuantity") }</fpml:totalNotionalQuantity>
<fpml:paymentDates>
<fpml:adjustableDates>
<fpml:unadjustedDate>{ get(s \ "paymentDates" \\ "unadjustedDate") }
</fpml:unadjustedDate>
</fpml:adjustableDates>
</fpml:paymentDates>
</fpml:fixedLeg>
}
}
</fpml:commoditySwap>
}
def isStraight = true
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment