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
10bfeca9
Commit
10bfeca9
authored
Oct 24, 2018
by
Amelin Konstantin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CL interface to Main. Add application.conf. Move source files to input.
parent
f75aa9ff
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
32 additions
and
523 deletions
+32
-523
build.sbt
+1
-0
input/Repo Client equity 1.xml
+1
-1
input/Repo Client equity.xml
+1
-1
input/Repo NSD bond.xml
+0
-0
input/Repo NSD equity.xml
+0
-0
project/plugins.sbt
+1
-1
src/main/resources/application.conf
+5
-0
src/main/resources/rts/Repo RTS bond.xml
+0
-196
src/main/resources/rts/Repo RTS equity 1.xml
+0
-124
src/main/resources/rts/Repo RTS equity 2.xml
+0
-193
src/main/scala/Main.scala
+23
-7
No files found.
build.sbt
View file @
10bfeca9
...
...
@@ -7,3 +7,4 @@ scalaVersion := "2.12.6"
libraryDependencies
+=
"org.scala-lang.modules"
%%
"scala-xml"
%
"1.1.0"
libraryDependencies
+=
"org.scalactic"
%%
"scalactic"
%
"3.0.5"
libraryDependencies
+=
"org.scalatest"
%%
"scalatest"
%
"3.0.5"
%
"test"
libraryDependencies
+=
"com.typesafe"
%
"config"
%
"1.3.2"
src/main/resources/nsd
/Repo Client equity 1.xml
→
input
/Repo Client equity 1.xml
View file @
10bfeca9
<?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"
>
<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
../src/main/resources/nsd/
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)"
>
BCSb458cd554d1b4b28a3dbd82dd27c5ca4
</messageId>
<sentBy>
RP0058900001
</sentBy>
...
...
src/main/resources/nsd
/Repo Client equity.xml
→
input
/Repo Client equity.xml
View file @
10bfeca9
<?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"
>
<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
../src/main/resources/nsd/
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)"
>
BCS9151431ca24348a5b4bf569ee7e9a760
</messageId>
<sentBy>
RP0058900001
</sentBy>
...
...
src/main/resources/nsd
/Repo NSD bond.xml
→
input
/Repo NSD bond.xml
View file @
10bfeca9
File moved
src/main/resources/nsd
/Repo NSD equity.xml
→
input
/Repo NSD equity.xml
View file @
10bfeca9
File moved
project/plugins.sbt
View file @
10bfeca9
addSbtPlugin
(
"com.eed3si9n"
%
"sbt-assembly"
%
"0.14.
7
"
)
addSbtPlugin
(
"com.eed3si9n"
%
"sbt-assembly"
%
"0.14.
8
"
)
src/main/resources/application.conf
0 → 100644
View file @
10bfeca9
# Application settings
# Set debug mode
debug
=
true
\ No newline at end of file
src/main/resources/rts/Repo RTS bond.xml
deleted
100644 → 0
View file @
f75aa9ff
<fpml:nonpublicExecutionReport
xmlns:fpml=
"http://www.fpml.org/FpML-5/recordkeeping"
xmlns:fpmlext=
"http://www.fpml.org/FpML-5/ext"
xmlns:rtsrep=
"http://www.fpml.ru/repository"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
fpmlVersion=
"5-7"
>
<fpml:header>
<fpml:messageId>
Repo-20181010-15:37:33.434-1
</fpml:messageId>
<fpml:sentBy>
NFKSP
</fpml:sentBy>
<fpml:sendTo>
SPB01
</fpml:sendTo>
<fpml:creationTimestamp>
2018-10-10T15:37:33
</fpml:creationTimestamp>
<fpml:implementationSpecification>
<fpml:version>
2
</fpml:version>
</fpml:implementationSpecification>
</fpml:header>
<fpml:isCorrection>
false
</fpml:isCorrection>
<fpml:correlationId
correlationIdScheme=
""
>
Repo-20181010-15:37:33.434-1
</fpml:correlationId>
<fpml:trade>
<fpml:tradeHeader>
<fpml:partyTradeIdentifier>
<fpml:partyReference
href=
"SPB01"
/>
<fpml:tradeId
tradeIdScheme=
"UTI"
>
S9DKA7JG1J9651B357729143488154A5EB6BBBB6B1
</fpml:tradeId>
</fpml:partyTradeIdentifier>
<fpml:partyTradeIdentifier>
<fpml:partyReference
href=
"LEI_253400S2HGY7JG1JWC41"
/>
<fpml:tradeId>
123
</fpml:tradeId>
</fpml:partyTradeIdentifier>
<fpml:partyTradeIdentifier>
<fpml:partyReference
href=
"TEST"
/>
<fpml:tradeId>
321
</fpml:tradeId>
</fpml:partyTradeIdentifier>
<fpml:partyTradeInformation>
<fpml:partyReference
href=
"SPB01"
/>
<fpml:relatedParty>
<fpml:partyReference
href=
"LEI_vvv"
/>
<fpml:role>
ClearingOrganization
</fpml:role>
</fpml:relatedParty>
<fpml:category
categoryScheme=
"http://www.fpml.ru/repository/trade-settlement-type"
>
ОТС
</fpml:category>
<fpml:category
categoryScheme=
"http://www.fpml.ru/repository/trade-settlement-method"
>
C
</fpml:category>
<fpml:executionDateTime>
2018-10-05T00:00:00
</fpml:executionDateTime>
<fpml:reportingRegime>
<fpml:name>
RussianFederation
</fpml:name>
<fpml:mandatorilyClearable>
true
</fpml:mandatorilyClearable>
</fpml:reportingRegime>
</fpml:partyTradeInformation>
<fpml:partyTradeInformation>
<fpml:partyReference
href=
"LEI_253400S2HGY7JG1JWC41"
/>
<fpml:relatedParty>
<fpml:partyReference
href=
"LEI_12548741"
/>
<fpml:role>
Client
</fpml:role>
<fpml:type>
L
</fpml:type>
</fpml:relatedParty>
<fpml:relatedParty>
<fpml:partyReference
href=
"LEI_43382"
/>
<fpml:role>
ClearingOrganization
</fpml:role>
</fpml:relatedParty>
<fpml:relatedParty>
<fpml:partyReference
href=
"TEST"
/>
<fpml:role>
Party
</fpml:role>
</fpml:relatedParty>
<fpml:timestamps>
<fpml:timestamp>
<fpml:type>
InClearingPool
</fpml:type>
<fpml:value>
2018-10-09T09:00:00
</fpml:value>
</fpml:timestamp>
<fpml:timestamp>
<fpml:type>
InPortfolio
</fpml:type>
<fpml:value>
2018-10-09T09:00:00
</fpml:value>
</fpml:timestamp>
<fpml:timestamp>
<fpml:type>
OutPortfolio
</fpml:type>
<fpml:value>
2018-10-09T09:00:00
</fpml:value>
</fpml:timestamp>
</fpml:timestamps>
<fpml:collateralizationType>
Uncollateralized
</fpml:collateralizationType>
<fpml:collateralPortfolio>
Fully
</fpml:collateralPortfolio>
</fpml:partyTradeInformation>
<fpml:partyTradeInformation>
<fpml:partyReference
href=
"TEST"
/>
<fpml:relatedParty>
<fpml:partyReference
href=
"PASS_9999445555"
/>
<fpml:role>
Client
</fpml:role>
<fpml:type>
TR
</fpml:type>
</fpml:relatedParty>
<fpml:relatedParty>
<fpml:partyReference
href=
"LEI_NNN"
/>
<fpml:role>
ClearingOrganization
</fpml:role>
</fpml:relatedParty>
<fpml:relatedParty>
<fpml:partyReference
href=
"LEI_253400S2HGY7JG1JWC41"
/>
<fpml:role>
Party
</fpml:role>
</fpml:relatedParty>
<timestamps>
<timestamp>
<type>
InClearingPool
</type>
<value>
2018-10-09T09:00:00
</value>
</timestamp>
<timestamp>
<type>
InPortfolio
</type>
<value>
2018-10-09T09:00:00
</value>
</timestamp>
<timestamp>
<type>
OutPortfolio
</type>
<value>
2018-10-10T10:00:00
</value>
</timestamp>
</timestamps>
<fpml:collateralizationType>
Uncollateralized
</fpml:collateralizationType>
<fpml:collateralPortfolio>
Fully
</fpml:collateralPortfolio>
</fpml:partyTradeInformation>
</fpml:tradeHeader>
<fpmlext:repo
xsi:type=
"rtsrep:Repo"
>
<fpml:productId
productIdScheme=
"UnderlyingAsset"
>
RU0009109391
</fpml:productId>
<fpmlext:floatingRateCalculation>
<fpml:floatingRateIndex>
EUR-EONIA-OIS-COMPOUND
</fpml:floatingRateIndex>
</fpmlext:floatingRateCalculation>
<fpmlext:spotLeg
xsi:type=
"rtsrep:RepoTransactionLeg"
>
<fpml:buyerPartyReference
href=
"LEI_253400S2HGY7JG1JWC41"
/>
<fpml:sellerPartyReference
href=
"TEST"
/>
<fpmlext:settlementDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
2018-10-09
</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpmlext:settlementDate>
<fpml:settlementAmount>
<fpml:currency>
RUB
</fpml:currency>
<fpml:amount>
1000000
</fpml:amount>
</fpml:settlementAmount>
<fpmlext:collateral
xsi:type=
"rtsrep:CollateralValuation"
>
<fpmlext:nominalAmount>
<fpml:currency>
RUB
</fpml:currency>
<fpml:amount>
1000
</fpml:amount>
</fpmlext:nominalAmount>
<fpmlext:assetReference
href=
"RU0009109391"
/>
</fpmlext:collateral>
<rtsrep:deliveryDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
2018-10-08
</fpml:unadjustedDate>
</fpml:adjustableDate>
</rtsrep:deliveryDate>
</fpmlext:spotLeg>
<fpmlext:forwardLeg
xsi:type=
"rtsrep:ForwardRepoTransactionLeg"
>
<fpml:buyerPartyReference
href=
"TEST"
/>
<fpml:sellerPartyReference
href=
"LEI_253400S2HGY7JG1JWC41"
/>
<fpmlext:settlementDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
2018-10-09
</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpmlext:settlementDate>
<rtsrep:deliveryDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
2018-10-09
</fpml:unadjustedDate>
</fpml:adjustableDate>
</rtsrep:deliveryDate>
</fpmlext:forwardLeg>
<fpml:bond
id=
"RU0009109391"
>
<fpml:instrumentId
instrumentIdScheme=
""
>
RU0009109391
</fpml:instrumentId>
</fpml:bond>
</fpmlext:repo>
<fpml:documentation>
<fpml:masterAgreement>
<fpml:masterAgreementId>
444
</fpml:masterAgreementId>
</fpml:masterAgreement>
</fpml:documentation>
</fpml:trade>
<fpml:party
id=
"SPB01"
>
<fpml:partyId>
SPB01
</fpml:partyId>
<fpml:partyName>
ПАО «Санкт-Петербургская биржа»
</fpml:partyName>
</fpml:party>
<fpml:party
id=
"LEI_253400S2HGY7JG1JWC41"
>
<fpml:partyId
partyIdScheme=
"LEI"
>
LEI_253400S2HGY7JG1JWC41
</fpml:partyId>
<fpml:partyName>
Ассоциация НП РТС
</fpml:partyName>
<fpml:country>
RU
</fpml:country>
<fpml:organizationType>
Other
</fpml:organizationType>
</fpml:party>
<fpml:party
id=
"LEI_12548741"
>
<fpml:partyId
partyIdScheme=
"LEI"
>
LEI_12548741
</fpml:partyId>
<fpml:partyName>
BANK
</fpml:partyName>
<fpml:country>
RU
</fpml:country>
</fpml:party>
<fpml:party
id=
"TEST"
>
<fpml:partyId>
TEST
</fpml:partyId>
<fpml:partyName>
ООО ТЕСТ
</fpml:partyName>
<fpml:country>
RU
</fpml:country>
<fpml:organizationType>
BR
</fpml:organizationType>
</fpml:party>
<fpml:party
id=
"PASS_9999445555"
>
<fpml:partyId
partyIdScheme=
"PASS"
>
PASS_9999445555
</fpml:partyId>
<fpml:partyName>
Иванов
</fpml:partyName>
<fpml:country>
RU
</fpml:country>
</fpml:party>
<fpml:party
id=
"vvv"
>
<fpml:partyId
partyIdScheme=
"LEI"
>
vvv
</fpml:partyId>
</fpml:party>
<fpml:party
id=
"43382"
>
<fpml:partyId
partyIdScheme=
"LEI"
>
43382
</fpml:partyId>
</fpml:party>
<fpml:party
id=
"NNN"
>
<fpml:partyId
partyIdScheme=
"LEI"
>
NNN
</fpml:partyId>
</fpml:party>
</fpml:nonpublicExecutionReport>
\ No newline at end of file
src/main/resources/rts/Repo RTS equity 1.xml
deleted
100644 → 0
View file @
f75aa9ff
<?xml version="1.0" encoding="utf-8"?>
<signedDocument
xmlns=
"http://www.fpml.ru/repository"
>
<document>
<fpml:nonpublicExecutionReport
xmlns:fpml=
"http://www.fpml.org/FpML-5/recordkeeping"
xmlns:fpmlext=
"http://www.fpml.org/FpML-5/ext"
xmlns:rtsrep=
"http://www.fpml.ru/repository"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
fpmlVersion=
"5-7"
>
<fpml:header>
<fpml:messageId>
NFKSP-TO-SPB01-REPO-602-2016-06-28
</fpml:messageId>
<fpml:sentBy>
NFKSP
</fpml:sentBy>
<fpml:sendTo>
SPB01
</fpml:sendTo>
<fpml:creationTimestamp>
2016-06-28T11:00:00
</fpml:creationTimestamp>
<fpml:implementationSpecification>
<fpml:version>
2
</fpml:version>
</fpml:implementationSpecification>
</fpml:header>
<fpml:isCorrection>
false
</fpml:isCorrection>
<fpml:correlationId
correlationIdScheme=
""
>
NFKSP-TO-SPB01-REPO-602-2016-06-28
</fpml:correlationId>
<fpml:trade>
<fpml:tradeHeader>
<fpml:partyTradeIdentifier>
<fpml:partyReference
href=
"NFKSP"
/>
<fpml:tradeId>
604(1)-0416-ДИЛ-П/604(2)-0416-ДИЛ-П
</fpml:tradeId>
</fpml:partyTradeIdentifier>
<fpml:partyTradeIdentifier>
<fpml:partyReference
href=
"ITN_7718173549"
/>
<fpml:tradeId>
604(1)-0416-ДИЛ-П/604(2)-0416-ДИЛ-П
</fpml:tradeId>
</fpml:partyTradeIdentifier>
<fpml:partyTradeInformation>
<fpml:partyReference
href=
"SPB01"
/>
<fpml:category
categoryScheme=
"http://www.fpml.ru/repository/trade-settlement-type"
>
OTC
</fpml:category>
<fpml:category
categoryScheme=
"http://www.fpml.ru/repository/trade-settlement-method"
>
E
</fpml:category>
<fpml:executionDateTime>
2016-04-20T00:00:00
</fpml:executionDateTime>
<fpml:reportingRegime>
<fpml:name>
RussianFederation
</fpml:name>
<fpml:mandatorilyClearable>
false
</fpml:mandatorilyClearable>
</fpml:reportingRegime>
</fpml:partyTradeInformation>
<fpml:partyTradeInformation>
<fpml:partyReference
href=
"NFKSP"
/>
<fpml:collateralizationType>
Uncollateralized
</fpml:collateralizationType>
</fpml:partyTradeInformation>
<fpml:partyTradeInformation>
<fpml:partyReference
href=
"ITN_7718173549"
/>
<fpml:collateralizationType>
Uncollateralized
</fpml:collateralizationType>
</fpml:partyTradeInformation>
</fpml:tradeHeader>
<fpmlext:repo
xsi:type=
"rtsrep:Repo"
>
<fpml:productId>
Equity:Repo:EquityRepo
</fpml:productId>
<fpml:productId>
RU000A0JV8K5
</fpml:productId>
<fpmlext:fixedRateSchedule>
<fpml:initialValue>
0.1025
</fpml:initialValue>
</fpmlext:fixedRateSchedule>
<fpmlext:dayCountFraction>
1/1
</fpmlext:dayCountFraction>
<fpmlext:spotLeg
xsi:type=
"rtsrep:RepoTransactionLeg"
>
<fpml:buyerPartyReference
href=
"ITN_7718173549"
/>
<fpml:sellerPartyReference
href=
"NFKSP"
/>
<fpmlext:settlementDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
2016-04-21
</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpmlext:settlementDate>
<fpml:settlementAmount>
<fpml:currency>
RUB
</fpml:currency>
<fpml:amount>
119003352.32
</fpml:amount>
</fpml:settlementAmount>
<fpmlext:collateral
xsi:type=
"rtsrep:CollateralValuation"
>
<fpmlext:numberOfUnits>
1371
</fpmlext:numberOfUnits>
<fpmlext:unitPrice>
<fpml:currency>
RUB
</fpml:currency>
<fpml:amount>
86800.40286
</fpml:amount>
</fpmlext:unitPrice>
<fpmlext:assetReference
href=
"RU000A0JV8K5"
/>
</fpmlext:collateral>
<rtsrep:deliveryMethod>
FreeOfPayment
</rtsrep:deliveryMethod>
<rtsrep:deliveryDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
2016-04-21
</fpml:unadjustedDate>
</fpml:adjustableDate>
</rtsrep:deliveryDate>
</fpmlext:spotLeg>
<fpmlext:forwardLeg
xsi:type=
"rtsrep:ForwardRepoTransactionLeg"
>
<fpml:buyerPartyReference
href=
"NFKSP"
/>
<fpml:sellerPartyReference
href=
"ITN_7718173549"
/>
<fpmlext:settlementDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
2017-04-20
</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpmlext:settlementDate>
<fpml:settlementAmount>
<fpml:currency>
RUB
</fpml:currency>
<fpml:amount>
119003352.32
</fpml:amount>
</fpml:settlementAmount>
</fpmlext:forwardLeg>
<fpml:equity
id=
"RU000A0JV8K5"
>
<fpml:instrumentId
instrumentIdScheme=
""
>
RU000A0JV8K5
</fpml:instrumentId>
<fpml:description>
ПТК-Холдинг, ПАО ao01
</fpml:description>
</fpml:equity>
</fpmlext:repo>
<fpml:documentation>
<fpml:masterAgreement>
<fpml:masterAgreementId>
MA-20160628-00000001
</fpml:masterAgreementId>
</fpml:masterAgreement>
</fpml:documentation>
</fpml:trade>
<fpml:party
id=
"NFKSP"
>
<fpml:partyId>
NFKSP
</fpml:partyId>
<fpml:partyName>
ООО «НФК-Сбережения»
</fpml:partyName>
</fpml:party>
<fpml:party
id=
"ITN_7718173549"
>
<fpml:partyId
partyIdScheme=
"ITN"
>
ITN_7718173549
</fpml:partyId>
<fpml:partyName>
ЗАО "Дельта Инвестмент"
</fpml:partyName>
<fpml:country>
RU
</fpml:country>
<fpml:organizationType>
Other
</fpml:organizationType>
</fpml:party>
<fpml:party
id=
"SPB01"
>
<fpml:partyId>
SPB01
</fpml:partyId>
<fpml:partyName>
ПАО «Санкт-Петербургская биржа»
</fpml:partyName>
</fpml:party>
</fpml:nonpublicExecutionReport>
</document>
</signedDocument>
src/main/resources/rts/Repo RTS equity 2.xml
deleted
100644 → 0
View file @
f75aa9ff
<fpml:nonpublicExecutionReport
xmlns:fpml=
"http://www.fpml.org/FpML-5/recordkeeping"
xmlns:fpmlext=
"http://www.fpml.org/FpML-5/ext"
xmlns:rtsrep=
"http://www.fpml.ru/repository"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
fpmlVersion=
"5-7"
>
<fpml:header>
<fpml:messageId>
Repo-20181010-13:28:57.551-1
</fpml:messageId>
<fpml:sentBy>
NFKSP
</fpml:sentBy>
<fpml:sendTo>
SPB01
</fpml:sendTo>
<fpml:creationTimestamp>
2018-10-10T13:28:57
</fpml:creationTimestamp>
<fpml:implementationSpecification>
<fpml:version>
2
</fpml:version>
</fpml:implementationSpecification>
</fpml:header>
<fpml:isCorrection>
false
</fpml:isCorrection>
<fpml:correlationId
correlationIdScheme=
""
>
Repo-20181010-13:28:57.552-1
</fpml:correlationId>
<fpml:trade>
<fpml:tradeHeader>
<fpml:partyTradeIdentifier>
<fpml:partyReference
href=
"SPB01"
/>
<fpml:tradeId
tradeIdScheme=
"UTI"
>
S9DKA7JG1J9651B357729143488154A5EB6BBBB6B1
</fpml:tradeId>
</fpml:partyTradeIdentifier>
<fpml:partyTradeIdentifier>
<fpml:partyReference
href=
"LEI_253400S2HGY7JG1JWC41"
/>
<fpml:tradeId>
123
</fpml:tradeId>
</fpml:partyTradeIdentifier>
<fpml:partyTradeIdentifier>
<fpml:partyReference
href=
"TEST"
/>
<fpml:tradeId>
321
</fpml:tradeId>
</fpml:partyTradeIdentifier>
<fpml:partyTradeInformation>
<fpml:partyReference
href=
"SPB01"
/>
<fpml:relatedParty>
<fpml:partyReference
href=
"LEI_vvv"
/>
<fpml:role>
ClearingOrganization
</fpml:role>
</fpml:relatedParty>
<fpml:category
categoryScheme=
"http://www.fpml.ru/repository/trade-settlement-type"
>
ОТС
</fpml:category>
<fpml:category
categoryScheme=
"http://www.fpml.ru/repository/trade-settlement-method"
>
C
</fpml:category>
<fpml:executionDateTime>
2018-10-05T00:00:00
</fpml:executionDateTime>
<fpml:reportingRegime>
<fpml:name>
RussianFederation
</fpml:name>
<fpml:mandatorilyClearable>
true
</fpml:mandatorilyClearable>
</fpml:reportingRegime>
</fpml:partyTradeInformation>
<fpml:partyTradeInformation>
<fpml:partyReference
href=
"LEI_253400S2HGY7JG1JWC41"
/>
<fpml:relatedParty>
<fpml:partyReference
href=
"LEI_12548741"
/>
<fpml:role>
Client
</fpml:role>
<fpml:type>
L
</fpml:type>
</fpml:relatedParty>
<fpml:relatedParty>
<fpml:partyReference
href=
"LEI_43382"
/>
<fpml:role>
ClearingOrganization
</fpml:role>
</fpml:relatedParty>
<fpml:relatedParty>
<fpml:partyReference
href=
"TEST"
/>
<fpml:role>
Party
</fpml:role>
</fpml:relatedParty>
<fpml:timestamps>
<fpml:timestamp>
<fpml:type>
InClearingPool
</fpml:type>
<fpml:value>
2018-10-09T09:00:00
</fpml:value>
</fpml:timestamp>
<fpml:timestamp>
<fpml:type>
InPortfolio
</fpml:type>
<fpml:value>
2018-10-09T09:00:00
</fpml:value>
</fpml:timestamp>
<fpml:timestamp>
<fpml:type>
OutPortfolio
</fpml:type>
<fpml:value>
2018-10-09T09:00:00
</fpml:value>
</fpml:timestamp>
</fpml:timestamps>
<fpml:collateralizationType>
Uncollateralized
</fpml:collateralizationType>
<fpml:collateralPortfolio>
Fully
</fpml:collateralPortfolio>
</fpml:partyTradeInformation>
<fpml:partyTradeInformation>
<fpml:partyReference
href=
"TEST"
/>
<fpml:relatedParty>
<fpml:partyReference
href=
"PASS_9999445555"
/>
<fpml:role>
Client
</fpml:role>
<fpml:type>
TR
</fpml:type>
</fpml:relatedParty>
<fpml:relatedParty>
<fpml:partyReference
href=
"LEI_NNN"
/>
<fpml:role>
ClearingOrganization
</fpml:role>
</fpml:relatedParty>
<fpml:relatedParty>
<fpml:partyReference
href=
"LEI_253400S2HGY7JG1JWC41"
/>
<fpml:role>
Party
</fpml:role>
</fpml:relatedParty>
<timestamps>
<timestamp>
<type>
InClearingPool
</type>
<value>
2018-10-09T09:00:00
</value>
</timestamp>
<timestamp>
<type>
InPortfolio
</type>
<value>
2018-10-09T09:00:00
</value>
</timestamp>
<timestamp>
<type>
OutPortfolio
</type>
<value>
2018-10-10T10:00:00
</value>
</timestamp>
</timestamps>
<fpml:collatealizationType>
Uncollateralized
</fpml:collatealizationType>
<fpml:collateralPortfolio>
Fully
</fpml:collateralPortfolio>
</fpml:partyTradeInformation>
</fpml:tradeHeader>
<fpmlext:repo
xsi:type=
"rtsrep:Repo"
>
<fpml:productId
productIdScheme=
"UnderlyingAsset"
>
RU0009109391
</fpml:productId>
<fpmlext:fixedRateSchedule>
<fpml:initialValue>
0.1025
</fpml:initialValue>
</fpmlext:fixedRateSchedule>
<fpmlext:spotLeg
xsi:type=
"rtsrep:RepoTransactionLeg"
>
<fpml:buyerPartyReference
href=
"LEI_253400S2HGY7JG1JWC41"
/>
<fpml:sellerPartyReference
href=
"TEST"
/>
<fpmlext:settlementDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
2018-10-09
</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpmlext:settlementDate>
<fpml:settlementAmount>
<fpml:currency>
RUB
</fpml:currency>
<fpml:amount>
1000000
</fpml:amount>
</fpml:settlementAmount>
<fpmlext:collateral
xsi:type=
"rtsrep:CollateralValuation"
>
<fpmlext:numberOfUnits>
100
</fpmlext:numberOfUnits>
<fpmlext:assetReference
href=
"RU0009109391"
/>
</fpmlext:collateral>
<rtsrep:deliveryDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
2018-10-08
</fpml:unadjustedDate>
</fpml:adjustableDate>
</rtsrep:deliveryDate>
</fpmlext:spotLeg>
<fpmlext:forwardLeg
xsi:type=
"rtsrep:ForwardRepoTransactionLeg"
>
<fpml:buyerPartyReference
href=
"TEST"
/>
<fpml:sellerPartyReference
href=
"LEI_253400S2HGY7JG1JWC41"
/>
<fpmlext:settlementDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
2018-10-09
</fpml:unadjustedDate>
</fpml:adjustableDate>
</fpmlext:settlementDate>
<rtsrep:deliveryDate>
<fpml:adjustableDate>
<fpml:unadjustedDate>
2018-10-09
</fpml:unadjustedDate>
</fpml:adjustableDate>
</rtsrep:deliveryDate>
</fpmlext:forwardLeg>
<fpml:equity
id=
"RU0009109391"
>
<fpml:instrumentId
instrumentIdScheme=
""
>
RU0009109391
</fpml:instrumentId>
</fpml:equity>
</fpmlext:repo>
<fpml:documentation>
<fpml:masterAgreement>
<fpml:masterAgreementId>
444
</fpml:masterAgreementId>
</fpml:masterAgreement>
</fpml:documentation>
</fpml:trade>
<fpml:party
id=
"SPB01"
>
<fpml:partyId>
SPB01
</fpml:partyId>
<fpml:partyName>
ПАО «Санкт-Петербургская биржа»
</fpml:partyName>
</fpml:party>
<fpml:party
id=
"LEI_253400S2HGY7JG1JWC41"
>
<fpml:partyId
partyIdScheme=
"LEI"
>
LEI_253400S2HGY7JG1JWC41
</fpml:partyId>
<fpml:partyName>
Ассоциация НП РТС
</fpml:partyName>
<fpml:country>
RU
</fpml:country>
<fpml:organizationType>
Other
</fpml:organizationType>
</fpml:party>
<fpml:party
id=
"LEI_12548741"
>
<fpml:partyId
partyIdScheme=
"LEI"
>
LEI_12548741
</fpml:partyId>
<fpml:partyName>
BANK
</fpml:partyName>
<fpml:country>
RU
</fpml:country>
</fpml:party>
<fpml:party
id=
"TEST"
>
<fpml:partyId>
TEST
</fpml:partyId>
<fpml:partyName>
ООО ТЕСТ
</fpml:partyName>
<fpml:country>
RU
</fpml:country>
<fpml:organizationType>
BR
</fpml:organizationType>
</fpml:party>
<fpml:party
id=
"PASS_9999445555"
>
<fpml:partyId
partyIdScheme=
"PASS"
>
PASS_9999445555
</fpml:partyId>
<fpml:partyName>
Иванов
</fpml:partyName>
<fpml:country>
RU
</fpml:country>
</fpml:party>
<fpml:party
id=
"vvv"
>
<fpml:partyId
partyIdScheme=
"LEI"
>
vvv
</fpml:partyId>
</fpml:party>
<fpml:party
id=
"43382"
>
<fpml:partyId
partyIdScheme=
"LEI"
>
43382
</fpml:partyId>
</fpml:party>
<fpml:party
id=
"NNN"
>
<fpml:partyId
partyIdScheme=
"LEI"
>
NNN
</fpml:partyId>
</fpml:party>
</fpml:nonpublicExecutionReport>
\ No newline at end of file
src/main/scala/Main.scala
View file @
10bfeca9
import
xmlvalid._
import
scala.util.
{
Failure
,
Success
,
Try
}
import
com.typesafe.config.
{
Config
,
ConfigFactory
}
import
scala.xml._
import
java.nio.file.
{
Files
,
Path
,
Paths
}
import
scala.util.
{
Failure
,
Success
,
Try
}
import
xmlvalid._
import
templates._
object
Main
extends
App
{
object
Main
{
val
conf
:
Config
=
ConfigFactory
.
load
val
debugMode
:
Boolean
=
conf
.
getBoolean
(
"debug"
)
implicit
def
templateFactory
(
source
:
Node
)
:
Template
with
Logger
=
{
(
source
\
"trade"
).
head
.
child
...
...
@@ -16,9 +20,18 @@ object Main extends App {
}
}
val
sourceName
=
"Repo NSD bond"
def
main
(
args
:
Array
[
String
])
:
Unit
=
{
if
(
args
.
length
!=
2
)
println
(
"Error: Undefined INPUT/OUTPUT directory. Usage: app INPUT OUTPUT"
)
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
{
val
p
=
new
PrettyPrinter
(
140
,
2
)
val
sourceXml
=
XML
.
loadFile
(
"src/main/resources/nsd/"
+
sourceName
+
".xml"
)
for
(
v
<-
Files
.
walk
(
Paths
.
get
(
args
(
0
))).
toArray
)
{
val
f
=
v
.
asInstanceOf
[
Path
]
if
(!
Files
.
isDirectory
(
f
))
{
val
fName
=
f
.
getFileName
.
toString
.
split
(
'.'
)
val
sourceXml
=
XML
.
loadFile
(
f
.
toString
)
val
template
=
Template
(
sourceXml
)
val
outputXml
=
XML
.
loadString
(
p
.
format
(
template
.
render
))
//val outputXml = template.template
...
...
@@ -39,6 +52,9 @@ object Main extends App {
case
Failure
(
ex
)
=>
println
(
s
"Output xml isn`t wellformed or invalid: ${ex.getMessage}"
)
}
XML
.
save
(
"output/"
+
sourceName
+
"_RTS.xml"
,
outputXml
,
xmlDecl
=
true
)
XML
.
save
(
Paths
.
get
(
args
(
1
),
fName
(
0
)
+
"_RTS."
+
fName
(
1
)).
toString
,
outputXml
,
xmlDecl
=
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