Commit d2118f9d by Amelin Konstantin

Add EquityOptionTemplate.

parent f35cde67
<?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)">BCS24a0ade3a7654fd3984d0a1c21ce0e0c</messageId>
<sentBy>RP0058900001</sentBy>
<sendTo>NDC000000000</sendTo>
<creationTimestamp>2018-08-09T10:08:06</creationTimestamp>
<implementationSpecification>
<version>4.4</version>
</implementationSpecification>
</header>
<isCorrection>false</isCorrection>
<correlationId correlationIdScheme="http://repository.nsd.ru/coding-scheme/correlationId(nsdrus)">[RP0058900001]-[2018]-[BCS24a0ade3a7654fd3984d0a1c21ce0e0c]</correlationId>
<asOfDate>2018-08-07</asOfDate>
<trade xsi:type="nsdext:TradeNsd">
<tradeHeader>
<partyTradeIdentifier>
<partyReference href="TradeRepository"/>
<tradeId>NONREF</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party1"/>
<tradeId>4501/53-070818</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party2"/>
<tradeId>NONREF</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="UTIGeneratingParty"/>
<tradeId>253400GRCV94X91GAW80TNGSO450153070818</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-07</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>7479.5000000</amount>
</paymentAmount>
</premium>
<americanExercise>
<commencementDate>
<adjustableDate>
<unadjustedDate>2018-08-07</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>25000.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_52_94414602</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)">BCS341bd5c569964a64b79ff0063a55455e</messageId>
<sentBy>RP0058900001</sentBy>
<sendTo>NDC000000000</sendTo>
<creationTimestamp>2017-04-24T09:59:20</creationTimestamp>
<implementationSpecification>
<version>4.4</version>
</implementationSpecification>
</header>
<isCorrection>false</isCorrection>
<correlationId correlationIdScheme="http://repository.nsd.ru/coding-scheme/correlationId(nsdrus)">[RP0058900001]-[2017]-[BCS341bd5c569964a64b79ff0063a55455e]</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>1558/20042017</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party2"/>
<tradeId>NONREF</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="UTIGeneratingParty"/>
<tradeId>253400GRCV94X91GAW80TRGSO155820042017</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="B5AComdty">
<instrumentId instrumentIdScheme="">B5AComdty</instrumentId>
<unit quantityUnitScheme="http://www.fpml.org/coding-scheme/price-quote-units">BBL</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>52.9300000</amount>
</strikePricePerUnit>
<premium>
<payerPartyReference href="Party2"/>
<receiverPartyReference href="Party1"/>
<paymentAmount>
<currency currencyScheme="http://www.fpml.org/ext/iso4217-2001-08-15">RUB</currency>
<amount>159000.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
......@@ -23,7 +23,8 @@ object Main {
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 == "equityOption" =>
if (debugMode) new EquityOptionTemplate(source) with Logger else new EquityOptionTemplate(source)
case v if v == "commodityOption" => throw new Exception("Undefined trade type")
case v => throw new Exception("Undefined trade type")
}
......
......@@ -72,7 +72,12 @@ class BondBasketOptionTemplate(source: Node) extends TradeTemplate(source) {
<fpml:instrumentId instrumentIdScheme={ get(s \\ "instrumentId", "instrumentIdScheme") }>{ get(s \\ "instrumentId") }</fpml:instrumentId>
</fpml:bond>
<fpml:constituentWeight>
<fpml:openUnits>{ get(s \\ "openUnits") }</fpml:openUnits>
<fpml:basketPercentage>{ get(s \\ "basketPercentage") }</fpml:basketPercentage>
<fpml:basketAmount>
<fpml:currency>{ get(s \\ "currency") }</fpml:currency>
<fpml:amount>{ get(s \\ "amount") }</fpml:amount>
</fpml:basketAmount>
</fpml:constituentWeight>
</fpml:basketConstituent>
}
......
package templates
import scala.xml.Node
class EquityOptionTemplate(source: Node) extends TradeTemplate(source) {
protected[this] def templateTradeBody: Node = {
<fpml:equityOption>
<fpml:productType>{ get(source \ "trade" \ "equityOption" \ "productType") }</fpml:productType>
<fpml:productId productIdScheme={ get(source \ "trade" \ "equityOption" \ "productId", "productIdScheme") }>{ get(source \ "trade" \ "equityOption" \ "productId") }</fpml:productId>
<fpml:buyerPartyReference href={ get(source \ "trade" \ "equityOption" \ "buyerPartyReference", "href") }/>
<fpml:sellerPartyReference href={ get(source \ "trade" \ "equityOption" \ "sellerPartyReference", "href") }/>
<fpml:optionType>{ get(source \ "trade" \ "equityOption" \ "optionType") }</fpml:optionType>
<fpml:underlyer>
<fpml:singleUnderlyer>
<fpml:equity id={ get(source \ "trade" \ "equityOption" \ "underlyer" \ "singleUnderlyer" \ "equity", "id") }>
<fpml:instrumentId instrumentIdScheme={ get(source \ "trade" \ "equityOption" \ "underlyer" \ "singleUnderlyer" \ "equity" \ "instrumentId", "instrumentIdScheme") }>{ get(source \ "trade" \ "equityOption" \ "underlyer" \ "singleUnderlyer" \ "equity" \ "instrumentId") }</fpml:instrumentId>
</fpml:equity>
<fpml:bond id={ get(source \ "trade" \ "equityOption" \ "underlyer" \ "singleUnderlyer" \ "bond", "id") }>
<fpml:instrumentId instrumentIdScheme={ get(source \ "trade" \ "equityOption" \ "underlyer" \ "singleUnderlyer" \ "bond" \ "instrumentId", "instrumentIdScheme") }>{ get(source \ "trade" \ "equityOption" \ "underlyer" \ "singleUnderlyer" \ "bond" \ "instrumentId") }</fpml:instrumentId>
</fpml:bond>
<fpml:index id={ get(source \ "trade" \ "equityOption" \ "underlyer" \ "singleUnderlyer" \ "index", "id") }>
<fpml:instrumentId instrumentIdScheme={ get(source \ "trade" \ "equityOption" \ "underlyer" \ "singleUnderlyer" \ "index" \ "instrumentId", "instrumentIdScheme") }>{ get(source \ "trade" \ "equityOption" \ "underlyer" \ "singleUnderlyer" \ "index" \ "instrumentId") }</fpml:instrumentId>
</fpml:index>
<fpml:openUnits>{ get(source \ "trade" \ "equityOption" \ "underlyer" \ "singleUnderlyer" \ "openUnits") }</fpml:openUnits>
</fpml:singleUnderlyer>
</fpml:underlyer>
<fpml:equityExercise>
<fpml:equityAmericanExercise>
<fpml:commencementDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>{ get(source \ "trade" \ "equityOption" \\ "equityAmericanExercise" \ "commencementDate" \\ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpml:commencementDate>
<fpml:expirationDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>{ get(source \ "trade" \ "equityOption" \\ "equityAmericanExercise" \ "expirationDate" \\ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpml:expirationDate>
</fpml:equityAmericanExercise>
<fpml:equityBermudaExercise>
<fpml:bermudaExerciseDates>
<fpml:adjustableDates>
<fpml:unadjustedDate>{ get(source \ "trade" \ "equityOption" \\ "equityBermudaExercise" \\ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:adjustableDates>
</fpml:bermudaExerciseDates>
</fpml:equityBermudaExercise>
<fpml:equityEuropeanExercise>
<fpml:expirationDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>{ get(source \ "trade" \ "equityOption" \\ "equityEuropeanExercise" \\ "unadjustedDate") }</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpml:expirationDate>
</fpml:equityEuropeanExercise>
<fpml:settlementCurrency>{ get(source \ "trade" \ "equityOption" \ "equityExercise" \ "settlementCurrency") }</fpml:settlementCurrency>
<fpml:settlementType>{ get(source \ "trade" \ "equityOption" \ "equityExercise" \ "settlementType") }</fpml:settlementType>
</fpml:equityExercise>
<fpml:strike>
<fpml:strikePrice>{ get(source \ "trade" \ "equityOption" \ "strike" \\ "strikePrice") }</fpml:strikePrice>
<fpml:strikePercentage>{ get(source \ "trade" \ "equityOption" \ "strike" \\ "strikePercentage") }</fpml:strikePercentage>
<fpml:currency>{ get(source \ "trade" \ "equityOption" \ "strike" \ "currency") }</fpml:currency>
</fpml:strike>
<fpml:equityPremium>
<fpml:payerPartyReference href={ get(source \ "trade" \ "equityOption" \ "equityPremium" \"payerPartyReference", "href") }/>
<fpml:receiverPartyReference href={ get(source \ "trade" \ "equityOption" \ "equityPremium" \"receiverPartyReference", "href") }/>
<fpml:paymentAmount>
<fpml:currency>{ get(source \ "trade" \ "equityOption" \ "equityPremium" \\ "currency") }</fpml:currency>
<fpml:amount>{ get(source \ "trade" \ "equityOption" \ "equityPremium" \\ "amount") }</fpml:amount>
</fpml:paymentAmount>
</fpml:equityPremium>
</fpml:equityOption>
}
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