Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JEAN BAPTISTE ZIADE Transfer_FRAGMOS #3234

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions rosetta-source/src/main/rosetta/event-common-enum.rosetta
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ enum RecordAmountTypeEnum: <"The enumeration of the account level for the billin
GrandTotal
ParentTotal

enum TransferStatusEnum: <"The enumeration values to specify the transfer status.">
Disputed <"The transfer is disputed.">
Instructed <"The transfer has been instructed.">
Pending <"The transfer is pending instruction.">
enum TransferStatusEnum: <"The enumeration values to specify the transfer status, considering current situation in regards of its overall settlement process, which endpoint is when the transfer is effecively Settled.">
Disputed <"The transfer is disputed, for instance receivable transfer was instructed but other party has not delivered expected asset as of current date.">
Instructed <"The transfer has been instructed i.e. being processed by final system handling the effective wire, whether cash or physical">
PendingInstruction <"The transfer is pending instruction, for instance ">
Settled <"The transfer has been settled.">
Netted <"The transfer has been netted into a separate Transfer.">
Netted <"The transfer has been netted into a separate netTransfer.">
ReversalEntry <"The entry is considered technical, mostly used in regards to accounting logic per which cancellation and/or de-netting of transfer with prior status Instructed may require a reversal entry being netted with it, rather than genuine cancellation.">

enum InstructionFunctionEnum: <"The enumeration values indicating the BusinessEvent function associated input instructions.">
Execution
Expand Down Expand Up @@ -163,4 +164,4 @@ enum ValuationSourceEnum: <"Source for the valuation of the transaction by the v

enum PriceTimingEnum:
ClosingPrice <"The last price anyone paid for a share of a product during the business hours of the exchange where the product is traded on a business day.">
OpeningPrice <"The first price anyone paid for a share of a product during the business hours of the exchange where the product is traded on a business day.">
OpeningPrice <"The first price anyone paid for a share of a product during the business hours of the exchange where the product is traded on a business day.">
21 changes: 11 additions & 10 deletions rosetta-source/src/main/rosetta/event-common-func.rosetta
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func FilterCashTransfers:
output:
cashTransfers Transfer (0..*)

add cashTransfers: transfers filter quantity -> unit -> currency exists
add cashTransfers: transfers filter deliverableQuantity -> unit -> currency exists

func FilterSecurityTransfers:
inputs:
Expand Down Expand Up @@ -191,8 +191,8 @@ func InterestCashSettlementAmount: <"Defines the performance calculations releva
condition IsInterestRatePayout: <"Payout must be an InterestRatePayout.">
payout -> InterestRatePayout exists

set interestCashSettlementAmount -> quantity -> value: performance
set interestCashSettlementAmount -> quantity -> unit -> currency:
set interestCashSettlementAmount -> deliverableQuantity -> value: performance
set interestCashSettlementAmount -> deliverableQuantity -> unit -> currency:
interestRatePayout -> priceQuantity -> quantitySchedule -> unit -> currency
set interestCashSettlementAmount -> payerReceiver -> payerPartyReference:
if performance >= 0 then payer else receiver
Expand Down Expand Up @@ -321,9 +321,9 @@ func EquityCashSettlementAmount: <"Represents Part 1 Section 12 of the 2018 ISDA
equityPerformancePayout -> payerReceiver -> receiver
) -> partyReference

set equityCashSettlementAmount -> quantity -> value: <"Equity Cash Settlement Amount is defined here as Abs( Equity Performance ). Per the ISDA Definitions: Equity Performance = (Rate Of Return) Equity Notional Amount and Equity Cash Settlement Amount = ABS(Rate Of Return) Equity Notional Amount; so the calculation for Equity Cash Settlement Amount in the CDM is mathematically equivalent, with the added benefit that Rate of Return does not need to be recomputed, since it was already computed in the Reset Event.">
set equityCashSettlementAmount -> deliverableQuantity -> value: <"Equity Cash Settlement Amount is defined here as Abs( Equity Performance ). Per the ISDA Definitions: Equity Performance = (Rate Of Return) Equity Notional Amount and Equity Cash Settlement Amount = ABS(Rate Of Return) Equity Notional Amount; so the calculation for Equity Cash Settlement Amount in the CDM is mathematically equivalent, with the added benefit that Rate of Return does not need to be recomputed, since it was already computed in the Reset Event.">
Abs(equityPerformance)
set equityCashSettlementAmount -> quantity -> unit -> currency: <"Does not handle the cross currency case. Only works in the case of a single trade lot.">
set equityCashSettlementAmount -> deliverableQuantity -> unit -> currency: <"Does not handle the cross currency case. Only works in the case of a single trade lot.">
ResolveEquityInitialPrice(
tradeState -> trade -> tradeLot only-element -> priceQuantity -> price
) -> unit -> currency
Expand Down Expand Up @@ -646,6 +646,7 @@ func Create_Transfer: <"Defines how a transfer should be constructed, when repre
inputs:
instruction TransferInstruction (1..1)
tradeState TradeState (1..1) <"Represents the trade and associated state on which to construct the Transfer data type.">

output:
transfer TradeState (1..1)

Expand Down Expand Up @@ -705,7 +706,7 @@ func Create_AssetTransfer: <"Defines how Transfer that represents an exchange of
if instruction -> quantity exists
then instruction -> quantity -> unit -> financialUnit = FinancialUnitEnum -> Share

set transfer -> quantity:
set transfer -> deliverableQuantity:
NonNegativeQuantity {
value: securityQuantity -> value,
unit: securityQuantity -> unit,
Expand Down Expand Up @@ -830,10 +831,10 @@ func SecurityFinanceCashSettlementAmount:
condition IdentifiersMatch:
tradeState -> trade -> tradeLot -> priceQuantity -> observable -> Asset ->> identifier = assetPayout -> underlier ->> identifier

set cashSettlementAmount -> quantity -> value:
set cashSettlementAmount -> deliverableQuantity -> value:
securityPrice -> value * securityQuantity -> value * marginRatio

set cashSettlementAmount -> quantity -> unit -> currency:
set cashSettlementAmount -> deliverableQuantity -> unit -> currency:
securityPrice -> unit -> currency

set cashSettlementAmount -> payerReceiver -> payerPartyReference:
Expand Down Expand Up @@ -1326,9 +1327,9 @@ func ResolveSecurityFinanceBillingAmount: <"Calculates the billing amount for a
interestRatePayout -> payerReceiver -> receiver
) -> partyReference

set transfer -> quantity -> value: performance
set transfer -> deliverableQuantity -> value: performance

set transfer -> quantity -> unit -> currency:
set transfer -> deliverableQuantity -> unit -> currency:
interestRatePayout -> priceQuantity -> quantitySchedule -> unit -> currency

set transfer -> payerReceiver -> payerPartyReference:
Expand Down
30 changes: 20 additions & 10 deletions rosetta-source/src/main/rosetta/event-common-type.rosetta
Original file line number Diff line number Diff line change
Expand Up @@ -507,21 +507,31 @@ type CorporateAction: <"Specifies the relevant data regarding a corporate action
payDate date (1..1) <"The date on which resulting from the corporate action are delivered.">
underlier Underlier (1..1) <"The underlier impacted by the corporate action.">

type TransferBase:
type TransferBase: <"Describes transfer core components e.g. the amount of the asset to be transferred, the parties to the transfer and their role and settlement date, as well as optional additional features for further speciying for instance the nominal value of the quantity being transfered, and related price (example : physically settled option is being exercised, deliverableQuantity= 10 share, price= 2 USD/share with priceType AssetPrice and notionalQuantity= 20 USD, other use case: dividend payment for 0.09 div points, given 100 shares, USD ccy : deliverableQuantity= 9 USD, price= 0.09 USD/share with priceType Dividend and notionalQuantity= 100 USD ; and a lot of other ones, etc.">

identifier Identifier (0..*) <"Represents a unique reference to the transfer.">
[metadata scheme]
quantity NonNegativeQuantity (1..1) <"Represents the amount of the asset to be transferred.">
asset Asset (1..1) <"Represents the object that is subject to the transfer, it could be an asset or a reference.">

deliverableQuantity NonNegativeQuantity (1..1) <"Represents the amount of the asset to be transferred.">
notionalQuantity NonNegativeQuantity (0..*) <"Optionally represents the notional value or nominal amount of the asset to be transferred.">
price Price (0..*) <"Optionally represents the price at which the asset is transferred.">
asset Asset (1..1) <"Represents the object that is subject to the transfer.">
payerReceiver PartyReferencePayerReceiver (1..1) <"Represents the parties to the transfer and their role.">
settlementDate AdjustableOrAdjustedOrRelativeDate (1..1) <"Represents the date on which the transfer to due.">

condition QuantityUnitExists:
if asset -> Cash exists
then quantity -> unit -> currency exists
else if asset -> Commodity exists
then quantity -> unit -> capacityUnit exists
else if asset -> Instrument exists
then quantity -> unit -> financialUnit exists
condition NotionalQuantityUnitIsMoney:
if notionalQuantity exists
then notionalQuantity -> unit -> currency exists

condition CashAsset: <"It is not permitted to deliver non-cash quantity if the asset subject to tranfer is Cash ; however it is possible to deliver cash quantity in relation to another asset type (e.g. for instance when representing the transfer of cashflow in relation to given share).">
if asset -> Cash exists
then deliverableQuantity -> unit -> currency exists

condition DeliverableQuantityUnit: <"The unit of the deliverable quantity must be consistent with the kind of asset the transfer is relative to (which does not apply to cash transfer because cash quantity may be delivered in relation to other assets then cash).">
if deliverableQuantity -> unit -> capacityUnit exists
then asset -> Commodity exists
else if deliverableQuantity -> unit -> financialUnit exists
then asset -> Instrument exists

type ClearingInstruction: <"All information required to perform the clear life cycle event; the clearing party (CCP), the two parties facing each other on the alpha contract, and optionally the parties acting as clearing members.">
alphaContract TradeState (1..1) <"The contract that will be submitted to the clearing house for clearing. The contract should indicate that it should be cleared by assigning a clearing organisation as a party role.">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func Qualify_CashTransfer: <"The qualification of a cash transfer from the fact
set is_event:
businessEvent -> instruction -> primitiveInstruction -> transfer only exists
and beforeTransfers count + transferInstructions count = afterTransfers count
and transferInstructions -> transferState -> transfer -> quantity -> unit -> currency exists
and (transferInstructions -> transferState -> transfer -> deliverableQuantity -> unit -> currency exists)

func Qualify_CashAndSecurityTransfer: <"The qualification of a security settlement from the fact that (i) it is composed of a cashTransfer component and a securityTransfer component, and (ii) the cash and security move in the same direction.">
[qualification BusinessEvent]
Expand All @@ -59,8 +59,8 @@ func Qualify_CashAndSecurityTransfer: <"The qualification of a security settleme
businessEvent -> eventDate
)
set is_event:
transfersForDate -> quantity -> unit -> currency exists
and transfersForDate -> quantity -> unit -> financialUnit exists
transfersForDate -> deliverableQuantity -> unit -> currency exists
and transfersForDate -> deliverableQuantity -> unit -> financialUnit exists
and transfersForDate count = 2

func Qualify_ClearedTrade:
Expand Down Expand Up @@ -275,7 +275,7 @@ func Qualify_SecurityTransfer: <"The qualification of a security transfer from t
only-element
set is_event:
transfer -> asset -> Instrument -> Security exists
and transfer -> quantity -> unit -> financialUnit only exists
and transfer -> deliverableQuantity -> unit -> financialUnit only exists

func Qualify_SecuritySettlement: <"The qualification of a security settlement from the fact that (i) it is composed of a cashTransfer component and a securityTransfer component, and (ii) the cash and security move in opposite directions.">
[qualification BusinessEvent]
Expand All @@ -290,7 +290,7 @@ func Qualify_SecuritySettlement: <"The qualification of a security settlement fr
)
set is_event:
transfers -> asset -> Instrument -> Security exists
and transfers -> quantity -> unit -> currency only exists
and transfers -> deliverableQuantity -> unit -> currency only exists
and FilterCashTransfers(transfers) only-element -> payerReceiver -> payerPartyReference = FilterSecurityTransfers(
transfers
)
Expand Down