Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SPB_Exchange_Repo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Amelin Konstantin
SPB_Exchange_Repo
Commits
58109300
Commit
58109300
authored
Oct 30, 2018
by
Amelin Konstantin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add BondForwardTemplate
parent
fea7864b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
68 deletions
+40
-68
input/Forward Bond Client 1.xml
+1
-1
src/main/scala/templates/BondForwardTemplate.scala
+39
-67
No files found.
input/Forward Bond Client 1.xml
View file @
58109300
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
<nsdext:clientDetails>
<nsdext:clientDetails>
<nsdext:servicingParty
href=
"Party1"
/>
<nsdext:servicingParty
href=
"Party1"
/>
<nsdext:type>
P
</nsdext:type>
<nsdext:type>
P
</nsdext:type>
<nsdext:id>
PASS_04
55582007
</nsdext:id>
<nsdext:id>
PASS_04
_
55582007
</nsdext:id>
<nsdext:name>
</nsdext:name>
<nsdext:name>
</nsdext:name>
<nsdext:country
countryScheme=
"http://www.fpml.org/ext/iso3166"
>
RU
</nsdext:country>
<nsdext:country
countryScheme=
"http://www.fpml.org/ext/iso3166"
>
RU
</nsdext:country>
</nsdext:clientDetails>
</nsdext:clientDetails>
...
...
src/main/scala/templates/BondForwardTemplate.scala
View file @
58109300
...
@@ -4,73 +4,45 @@ import scala.xml.Node
...
@@ -4,73 +4,45 @@ import scala.xml.Node
class
BondForwardTemplate
(
source
:
Node
)
extends
TradeTemplate
(
source
)
{
class
BondForwardTemplate
(
source
:
Node
)
extends
TradeTemplate
(
source
)
{
protected
[
this
]
def
templateTradeBody
:
Node
=
{
protected
[
this
]
def
templateTradeBody
:
Node
=
{
<
fpml
:
bondOption>
<
rtsrep
:
bondForward>
<fpml:productType>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
productType
"
)
}
</fpml:productType>
<fpml:productType>
{
get
(
source
\
"
trade
"
\
"
bondForward
"
\
"
productType
"
)
}
</fpml:productType>
<fpml:productId
productIdScheme
={
get
(
source
\
"trade"
\
"bondOption"
\
"productId"
,
"productIdScheme"
)
}>{
get
(
source
\
"trade"
\
"bondOption"
\
"productId"
)
}</
fpml
:
productId>
<fpml:productId
productIdScheme
={
get
(
source
\
"trade"
\
"bondForward"
\
"productId"
,
"productIdScheme"
)
}>{
get
(
source
\
"trade"
\
"bondForward"
\
"productId"
)
}</
fpml
:
productId>
<fpml:buyerPartyReference
href
={
get
(
source
\
"trade"
\
"bondOption"
\
"buyerPartyReference"
,
"href"
)
}/>
<fpml:buyerPartyReference
href
={
get
(
source
\
"trade"
\
"bondForward"
\
"buyerPartyReference"
,
"href"
)
}/>
<
fpml
:
sellerPartyReference
href
={
get
(
source
\
"trade"
\
"bondOption"
\
"sellerPartyReference"
,
"href"
)
}/>
<
fpml
:
sellerPartyReference
href
={
get
(
source
\
"trade"
\
"bondForward"
\
"sellerPartyReference"
,
"href"
)
}/>
<
fpml
:
optionType>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
optionType
"
)
}
</fpml:optionType>
<
rtsrep
:
underlyer>
<fpml:premium>
<fpml:singleUnderlyer>
<fpml:payerPartyReference
href
={
get
(
source
\
"trade"
\
"bondOption"
\
"premium"
\
"payerPartyReference"
,
"href"
)
}/>
<fpml:equity
id
={
get
(
source
\
"trade"
\
"bondForward"
\
"underlyer"
\
"singleUnderlyer"
\
"equity"
,
"id"
)
}>
<
fpml
:
receiverPartyReference
href
={
get
(
source
\
"trade"
\
"bondOption"
\
"premium"
\
"receiverPartyReference"
,
"href"
)
}/>
<
fpml
:
instrumentId
instrumentIdScheme
={
get
(
source
\
"trade"
\
"bondForward"
\
"underlyer"
\
"singleUnderlyer"
\
"equity"
\
"instrumentId"
,
"instrumentIdScheme"
)
}>{
get
(
source
\
"trade"
\
"bondForward"
\
"underlyer"
\
"singleUnderlyer"
\
"equity"
\
"instrumentId"
)
}</
fpml
:
instrumentId>
<
fpml
:
paymentAmount>
</fpml:equity>
<fpml:currency>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
premium
"
\\
"
currency
"
)
}
</fpml:currency>
<fpml:bond
id
={
get
(
source
\
"trade"
\
"bondForward"
\
"underlyer"
\
"singleUnderlyer"
\
"bond"
,
"id"
)
}>
<fpml:amount>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
premium
"
\\
"
amount
"
)
}
</fpml:amount>
<
fpml
:
instrumentId
instrumentIdScheme
={
get
(
source
\
"trade"
\
"bondForward"
\
"underlyer"
\
"singleUnderlyer"
\
"bond"
\
"instrumentId"
,
"instrumentIdScheme"
)
}>{
get
(
source
\
"trade"
\
"bondForward"
\
"underlyer"
\
"singleUnderlyer"
\
"bond"
\
"instrumentId"
)
}</
fpml
:
instrumentId>
</fpml:paymentAmount>
</fpml:bond>
{
/*
paymentDate
isn`t
present
in
source!!!*/
}
<fpml:index
id
={
get
(
source
\
"trade"
\
"bondForward"
\
"underlyer"
\
"singleUnderlyer"
\
"index"
,
"id"
)
}>
<
fpml
:
instrumentId
instrumentIdScheme
={
get
(
source
\
"trade"
\
"bondForward"
\
"underlyer"
\
"singleUnderlyer"
\
"index"
\
"instrumentId"
,
"instrumentIdScheme"
)
}>{
get
(
source
\
"trade"
\
"bondForward"
\
"underlyer"
\
"singleUnderlyer"
\
"index"
\
"instrumentId"
)
}</
fpml
:
instrumentId>
<fpml:paymentDate>
</fpml:index>
<fpml:adjustableDate>
<fpml:openUnits>
{
get
(
source
\
"
trade
"
\
"
bondForward
"
\
"
underlyer
"
\
"
singleUnderlyer
"
\
"
openUnits
"
)
}
</fpml:openUnits>
<fpml:unadjustedDate>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
americanExercise
"
\
"
expirationDate
"
\\
"
unadjustedDate
"
)
}
</fpml:unadjustedDate>
</fpml:singleUnderlyer>
<fpml:unadjustedDate>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
bermudaExercise
"
\\
"
unadjustedDate
"
)
}
</fpml:unadjustedDate>
</rtsrep:underlyer>
<fpml:unadjustedDate>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
europeanExercise
"
\\
"
unadjustedDate
"
)
}
</fpml:unadjustedDate>
<rtsrep:notionalAmount>
</fpml:adjustableDate>
<fpml:currency>
{
get
(
source
\
"
trade
"
\
"
bondForward
"
\
"
notionalAmount
"
\
"
currency
"
)
}
</fpml:currency>
</fpml:paymentDate>
<fpml:amount>
{
get
(
source
\
"
trade
"
\
"
bondForward
"
\
"
notionalAmount
"
\
"
amount
"
)
}
</fpml:amount>
</fpml:premium>
</rtsrep:notionalAmount>
<fpml:americanExercise>
{
/*
settlementType
isn`t
present
in
source!!!*/
}
<fpml:commencementDate>
<rtsrep:settlementType>
{
"
CashOrPhysical
"
}
</rtsrep:settlementType>
<fpml:adjustableDate>
<rtsrep:settlementDate>
<fpml:unadjustedDate>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
americanExercise
"
\
"
commencementDate
"
\\
"
unadjustedDate
"
)
}
</fpml:unadjustedDate>
<fpml:adjustableDate>
</fpml:adjustableDate>
<fpml:unadjustedDate>
{
get
(
source
\
"
trade
"
\
"
bondForward
"
\
"
settlementDate
"
\\
"
unadjustedDate
"
)
}
</fpml:unadjustedDate>
</fpml:commencementDate>
</fpml:adjustableDate>
<fpml:expirationDate>
</rtsrep:settlementDate>
<fpml:adjustableDate>
<rtsrep:settlementCurrency>
{
get
(
source
\
"
trade
"
\
"
bondForward
"
\
"
settlementCurrency
"
)
}
</rtsrep:settlementCurrency>
<fpml:unadjustedDate>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
americanExercise
"
\
"
expirationDate
"
\\
"
unadjustedDate
"
)
}
</fpml:unadjustedDate>
<rtsrep:forwardPrice>
</fpml:adjustableDate>
<rtsrep:forwardPricePerBond>
</fpml:expirationDate>
<fpml:currency>
{
get
(
source
\
"
trade
"
\
"
bondForward
"
\
"
forwardPrice
"
\\
"
currency
"
)
}
</fpml:currency>
</fpml:americanExercise>
<fpml:amount>
{
get
(
source
\
"
trade
"
\
"
bondForward
"
\
"
forwardPrice
"
\\
"
amount
"
)
}
</fpml:amount>
<fpml:bermudaExercise>
</rtsrep:forwardPricePerBond>
<fpml:bermudaExerciseDates>
<rtsrep:forwardPricePercentage>
{
get
(
source
\
"
trade
"
\
"
bondForward
"
\
"
forwardPrice
"
\
"
forwardPricePercentage
"
)
}
</rtsrep:forwardPricePercentage>
<fpml:adjustableDates>
</rtsrep:forwardPrice>
<fpml:unadjustedDate>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
bermudaExercise
"
\\
"
unadjustedDate
"
)
}
</fpml:unadjustedDate>
</rtsrep:bondForward>
</fpml:adjustableDates>
</fpml:bermudaExerciseDates>
</fpml:bermudaExercise>
<fpml:europeanExercise>
<fpml:expirationDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
europeanExercise
"
\\
"
unadjustedDate
"
)
}
</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpml:expirationDate>
</fpml:europeanExercise>
<fpml:notionalAmount>
<fpml:currency>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
notionalAmount
"
\
"
currency
"
)
}
</fpml:currency>
<fpml:amount>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
notionalAmount
"
\
"
amount
"
)
}
</fpml:amount>
</fpml:notionalAmount>
<fpml:optionEntitlement>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
optionEntitlement
"
)
}
</fpml:optionEntitlement>
<fpml:numberOfOptions>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
numberOfOptions
"
)
}
</fpml:numberOfOptions>
<fpml:settlementType>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
settlementType
"
)
}
</fpml:settlementType>
<fpml:strike>
<fpml:price>
<fpml:strikePrice>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
strike
"
\\
"
strikePrice
"
)
}
</fpml:strikePrice>
<fpml:strikePercentage>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
strike
"
\\
"
strikePercentage
"
)
}
</fpml:strikePercentage>
<fpml:currency>
{
get
(
source
\
"
trade
"
\
"
bondOption
"
\
"
strike
"
\\
"
currency
"
)
}
</fpml:currency>
</fpml:price>
</fpml:strike>
<fpml:bond
id
={
get
(
source
\
"trade"
\
"bondOption"
\
"bond"
,
"id"
)
}>
<
fpml
:
instrumentId
instrumentIdScheme
={
get
(
source
\
"trade"
\
"bondOption"
\
"bond"
\
"instrumentId"
,
"instrumentIdScheme"
)
}>{
get
(
source
\
"trade"
\
"bondOption"
\
"bond"
\
"instrumentId"
)
}</
fpml
:
instrumentId>
</fpml:bond>
</fpml:bondOption>
}
}
def
isStraight
=
true
def
isStraight
=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment