Commit f35cde67 by Amelin Konstantin

Add BondBasketOptionTemplate.

parent 38c07285
<?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" fpmlVersion="5-4" 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">
<header>
<messageId messageIdScheme="http://repository.nsd.ru/coding-scheme/messageid(nsdrus)">BCS62de2eaf793b45a79c48920368e72326</messageId>
<sentBy>RP0058900001</sentBy>
<sendTo>NDC000000000</sendTo>
<creationTimestamp>2018-08-03T08:13:49</creationTimestamp>
<implementationSpecification>
<version>4.4</version>
</implementationSpecification>
</header>
<isCorrection>false</isCorrection>
<correlationId correlationIdScheme="http://repository.nsd.ru/coding-scheme/correlationId(nsdrus)">[RP0058900001]-[2018]-[BCS62de2eaf793b45a79c48920368e72326]</correlationId>
<asOfDate>2018-08-01</asOfDate>
<trade xsi:type="nsdext:TradeNsd">
<tradeHeader>
<partyTradeIdentifier>
<partyReference href="TradeRepository"/>
<tradeId>NONREF</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party1"/>
<tradeId>4503/198-010818</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party2"/>
<tradeId>NONREF</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="UTIGeneratingParty"/>
<tradeId>253400GRCV94X91GAW80TNGSO4503198010818</tradeId>
</partyTradeIdentifier>
<partyTradeInformation>
<partyReference href="TradeRepository"/>
<reportingRegime>
<name reportingRegimeNameScheme="http://www.fpml.org/coding-scheme/reporting-regime">RussianFederation</name>
</reportingRegime>
<nonStandardTerms>true</nonStandardTerms>
</partyTradeInformation>
<tradeDate>2018-08-01</tradeDate>
</tradeHeader>
<nsdext:bondBasketOption>
<productType productTypeScheme="http://www.fpml.org/coding-scheme/product-taxonomy">InterestRate:Option:DebtOption:Basket</productType>
<productId>OPAFND</productId>
<buyerPartyReference href="Party2"/>
<sellerPartyReference href="Party1"/>
<optionType>Put</optionType>
<premium>
<payerPartyReference href="Party2"/>
<receiverPartyReference href="Party1"/>
<paymentAmount>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">USD</currency>
<amount>3860.4300000</amount>
</paymentAmount>
</premium>
<americanExercise>
<commencementDate>
<adjustableDate>
<unadjustedDate>2018-08-01</unadjustedDate>
</adjustableDate>
</commencementDate>
<expirationDate>
<adjustableDate>
<unadjustedDate>2022-11-14</unadjustedDate>
</adjustableDate>
</expirationDate>
</americanExercise>
<notionalAmount>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">USD</currency>
<amount>19995.0000000</amount>
</notionalAmount>
<optionEntitlement>1</optionEntitlement>
<numberOfOptions>1</numberOfOptions>
<settlementType>Cash</settlementType>
<nsdext:strike>
<price>
<strikePrice>1000.0000000</strikePrice>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">USD</currency>
</price>
</nsdext:strike>
<basket>
<openUnits>1</openUnits>
<basketConstituent>
<bond id="XS0800817073">
<instrumentId instrumentIdScheme="">XS0800817073</instrumentId>
</bond>
<constituentWeight>
<basketPercentage>1.000000</basketPercentage>
</constituentWeight>
</basketConstituent>
<basketConstituent>
<bond id="XS0830192711">
<instrumentId instrumentIdScheme="">XS0830192711</instrumentId>
</bond>
<constituentWeight>
<basketPercentage>1.000000</basketPercentage>
</constituentWeight>
</basketConstituent>
<basketConstituent>
<bond id="XS0842078536">
<instrumentId instrumentIdScheme="">XS0842078536</instrumentId>
</bond>
<constituentWeight>
<basketPercentage>1.000000</basketPercentage>
</constituentWeight>
</basketConstituent>
<basketConstituent>
<bond id="XS0643183220">
<instrumentId instrumentIdScheme="">XS0643183220</instrumentId>
</bond>
<constituentWeight>
<basketPercentage>1.000000</basketPercentage>
</constituentWeight>
</basketConstituent>
<basketConstituent>
<bond id="XS1533921299">
<instrumentId instrumentIdScheme="">XS1533921299</instrumentId>
</bond>
<constituentWeight>
<basketPercentage>1.000000</basketPercentage>
</constituentWeight>
</basketConstituent>
<basketConstituent>
<bond id="XS1405766384">
<instrumentId instrumentIdScheme="">XS1405766384</instrumentId>
</bond>
<constituentWeight>
<basketPercentage>1.000000</basketPercentage>
</constituentWeight>
</basketConstituent>
</basket>
</nsdext:bondBasketOption>
<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">C</nsdext:clearSettlementMethod>
<nsdext:confirmationMethod>MXME</nsdext:confirmationMethod>
<nsdext:automaticExecution>N</nsdext:automaticExecution>
<nsdext:partiesAreAffiliated>Y</nsdext:partiesAreAffiliated>
<nsdext:endAgreementDate>2022-11-14</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>P</nsdext:type>
<nsdext:id>PASS_13_45087662</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_5408514753</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>
\ No newline at end of file
<?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" fpmlVersion="5-4" 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">
<header>
<messageId messageIdScheme="http://repository.nsd.ru/coding-scheme/messageid(nsdrus)">BCSf419d6f6118f4338b3ff7bb2b4e83e01</messageId>
<sentBy>RP0058900001</sentBy>
<sendTo>NDC000000000</sendTo>
<creationTimestamp>2017-04-24T09:59:19</creationTimestamp>
<implementationSpecification>
<version>4.4</version>
</implementationSpecification>
</header>
<isCorrection>false</isCorrection>
<correlationId correlationIdScheme="http://repository.nsd.ru/coding-scheme/correlationId(nsdrus)">[RP0058900001]-[2017]-[BCSf419d6f6118f4338b3ff7bb2b4e83e01]</correlationId>
<asOfDate>2017-04-20</asOfDate>
<trade xsi:type="nsdext:TradeNsd">
<tradeHeader>
<partyTradeIdentifier>
<partyReference href="TradeRepository"/>
<tradeId>NONREF</tradeId>
<linkId linkIdScheme="http://repository.nsd.ru/coding-scheme/linkid(nsdrus)">MA0000388043</linkId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party1"/>
<tradeId>1554/20042017</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party2"/>
<tradeId>NONREF</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="UTIGeneratingParty"/>
<tradeId>253400GRCV94X91GAW80TRGSO155420042017</tradeId>
</partyTradeIdentifier>
<partyTradeInformation>
<partyReference href="TradeRepository"/>
<reportingRegime>
<name reportingRegimeNameScheme="http://www.fpml.org/coding-scheme/reporting-regime">RussianFederation</name>
</reportingRegime>
</partyTradeInformation>
<tradeDate>2017-04-20</tradeDate>
</tradeHeader>
<commodityOption>
<productType productTypeScheme="http://www.fpml.org/coding-scheme/product-taxonomy">Commodity:Option:European</productType>
<productId>OCEFNC</productId>
<buyerPartyReference href="Party2"/>
<sellerPartyReference href="Party1"/>
<commodity xsi:type="nsdext:CommodityBasket" id="GOLDLNAMIndex">
<instrumentId instrumentIdScheme="">GOLDLNAMIndex</instrumentId>
<unit quantityUnitScheme="http://www.fpml.org/coding-scheme/price-quote-units">ozt</unit>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">USD</currency>
</commodity>
<totalNotionalQuantity>0</totalNotionalQuantity>
<exercise>
<europeanExercise>
<expirationDate>
<adjustableDate>
<unadjustedDate>2022-04-19</unadjustedDate>
</adjustableDate>
</expirationDate>
</europeanExercise>
<settlementCurrency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">RUB</settlementCurrency>
<paymentDates>
<adjustableDates>
<unadjustedDate>2022-04-19</unadjustedDate>
</adjustableDates>
</paymentDates>
</exercise>
<strikePricePerUnit>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">USD</currency>
<amount>1282.0500000</amount>
</strikePricePerUnit>
<premium>
<payerPartyReference href="Party2"/>
<receiverPartyReference href="Party1"/>
<paymentAmount>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">RUB</currency>
<amount>126000.0000000</amount>
</paymentAmount>
</premium>
</commodityOption>
<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">C</nsdext:clearSettlementMethod>
<nsdext:confirmationMethod>MXME</nsdext:confirmationMethod>
<nsdext:automaticExecution>N</nsdext:automaticExecution>
<nsdext:endAgreementDate>2022-04-19</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:ownTrade>true</nsdext:ownTrade>
</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>D</classification>
<country>RU</country>
<organizationType>L</organizationType>
</party>
<party id="Party2">
<partyId>RPJ000000534</partyId>
<partyId>LEI_253400SM3KFCUX7HFM81</partyId>
<partyName> " "</partyName>
<classification>I</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>
\ No newline at end of file
<?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" fpmlVersion="5-4" 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">
<header>
<messageId messageIdScheme="http://repository.nsd.ru/coding-scheme/messageid(nsdrus)">BCS764e77f213db4229859105599fac1885</messageId>
<sentBy>RP0058900001</sentBy>
<sendTo>NDC000000000</sendTo>
<creationTimestamp>2017-04-24T09:59:19</creationTimestamp>
<implementationSpecification>
<version>4.4</version>
</implementationSpecification>
</header>
<isCorrection>false</isCorrection>
<correlationId correlationIdScheme="http://repository.nsd.ru/coding-scheme/correlationId(nsdrus)">[RP0058900001]-[2017]-[BCS764e77f213db4229859105599fac1885]</correlationId>
<asOfDate>2017-04-20</asOfDate>
<trade xsi:type="nsdext:TradeNsd">
<tradeHeader>
<partyTradeIdentifier>
<partyReference href="TradeRepository"/>
<tradeId>NONREF</tradeId>
<linkId linkIdScheme="http://repository.nsd.ru/coding-scheme/linkid(nsdrus)">MA0000388043</linkId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party1"/>
<tradeId>1553/20042017</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party2"/>
<tradeId>NONREF</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="UTIGeneratingParty"/>
<tradeId>253400GRCV94X91GAW80TRGSO155320042017</tradeId>
</partyTradeIdentifier>
<partyTradeInformation>
<partyReference href="TradeRepository"/>
<reportingRegime>
<name reportingRegimeNameScheme="http://www.fpml.org/coding-scheme/reporting-regime">RussianFederation</name>
</reportingRegime>
</partyTradeInformation>
<tradeDate>2017-04-20</tradeDate>
</tradeHeader>
<equityOption>
<productType productTypeScheme="http://www.fpml.org/coding-scheme/product-taxonomy">Equity:Option:PriceReturnBasicPerformance:SingleName</productType>
<productId>OCEFNE</productId>
<buyerPartyReference href="Party2"/>
<sellerPartyReference href="Party1"/>
<optionType>Call</optionType>
<underlyer>
<singleUnderlyer>
<equity id="US81369Y8865">
<instrumentId instrumentIdScheme="">US81369Y8865</instrumentId>
</equity>
<openUnits>1</openUnits>
</singleUnderlyer>
</underlyer>
<equityExercise>
<equityEuropeanExercise>
<expirationDate>
<adjustableDate>
<unadjustedDate>2022-04-19</unadjustedDate>
</adjustableDate>
</expirationDate>
</equityEuropeanExercise>
<settlementCurrency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">RUB</settlementCurrency>
<settlementType>Cash</settlementType>
</equityExercise>
<strike>
<strikePrice>51.6700000</strikePrice>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">USD</currency>
</strike>
<numberOfOptions>1</numberOfOptions>
<optionEntitlement>1</optionEntitlement>
<equityPremium>
<payerPartyReference href="Party2"/>
<receiverPartyReference href="Party1"/>
<paymentAmount>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">RUB</currency>
<amount>40500.0000000</amount>
</paymentAmount>
</equityPremium>
</equityOption>
<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">C</nsdext:clearSettlementMethod>
<nsdext:confirmationMethod>MXME</nsdext:confirmationMethod>
<nsdext:automaticExecution>N</nsdext:automaticExecution>
<nsdext:endAgreementDate>2022-04-19</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:ownTrade>true</nsdext:ownTrade>
</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>D</classification>
<country>RU</country>
<organizationType>L</organizationType>
</party>
<party id="Party2">
<partyId>RPJ000000534</partyId>
<partyId>LEI_253400SM3KFCUX7HFM81</partyId>
<partyName> " "</partyName>
<classification>I</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>
\ No newline at end of file
...@@ -20,6 +20,11 @@ object Main { ...@@ -20,6 +20,11 @@ object Main {
case _ => false case _ => false
}(1).label match { }(1).label match {
case "repo" => if (debugMode) new RepoTemplate(source) with Logger else new RepoTemplate(source) case "repo" => if (debugMode) new RepoTemplate(source) with Logger else new RepoTemplate(source)
case v if v == "bondBasketOption" =>
if (debugMode) new BondBasketOptionTemplate(source) with Logger else new BondBasketOptionTemplate(source)
case v if v == "bondOption" => throw new Exception("Undefined trade type")
case v if v == "equityOption" => throw new Exception("Undefined trade type")
case v if v == "commodityOption" => throw new Exception("Undefined trade type")
case v => throw new Exception("Undefined trade type") case v => throw new Exception("Undefined trade type")
} }
} }
...@@ -29,7 +34,7 @@ object Main { ...@@ -29,7 +34,7 @@ object Main {
else if (!Files.exists(Paths.get(args(0)))) println("Error: INPUT directory doesn`t exist") else if (!Files.exists(Paths.get(args(0)))) println("Error: INPUT directory doesn`t exist")
else if (!Files.exists(Paths.get(args(1)))) println("Error: OUTPUT directory doesn`t exist") else if (!Files.exists(Paths.get(args(1)))) println("Error: OUTPUT directory doesn`t exist")
else { else {
val p = new PrettyPrinter(140, 2) val p = new PrettyPrinter(160, 2)
val nsdXmlValid = XMLValid(getClass.getResource("/nsd/nsd-ext-merged-schema.xsd")) val nsdXmlValid = XMLValid(getClass.getResource("/nsd/nsd-ext-merged-schema.xsd"))
val rtsXmlValid = XMLValid(getClass.getResource("/rts/fpml-recordkeeping-merged-schema.xsd")) val rtsXmlValid = XMLValid(getClass.getResource("/rts/fpml-recordkeeping-merged-schema.xsd"))
var logString = "" var logString = ""
......
package templates
import scala.xml.Node
class BondBasketOptionTemplate(source: Node) extends TradeTemplate(source) {
protected[this] def templateTradeBody: Node = {
<rtsrep:bondBasketOption>
<fpml:productType>{ get(source \ "trade" \ "bondBasketOption" \ "productType") }</fpml:productType>
<fpml:productId productIdScheme={ get(source \ "trade" \ "bondBasketOption" \ "productId", "productIdScheme") }>{ get(source \ "trade" \ "bondBasketOption" \ "productId") }</fpml:productId>
<fpml:buyerPartyReference href={ get(source \ "trade" \ "bondBasketOption" \ "buyerPartyReference", "href") }/>
<fpml:sellerPartyReference href={ get(source \ "trade" \ "bondBasketOption" \ "sellerPartyReference", "href") }/>
<fpml:optionType>{ get(source \ "trade" \ "bondBasketOption" \ "optionType") }</fpml:optionType>
<fpml:premium>
<fpml:payerPartyReference href={ get(source \ "trade" \ "bondBasketOption" \ "premium" \"payerPartyReference", "href") }/>
<fpml:receiverPartyReference href={ get(source \ "trade" \ "bondBasketOption" \ "premium" \"receiverPartyReference", "href") }/>
<fpml:paymentAmount>
<fpml:currency>{ get(source \ "trade" \ "bondBasketOption" \ "premium" \\ "currency") }</fpml:currency>
<fpml:amount>{ get(source \ "trade" \ "bondBasketOption" \ "premium" \\ "amount") }</fpml:amount>
</fpml:paymentAmount>
{ /* paymentDate isn`t present in source!!!*/ }
<fpml:paymentDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>{ get(source \ "trade" \ "bondBasketOption" \ "americanExercise" \ "expirationDate" \\ "unadjustedDate") }</fpml:unadjustedDate>
<fpml:unadjustedDate>{ get(source \ "trade" \ "bondBasketOption" \ "bermudaExercise" \\ "unadjustedDate") }</fpml:unadjustedDate>
<fpml:unadjustedDate>{ get(source \ "trade" \ "bondBasketOption" \ "europeanExercise" \\ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpml:paymentDate>
</fpml:premium>
<fpml:americanExercise>
<fpml:commencementDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>{ get(source \ "trade" \ "bondBasketOption" \ "americanExercise" \ "commencementDate" \\ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpml:commencementDate>
<fpml:expirationDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>{ get(source \ "trade" \ "bondBasketOption" \ "americanExercise" \ "expirationDate" \\ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpml:expirationDate>
</fpml:americanExercise>
<fpml:bermudaExercise>
<fpml:bermudaExerciseDates>
<fpml:adjustableDates>
<fpml:unadjustedDate>{ get(source \ "trade" \ "bondBasketOption" \ "bermudaExercise" \\ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:adjustableDates>
</fpml:bermudaExerciseDates>
</fpml:bermudaExercise>
<fpml:europeanExercise>
<fpml:expirationDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>{ get(source \ "trade" \ "bondBasketOption" \ "europeanExercise" \\ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpml:expirationDate>
</fpml:europeanExercise>
<fpml:notionalAmount>
<fpml:currency>{ get(source \ "trade" \ "bondBasketOption" \ "notionalAmount" \ "currency") }</fpml:currency>
<fpml:amount>{ get(source \ "trade" \ "bondBasketOption" \ "notionalAmount" \ "amount") }</fpml:amount>
</fpml:notionalAmount>
<fpml:settlementType>{ get(source \ "trade" \ "bondBasketOption" \ "settlementType") }</fpml:settlementType>
<rtsrep:strike>
<fpml:price>
<fpml:strikePrice>{ get(source \ "trade" \ "bondBasketOption" \ "strike" \\ "strikePrice") }</fpml:strikePrice>
<fpml:strikePercentage>{ get(source \ "trade" \ "bondBasketOption" \ "strike" \\ "strikePercentage") }</fpml:strikePercentage>
<fpml:currency>{ get(source \ "trade" \ "bondBasketOption" \ "strike" \\ "currency") }</fpml:currency>
</fpml:price>
</rtsrep:strike>
<fpml:basket>
<fpml:openUnits>{ get(source \ "trade" \ "bondBasketOption" \ "basket" \ "openUnits") }</fpml:openUnits>
{ for (s <- source \ "trade" \ "bondBasketOption" \ "basket" \ "basketConstituent") yield {
<fpml:basketConstituent>
<fpml:bond id={ get(s \ "bond", "id") }>
<fpml:instrumentId instrumentIdScheme={ get(s \\ "instrumentId", "instrumentIdScheme") }>{ get(s \\ "instrumentId") }</fpml:instrumentId>
</fpml:bond>
<fpml:constituentWeight>
<fpml:basketPercentage>{ get(s \\ "basketPercentage") }</fpml:basketPercentage>
</fpml:constituentWeight>
</fpml:basketConstituent>
}
}
</fpml:basket>
</rtsrep:bondBasketOption>
}
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