Skip to content

Class: TradeState

Defines the fundamental financial information that can be changed by a Primitive Event and by extension any business or life-cycle event. Each TradeState specifies where a Trade is in its life-cycle. TradeState is a root type and as such, can be created independently to any other CDM data type, but can also be used as part of the CDM Event Model.

URI: common_domain_model:TradeState

 classDiagram
    class TradeState
    click TradeState href "../TradeState/"
      TradeState : observationHistory





        TradeState --> "*" ObservationEvent : observationHistory
        click ObservationEvent href "../ObservationEvent/"



      TradeState : resetHistory





        TradeState --> "*" Reset : resetHistory
        click Reset href "../Reset/"



      TradeState : state





        TradeState --> "0..1" State : state
        click State href "../State/"



      TradeState : trade





        TradeState --> "1" Trade : trade
        click Trade href "../Trade/"



      TradeState : transferHistory





        TradeState --> "*" TransferState : transferHistory
        click TransferState href "../TransferState/"



      TradeState : valuationHistory





        TradeState --> "*" Valuation : valuationHistory
        click Valuation href "../Valuation/"



Class Properties

Property Value
Tree Root Yes

Slots

Name Cardinality and Range Description Inheritance
trade 1
Trade
Represents the Trade that has been effected by a business or life-cycle event direct
state 0..1
State
Represents the State of the Trade through its life-cycle direct
resetHistory *
Reset
Represents the updated Trade attributes which can change as the result of a r... direct
transferHistory *
TransferState
Represents the updated Trade attributes which can change as the result of a t... direct
observationHistory *
ObservationEvent
Represents the observed events related to a particular product or process, su... direct
valuationHistory *
Valuation
direct

Usages

used by used in type used
Instruction before range TradeState
BusinessEvent after range TradeState
CalculateTransferInstruction tradeState range TradeState
ClearingInstruction alphaContract range TradeState
BillingRecordInstruction tradeState range TradeState
BillingRecord tradeState range TradeState
CollateralPosition tradeReference range TradeState
CounterpartyPosition tradeReference range TradeState
PositionBase tradeReference range TradeState
Position tradeReference range TradeState

In Subsets

Comments

  • Rosetta func: QuantityIncreased
  • Rosetta func: QuantityDecreased
  • Rosetta func: QuantityDecreasedToZero
  • Rosetta func: CompareTradeStatesToAmount — For each TradeState, compare the Quantity amounts in each TradeState to the given amount (regardless of unit of amount), based on the CompareOp enum.
  • Rosetta func: InterestCashSettlementAmount — Defines the performance calculations relevant for a fixed or floating rate payout.
  • Rosetta func: ResolveReset — Defines the interface for adopters to resolve a reset, given a trade state and a date.
  • Rosetta func: EquityCashSettlementAmount — Represents Part 1 Section 12 of the 2018 ISDA CDM Equity Confirmation for Security Equity Swap, Para 72. 'Equity Cash Settlement Amount' means, in respect of an Equity Cash Settlement Date, an amount in the Settlement Currency determined by the Calculation Agent as of the Equity Valuation Date to which the Equity Cash Settlement Amount relates, pursuant to the following formula: Equity Cash Settlement Amount = ABS(Rate Of Return) * Equity Notional Amount.
  • Rosetta func: Create_StockSplit — Function specification to create the fully-formed business event which represents the impact of a stock split (or a reverse stock split) on an Equity Derivatives contract on a certain date.
  • Rosetta func: Create_Execution — Specifies the function to compose an execution based on a minimum required set of inputs: product, quantity, parties, etc.
  • Rosetta func: Create_ContractFormation — Function specification that represents an executed trade for a contractual product that has been affirmed (or confirmed) by the two parties. The formed contract can reference a legal agreement for instance a master agreement, by using the optional legalAgreement input.
  • Rosetta func: Create_Exercise — Defines the process of putting into effect the rights specified in an options contract, such as to buy or sell a security. Once exercised the option contract is terminated.
  • Rosetta func: Create_Reset — Defines how a Reset should be constructed.
  • Rosetta func: Create_Transfer — Defines how a transfer should be constructed, when representing the exchange of cash between parties.
  • Rosetta func: ResolveCashSettlementDate — A product agnostic function that resolves the settlement date of the payout for the period in question
  • Rosetta func: SecurityFinanceCashSettlementAmount
  • Rosetta func: Create_Split — Defines the logic for splitting a trade into separate copies. The split instruction contains a breakdown into N set of primitive instructions. Each set contains the primitive instructions to be applied to each post-split trade, eventually producing N trades. The split function underpins a number of business events such as clearing or allocation.
  • Rosetta func: Create_PartyChange — Defines the logic for changing one of the counterparties on a trade. A new trade identifier must be specified as a change of party results in a new trade. An ancillary party can also be specified, for instance to refer to the original executing party on the new trade.
  • Rosetta func: Create_QuantityChange — A specification of the inputs, outputs and constraints when calculating the after state of a Quantity Change Primitive Event
  • Rosetta func: Create_TermsChange — A specification of the inputs, outputs and constraints when calculating the after tradeState based Terms Change Primitive Instruction.
  • Rosetta func: FilterOpenTradeStates — Filter to only 'open' TradeState - where both the closedState and positionState are not set.
  • Rosetta func: FilterClosedTradeStates — Filter to only 'closed' TradeState - where either the closedState or positionState are set.
  • Rosetta func: Create_IndexTransitionTermsChange — Function specification to create a terms change that contains changes to the floating rate indexes and adds an adjustment spread to any existing spread.
  • Rosetta func: Create_Observation — Function specification to create an observation that incorporates an observation event into the observation history of a given trade state.
  • Rosetta func: Create_Valuation — Function specification to incorporate a new assessment of the valuation in the valuation history of a given trade state.
  • Rosetta func: UpdateSpreadAdjustmentAndRateOptions — For each of the trade state's price quantity, find a matching price quantity instruction, and call the update function.
  • Rosetta func: ResolveSecurityFinanceBillingAmount — Calculates the billing amount for a Security Finance transaction.
  • Rosetta func: Create_Return — Defines the process of partially or fully returning a Security Lending Transaction.
  • Rosetta func: ResolveRepurchaseTransferInstruction — Resolves an instruction for settlement of a Repurchase Event
  • Rosetta func: Create_RollPrimitiveInstruction — Creates the primitive instructions for a trade roll. A trade roll consists in closing an existing trade and entering into a new one which has the same characteristics as the old one, except with an extended termination date and (possibly) a different price.
  • Rosetta func: Create_OnDemandRateChangePrimitiveInstruction — Creates a full primitive instruction for an on-demand rate change event. A rate change consists in closing the original trade and opening a new one with the same details as the original one, but with a new rate (price) and effective date. The business event logic checks that there is only 1 rate price in the original trade to be updated.
  • Rosetta func: Create_CancellationPrimitiveInstruction — Creates a primitive instruction for early cancellation.
  • Rosetta func: Create_PairOffInstruction — Creates a set of instructions to pair-off a set of trades based on a pair reference. A package component is created based on that pair reference and the list of identifiers for the underlying trades. That package component is then added onto the execution details of every underlying trade. The existing trades are not terminated.
  • Rosetta func: Create_ShapingInstruction — Creates a set of instructions to shape a trade based on shaped quantities and a package ID. The original trade is closed and split into (smaller) shaped trades based on a set of trade lots containing the shaped quantities and an identifier for each shaped trade. A package component is created based on the package ID and the list of identifiers for the shaped trades. That package component is then added onto the execution details of every shaped trade.
  • Rosetta func: Create_PartialDeliveryPrimitiveInstruction — Creates the primitive instruction for partial delivery of a repo transaction at settlement.
  • Rosetta func: Create_RepricePrimitiveInstruction — Creates the primitive instructions for a repricing that alters the cash amount of the trade. Transaction value and variation margin are processed separately as are transfers of cash and securities.
  • Rosetta func: Create_AdjustmentPrimitiveInstruction — Creates the primitive instructions for a repricing that alters the collateral quantity and value of the trade. Transaction value and variation margin are processed separately as are transfers of cash and securities.
  • Rosetta func: Create_SubstitutionPrimitiveInstruction — Creates the primitive instructions for a substitution of collateral by replacing the assetpayout of the trade.
  • Rosetta func: Create_OnDemandInterestPaymentPrimitiveInstruction — An instruction to make a interium interest payment by adding a payout leg to the deal.
  • Rosetta func: Create_TerminationInstruction — Creates the relevant primitive instruction for a termination, which consists in a quantity change to bring the quantity to zero.
  • Rosetta func: Create_TradeState — Creates a single trade state by applying primitive instructions to an existing trade state (optional in case an execution instruction is included). The primitive instructions are applied in the following order: Always first: - execution, if it exists, otherwise a before state must be provided The following 3 can be executed in any order, because they touch separate components of the trade: - quantity change - terms change - party change Always last: - contract formation, otherwise the contract could be invalid.
  • Rosetta func: Create_ExposureFromTrades — Builds an Exposure structure from a list of trades.
  • Rosetta func: PayoutObligationFulfillmentFromTrade — Determines the payouts and collateral payouts in a trade and whether the obligations have been fulfilled for each of them.

Identifier and Mapping Information

Annotations

property value
metadata_key True
rosetta_functions [{"name":"QuantityIncreased","inputs":[{"name":"before","type":"TradeState","cardinality":"1..1"},{"name":"after","type":"TradeState","cardinality":"0.."}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"QuantityDecreased","inputs":[{"name":"before","type":"TradeState","cardinality":"1..1"},{"name":"after","type":"TradeState","cardinality":"0.."}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"QuantityDecreasedToZero","inputs":[{"name":"before","type":"TradeState","cardinality":"0.."},{"name":"after","type":"TradeState","cardinality":"0.."}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"CompareTradeStatesToAmount","description":"For each TradeState, compare the Quantity amounts in each TradeState to the given amount (regardless of unit of amount), based on the CompareOp enum.","inputs":[{"name":"tradeStates","type":"TradeState","cardinality":"0.."},{"name":"op","type":"CompareOp","cardinality":"1..1"},{"name":"amount","type":"number","cardinality":"1..1"}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"InterestCashSettlementAmount","description":"Defines the performance calculations relevant for a fixed or floating rate payout.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"payout","type":"Payout","cardinality":"1..1"},{"name":"resets","type":"Reset","cardinality":"1.."},{"name":"date","type":"date","cardinality":"1..1"}],"output":{"name":"interestCashSettlementAmount","type":"Transfer","cardinality":"1..1"}},{"name":"ResolveReset","description":"Defines the interface for adopters to resolve a reset, given a trade state and a date.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"date","type":"date","cardinality":"1..1"}],"output":{"name":"reset","type":"Reset","cardinality":"1..1"},"code_implementation":true},{"name":"EquityCashSettlementAmount","description":"Represents Part 1 Section 12 of the 2018 ISDA CDM Equity Confirmation for Security Equity Swap, Para 72. 'Equity Cash Settlement Amount' means, in respect of an Equity Cash Settlement Date, an amount in the Settlement Currency determined by the Calculation Agent as of the Equity Valuation Date to which the Equity Cash Settlement Amount relates, pursuant to the following formula: Equity Cash Settlement Amount = ABS(Rate Of Return) * Equity Notional Amount.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"date","type":"date","cardinality":"1..1"}],"output":{"name":"equityCashSettlementAmount","type":"Transfer","cardinality":"1..1"}},{"name":"Create_StockSplit","description":"Function specification to create the fully-formed business event which represents the impact of a stock split (or a reverse stock split) on an Equity Derivatives contract on a certain date.","inputs":[{"name":"stockSplitInstruction","type":"StockSplitInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Execution","description":"Specifies the function to compose an execution based on a minimum required set of inputs: product, quantity, parties, etc.","inputs":[{"name":"instruction","type":"ExecutionInstruction","cardinality":"1..1"}],"output":{"name":"execution","type":"TradeState","cardinality":"1..1"}},{"name":"Create_ContractFormation","description":"Function specification that represents an executed trade for a contractual product that has been affirmed (or confirmed) by the two parties. The formed contract can reference a legal agreement for instance a master agreement, by using the optional legalAgreement input.","inputs":[{"name":"instruction","type":"ContractFormationInstruction","cardinality":"1..1"},{"name":"execution","type":"TradeState","cardinality":"1..1"}],"output":{"name":"contractFormation","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Exercise","description":"Defines the process of putting into effect the rights specified in an options contract, such as to buy or sell a security. Once exercised the option contract is terminated.","inputs":[{"name":"exerciseInstruction","type":"ExerciseInstruction","cardinality":"1..1"},{"name":"originalTrade","type":"TradeState","cardinality":"1..1"}],"output":{"name":"exercise","type":"TradeState","cardinality":"1.."}},{"name":"Create_Reset","description":"Defines how a Reset should be constructed.","inputs":[{"name":"instruction","type":"ResetInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"reset","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Transfer","description":"Defines how a transfer should be constructed, when representing the exchange of cash between parties.","inputs":[{"name":"instruction","type":"TransferInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"transfer","type":"TradeState","cardinality":"1..1"}},{"name":"ResolveCashSettlementDate","description":"A product agnostic function that resolves the settlement date of the payout for the period in question","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"date","type":"date","cardinality":"1..1"},"code_implementation":true},{"name":"SecurityFinanceCashSettlementAmount","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"date","type":"date","cardinality":"1..1"},{"name":"quantity","type":"Quantity","cardinality":"0..1"},{"name":"payerReceiver","type":"PayerReceiver","cardinality":"0..1"}],"output":{"name":"cashSettlementAmount","type":"Transfer","cardinality":"1..1"}},{"name":"Create_Split","description":"Defines the logic for splitting a trade into separate copies. The split instruction contains a breakdown into N set of primitive instructions. Each set contains the primitive instructions to be applied to each post-split trade, eventually producing N trades. The split function underpins a number of business events such as clearing or allocation.","inputs":[{"name":"breakdown","type":"PrimitiveInstruction","cardinality":"1.."},{"name":"originalTrade","type":"TradeState","cardinality":"1..1"}],"output":{"name":"splitTrade","type":"TradeState","cardinality":"1.."}},{"name":"Create_PartyChange","description":"Defines the logic for changing one of the counterparties on a trade. A new trade identifier must be specified as a change of party results in a new trade. An ancillary party can also be specified, for instance to refer to the original executing party on the new trade.","inputs":[{"name":"counterparty","type":"Counterparty","cardinality":"1..1"},{"name":"ancillaryParty","type":"AncillaryParty","cardinality":"0..1"},{"name":"partyRole","type":"PartyRole","cardinality":"0..1"},{"name":"tradeId","type":"TradeIdentifier","cardinality":"1.."},{"name":"originalTrade","type":"TradeState","cardinality":"1..1"}],"output":{"name":"newTrade","type":"TradeState","cardinality":"1..1"}},{"name":"Create_QuantityChange","description":"A specification of the inputs, outputs and constraints when calculating the after state of a Quantity Change Primitive Event","inputs":[{"name":"instruction","type":"QuantityChangeInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"quantityChange","type":"TradeState","cardinality":"1..1"}},{"name":"Create_TermsChange","description":"A specification of the inputs, outputs and constraints when calculating the after tradeState based Terms Change Primitive Instruction.","inputs":[{"name":"termsChange","type":"TermsChangeInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"tradeState","type":"TradeState","cardinality":"1..1"}},{"name":"FilterOpenTradeStates","description":"Filter to only 'open' TradeState - where both the closedState and positionState are not set.","inputs":[{"name":"tradeStates","type":"TradeState","cardinality":"0.."}],"output":{"name":"openTradeStates","type":"TradeState","cardinality":"0.."}},{"name":"FilterClosedTradeStates","description":"Filter to only 'closed' TradeState - where either the closedState or positionState are set.","inputs":[{"name":"tradeStates","type":"TradeState","cardinality":"0.."}],"output":{"name":"closedTradeStates","type":"TradeState","cardinality":"0.."}},{"name":"Create_IndexTransitionTermsChange","description":"Function specification to create a terms change that contains changes to the floating rate indexes and adds an adjustment spread to any existing spread.","inputs":[{"name":"instruction","type":"IndexTransitionInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"termsChange","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Observation","description":"Function specification to create an observation that incorporates an observation event into the observation history of a given trade state.","inputs":[{"name":"instruction","type":"ObservationInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Valuation","description":"Function specification to incorporate a new assessment of the valuation in the valuation history of a given trade state.","inputs":[{"name":"instruction","type":"ValuationInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"UpdateSpreadAdjustmentAndRateOptions","description":"For each of the trade state's price quantity, find a matching price quantity instruction, and call the update function.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"instructions","type":"PriceQuantity","cardinality":"1.."}],"output":{"name":"updatedTradeState","type":"TradeState","cardinality":"1..1"}},{"name":"ResolveSecurityFinanceBillingAmount","description":"Calculates the billing amount for a Security Finance transaction.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"reset","type":"Reset","cardinality":"1..1"},{"name":"recordStartDate","type":"date","cardinality":"1..1"},{"name":"recordEndDate","type":"date","cardinality":"1..1"},{"name":"transferDate","type":"date","cardinality":"1..1"}],"output":{"name":"transfer","type":"Transfer","cardinality":"1..1"}},{"name":"Create_Return","description":"Defines the process of partially or fully returning a Security Lending Transaction.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"returnInstruction","type":"ReturnInstruction","cardinality":"1..1"},{"name":"returnDate","type":"date","cardinality":"1..1"}],"output":{"name":"returnEvent","type":"BusinessEvent","cardinality":"1..1"}},{"name":"ResolveRepurchaseTransferInstruction","description":"Resolves an instruction for settlement of a Repurchase Event","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"repurchaseDate","type":"date","cardinality":"1..1"}],"output":{"name":"repurchaseInstruction","type":"EventInstruction","cardinality":"1..1"}},{"name":"Create_RollPrimitiveInstruction","description":"Creates the primitive instructions for a trade roll. A trade roll consists in closing an existing trade and entering into a new one which has the same characteristics as the old one, except with an extended termination date and (possibly) a different price.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"effectiveRollDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"terminationDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"priceQuantity","type":"PriceQuantity","cardinality":"1.."}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_OnDemandRateChangePrimitiveInstruction","description":"Creates a full primitive instruction for an on-demand rate change event. A rate change consists in closing the original trade and opening a new one with the same details as the original one, but with a new rate (price) and effective date. The business event logic checks that there is only 1 rate price in the original trade to be updated.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"effectiveDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"agreedRate","type":"number","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_CancellationPrimitiveInstruction","description":"Creates a primitive instruction for early cancellation.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"newRepurchasePrice","type":"number","cardinality":"0..1"},{"name":"cancellationDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_PairOffInstruction","description":"Creates a set of instructions to pair-off a set of trades based on a pair reference. A package component is created based on that pair reference and the list of identifiers for the underlying trades. That package component is then added onto the execution details of every underlying trade. The existing trades are not terminated.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"2.."},{"name":"pairReference","type":"Identifier","cardinality":"1..1"}],"output":{"name":"instruction","type":"Instruction","cardinality":"1.."}},{"name":"Create_ShapingInstruction","description":"Creates a set of instructions to shape a trade based on shaped quantities and a package ID. The original trade is closed and split into (smaller) shaped trades based on a set of trade lots containing the shaped quantities and an identifier for each shaped trade. A package component is created based on the package ID and the list of identifiers for the shaped trades. That package component is then added onto the execution details of every shaped trade.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"tradeLots","type":"TradeLot","cardinality":"2.."},{"name":"shapeIdentifier","type":"Identifier","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_PartialDeliveryPrimitiveInstruction","description":"Creates the primitive instruction for partial delivery of a repo transaction at settlement.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"deliveredPriceQuantity","type":"PriceQuantity","cardinality":"1.."}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_RepricePrimitiveInstruction","description":"Creates the primitive instructions for a repricing that alters the cash amount of the trade. Transaction value and variation margin are processed separately as are transfers of cash and securities.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"newAllinPrice","type":"number","cardinality":"1..1"},{"name":"newCashValue","type":"number","cardinality":"1..1"},{"name":"effectiveRepriceDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_AdjustmentPrimitiveInstruction","description":"Creates the primitive instructions for a repricing that alters the collateral quantity and value of the trade. Transaction value and variation margin are processed separately as are transfers of cash and securities.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"newAllinPrice","type":"number","cardinality":"1..1"},{"name":"newAssetQuantity","type":"number","cardinality":"1..1"},{"name":"effectiveRepriceDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_SubstitutionPrimitiveInstruction","description":"Creates the primitive instructions for a substitution of collateral by replacing the assetpayout of the trade.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"effectiveDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"newCollateralPortfolio","type":"CollateralPortfolio","cardinality":"1..1"},{"name":"priceQuantity","type":"PriceQuantity","cardinality":"1.."}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_OnDemandInterestPaymentPrimitiveInstruction","description":"An instruction to make a interium interest payment by adding a payout leg to the deal.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"interestAmount","type":"Money","cardinality":"1..1"},{"name":"settlementDate","type":"SettlementDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_TerminationInstruction","description":"Creates the relevant primitive instruction for a termination, which consists in a quantity change to bring the quantity to zero.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_TradeState","description":"Creates a single trade state by applying primitive instructions to an existing trade state (optional in case an execution instruction is included). The primitive instructions are applied in the following order: Always first: - execution, if it exists, otherwise a before state must be provided The following 3 can be executed in any order, because they touch separate components of the trade: - quantity change - terms change - party change Always last: - contract formation, otherwise the contract could be invalid.","inputs":[{"name":"primitiveInstruction","type":"PrimitiveInstruction","cardinality":"0..1"},{"name":"before","type":"TradeState","cardinality":"0..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"Create_ExposureFromTrades","description":"Builds an Exposure structure from a list of trades.","inputs":[{"name":"trades","type":"TradeState","cardinality":"0.."}],"output":{"name":"exposure","type":"Exposure","cardinality":"0..1"}},{"name":"PayoutObligationFulfillmentFromTrade","description":"Determines the payouts and collateral payouts in a trade and whether the obligations have been fulfilled for each of them.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"0..1"}],"output":{"name":"result","type":"boolean","cardinality":"0..1"}}]

Schema Source

Mappings

Mapping Type Mapped Value
self common_domain_model:TradeState
native common_domain_model:TradeState
related gist:Transaction

LinkML Source

Direct

name: TradeState
annotations:
  metadata_key:
    tag: metadata_key
    value: true
  rosetta_functions:
    tag: rosetta_functions
    value: '[{"name":"QuantityIncreased","inputs":[{"name":"before","type":"TradeState","cardinality":"1..1"},{"name":"after","type":"TradeState","cardinality":"0..*"}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"QuantityDecreased","inputs":[{"name":"before","type":"TradeState","cardinality":"1..1"},{"name":"after","type":"TradeState","cardinality":"0..*"}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"QuantityDecreasedToZero","inputs":[{"name":"before","type":"TradeState","cardinality":"0..*"},{"name":"after","type":"TradeState","cardinality":"0..*"}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"CompareTradeStatesToAmount","description":"For
      each TradeState, compare the Quantity amounts in each TradeState to the given
      amount (regardless of unit of amount), based on the CompareOp enum.","inputs":[{"name":"tradeStates","type":"TradeState","cardinality":"0..*"},{"name":"op","type":"CompareOp","cardinality":"1..1"},{"name":"amount","type":"number","cardinality":"1..1"}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"InterestCashSettlementAmount","description":"Defines
      the performance calculations relevant for a fixed or floating rate payout.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"payout","type":"Payout","cardinality":"1..1"},{"name":"resets","type":"Reset","cardinality":"1..*"},{"name":"date","type":"date","cardinality":"1..1"}],"output":{"name":"interestCashSettlementAmount","type":"Transfer","cardinality":"1..1"}},{"name":"ResolveReset","description":"Defines
      the interface for adopters to resolve a reset, given a trade state and a date.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"date","type":"date","cardinality":"1..1"}],"output":{"name":"reset","type":"Reset","cardinality":"1..1"},"code_implementation":true},{"name":"EquityCashSettlementAmount","description":"Represents
      Part 1 Section 12 of the 2018 ISDA CDM Equity Confirmation for Security Equity
      Swap, Para 72. ''Equity Cash Settlement Amount'' means, in respect of an Equity
      Cash Settlement Date, an amount in the Settlement Currency determined by the
      Calculation Agent as of the Equity Valuation Date to which the Equity Cash Settlement
      Amount relates, pursuant to the following formula: Equity Cash Settlement Amount
      = ABS(Rate Of Return) * Equity Notional Amount.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"date","type":"date","cardinality":"1..1"}],"output":{"name":"equityCashSettlementAmount","type":"Transfer","cardinality":"1..1"}},{"name":"Create_StockSplit","description":"Function
      specification to create the fully-formed business event which represents the
      impact of a stock split (or a reverse stock split) on an Equity Derivatives
      contract on a certain date.","inputs":[{"name":"stockSplitInstruction","type":"StockSplitInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Execution","description":"Specifies
      the function to compose an execution based on a minimum required set of inputs:
      product, quantity, parties, etc.","inputs":[{"name":"instruction","type":"ExecutionInstruction","cardinality":"1..1"}],"output":{"name":"execution","type":"TradeState","cardinality":"1..1"}},{"name":"Create_ContractFormation","description":"Function
      specification that represents an executed trade for a contractual product that
      has been affirmed (or confirmed) by the two parties. The formed contract can
      reference a legal agreement for instance a master agreement, by using the optional
      legalAgreement input.","inputs":[{"name":"instruction","type":"ContractFormationInstruction","cardinality":"1..1"},{"name":"execution","type":"TradeState","cardinality":"1..1"}],"output":{"name":"contractFormation","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Exercise","description":"Defines
      the process of putting into effect the rights specified in an options contract,
      such as to buy or sell a security.  Once exercised the option contract is terminated.","inputs":[{"name":"exerciseInstruction","type":"ExerciseInstruction","cardinality":"1..1"},{"name":"originalTrade","type":"TradeState","cardinality":"1..1"}],"output":{"name":"exercise","type":"TradeState","cardinality":"1..*"}},{"name":"Create_Reset","description":"Defines
      how a Reset should be constructed.","inputs":[{"name":"instruction","type":"ResetInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"reset","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Transfer","description":"Defines
      how a transfer should be constructed, when representing the exchange of cash
      between parties.","inputs":[{"name":"instruction","type":"TransferInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"transfer","type":"TradeState","cardinality":"1..1"}},{"name":"ResolveCashSettlementDate","description":"A
      product agnostic function that resolves the settlement date of the payout for
      the period in question","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"date","type":"date","cardinality":"1..1"},"code_implementation":true},{"name":"SecurityFinanceCashSettlementAmount","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"date","type":"date","cardinality":"1..1"},{"name":"quantity","type":"Quantity","cardinality":"0..1"},{"name":"payerReceiver","type":"PayerReceiver","cardinality":"0..1"}],"output":{"name":"cashSettlementAmount","type":"Transfer","cardinality":"1..1"}},{"name":"Create_Split","description":"Defines
      the logic for splitting a trade into separate copies. The split instruction
      contains a breakdown into N set of primitive instructions. Each set contains
      the primitive instructions to be applied to each post-split trade, eventually
      producing N trades. The split function underpins a number of business events
      such as clearing or allocation.","inputs":[{"name":"breakdown","type":"PrimitiveInstruction","cardinality":"1..*"},{"name":"originalTrade","type":"TradeState","cardinality":"1..1"}],"output":{"name":"splitTrade","type":"TradeState","cardinality":"1..*"}},{"name":"Create_PartyChange","description":"Defines
      the logic for changing one of the counterparties on a trade. A new trade identifier
      must be specified as a change of party results in a new trade. An ancillary
      party can also be specified, for instance to refer to the original executing
      party on the new trade.","inputs":[{"name":"counterparty","type":"Counterparty","cardinality":"1..1"},{"name":"ancillaryParty","type":"AncillaryParty","cardinality":"0..1"},{"name":"partyRole","type":"PartyRole","cardinality":"0..1"},{"name":"tradeId","type":"TradeIdentifier","cardinality":"1..*"},{"name":"originalTrade","type":"TradeState","cardinality":"1..1"}],"output":{"name":"newTrade","type":"TradeState","cardinality":"1..1"}},{"name":"Create_QuantityChange","description":"A
      specification of the inputs, outputs and constraints when calculating the after
      state of a Quantity Change Primitive Event","inputs":[{"name":"instruction","type":"QuantityChangeInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"quantityChange","type":"TradeState","cardinality":"1..1"}},{"name":"Create_TermsChange","description":"A
      specification of the inputs, outputs and constraints when calculating the after
      tradeState based Terms Change Primitive Instruction.","inputs":[{"name":"termsChange","type":"TermsChangeInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"tradeState","type":"TradeState","cardinality":"1..1"}},{"name":"FilterOpenTradeStates","description":"Filter
      to only ''open'' TradeState - where both the closedState and positionState are
      not set.","inputs":[{"name":"tradeStates","type":"TradeState","cardinality":"0..*"}],"output":{"name":"openTradeStates","type":"TradeState","cardinality":"0..*"}},{"name":"FilterClosedTradeStates","description":"Filter
      to only ''closed'' TradeState - where either the closedState or positionState
      are set.","inputs":[{"name":"tradeStates","type":"TradeState","cardinality":"0..*"}],"output":{"name":"closedTradeStates","type":"TradeState","cardinality":"0..*"}},{"name":"Create_IndexTransitionTermsChange","description":"Function
      specification to create a terms change that contains changes to the floating
      rate indexes and adds an adjustment spread to any existing spread.","inputs":[{"name":"instruction","type":"IndexTransitionInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"termsChange","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Observation","description":"Function
      specification to create an observation that incorporates an observation event
      into the observation history of a given trade state.","inputs":[{"name":"instruction","type":"ObservationInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Valuation","description":"Function
      specification to incorporate a new assessment of the valuation in the valuation
      history of a given trade state.","inputs":[{"name":"instruction","type":"ValuationInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"UpdateSpreadAdjustmentAndRateOptions","description":"For
      each of the trade state''s price quantity, find a matching price quantity instruction,
      and call the update function.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"instructions","type":"PriceQuantity","cardinality":"1..*"}],"output":{"name":"updatedTradeState","type":"TradeState","cardinality":"1..1"}},{"name":"ResolveSecurityFinanceBillingAmount","description":"Calculates
      the billing amount for a Security Finance transaction.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"reset","type":"Reset","cardinality":"1..1"},{"name":"recordStartDate","type":"date","cardinality":"1..1"},{"name":"recordEndDate","type":"date","cardinality":"1..1"},{"name":"transferDate","type":"date","cardinality":"1..1"}],"output":{"name":"transfer","type":"Transfer","cardinality":"1..1"}},{"name":"Create_Return","description":"Defines
      the process of partially or fully returning a Security Lending Transaction.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"returnInstruction","type":"ReturnInstruction","cardinality":"1..1"},{"name":"returnDate","type":"date","cardinality":"1..1"}],"output":{"name":"returnEvent","type":"BusinessEvent","cardinality":"1..1"}},{"name":"ResolveRepurchaseTransferInstruction","description":"Resolves
      an instruction for settlement of a Repurchase Event","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"repurchaseDate","type":"date","cardinality":"1..1"}],"output":{"name":"repurchaseInstruction","type":"EventInstruction","cardinality":"1..1"}},{"name":"Create_RollPrimitiveInstruction","description":"Creates
      the primitive instructions for a trade roll. A trade roll consists in closing
      an existing trade and entering into a new one which has the same characteristics
      as the old one, except with an extended termination date and (possibly) a different
      price.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"effectiveRollDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"terminationDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"priceQuantity","type":"PriceQuantity","cardinality":"1..*"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_OnDemandRateChangePrimitiveInstruction","description":"Creates
      a full primitive instruction for an on-demand rate change event. A rate change
      consists in closing the original trade and opening a new one with the same details
      as the original one, but with a new rate (price) and effective date. The business
      event logic checks that there is only 1 rate price in the original trade to
      be updated.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"effectiveDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"agreedRate","type":"number","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_CancellationPrimitiveInstruction","description":"Creates
      a primitive instruction for early cancellation.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"newRepurchasePrice","type":"number","cardinality":"0..1"},{"name":"cancellationDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_PairOffInstruction","description":"Creates
      a set of instructions to pair-off a set of trades based on a pair reference.
      A package component is created based on that pair reference and the list of
      identifiers for the underlying trades. That package component is then added
      onto the execution details of every underlying trade. The existing trades are
      not terminated.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"2..*"},{"name":"pairReference","type":"Identifier","cardinality":"1..1"}],"output":{"name":"instruction","type":"Instruction","cardinality":"1..*"}},{"name":"Create_ShapingInstruction","description":"Creates
      a set of instructions to shape a trade based on shaped quantities and a package
      ID. The original trade is closed and split into (smaller) shaped trades based
      on a set of trade lots containing the shaped quantities and an identifier for
      each shaped trade. A package component is created based on the package ID and
      the list of identifiers for the shaped trades. That package component is then
      added onto the execution details of every shaped trade.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"tradeLots","type":"TradeLot","cardinality":"2..*"},{"name":"shapeIdentifier","type":"Identifier","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_PartialDeliveryPrimitiveInstruction","description":"Creates
      the primitive instruction for partial delivery of a repo transaction at settlement.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"deliveredPriceQuantity","type":"PriceQuantity","cardinality":"1..*"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_RepricePrimitiveInstruction","description":"Creates
      the primitive instructions for a repricing that alters the cash amount of the
      trade. Transaction value and variation margin are processed separately as are
      transfers of cash and securities.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"newAllinPrice","type":"number","cardinality":"1..1"},{"name":"newCashValue","type":"number","cardinality":"1..1"},{"name":"effectiveRepriceDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_AdjustmentPrimitiveInstruction","description":"Creates
      the primitive instructions for a repricing that alters the collateral quantity
      and value of the trade. Transaction value and variation margin are processed
      separately as are transfers of cash and securities.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"newAllinPrice","type":"number","cardinality":"1..1"},{"name":"newAssetQuantity","type":"number","cardinality":"1..1"},{"name":"effectiveRepriceDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_SubstitutionPrimitiveInstruction","description":"Creates
      the primitive instructions for a substitution of collateral by replacing the
      assetpayout of the trade.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"effectiveDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"newCollateralPortfolio","type":"CollateralPortfolio","cardinality":"1..1"},{"name":"priceQuantity","type":"PriceQuantity","cardinality":"1..*"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_OnDemandInterestPaymentPrimitiveInstruction","description":"An
      instruction to make a interium interest payment by adding a payout leg to the
      deal.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"interestAmount","type":"Money","cardinality":"1..1"},{"name":"settlementDate","type":"SettlementDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_TerminationInstruction","description":"Creates
      the relevant primitive instruction for a termination, which consists in a quantity
      change to bring the quantity to zero.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_TradeState","description":"Creates
      a single trade state by applying primitive instructions to an existing trade
      state (optional in case an execution instruction is included). The primitive
      instructions are applied in the following order: Always first: - execution,
      if it exists, otherwise a before state must be provided The following 3 can
      be executed in any order, because they touch separate components of the trade:
      - quantity change - terms change - party change Always last: - contract formation,
      otherwise the contract could be invalid.","inputs":[{"name":"primitiveInstruction","type":"PrimitiveInstruction","cardinality":"0..1"},{"name":"before","type":"TradeState","cardinality":"0..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"Create_ExposureFromTrades","description":"Builds
      an Exposure structure from a list of trades.","inputs":[{"name":"trades","type":"TradeState","cardinality":"0..*"}],"output":{"name":"exposure","type":"Exposure","cardinality":"0..1"}},{"name":"PayoutObligationFulfillmentFromTrade","description":"Determines
      the payouts and collateral payouts in a trade and whether the obligations have
      been fulfilled for each of them.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"0..1"}],"output":{"name":"result","type":"boolean","cardinality":"0..1"}}]'
description: Defines the fundamental financial information that can be changed by
  a Primitive Event and by extension any business or life-cycle event. Each TradeState
  specifies where a Trade is in its life-cycle. TradeState is a root type and as such,
  can be created independently to any other CDM data type, but can also be used as
  part of the CDM Event Model.
comments:
- 'Rosetta func: QuantityIncreased'
- 'Rosetta func: QuantityDecreased'
- 'Rosetta func: QuantityDecreasedToZero'
- 'Rosetta func: CompareTradeStatesToAmount  For each TradeState, compare the Quantity
  amounts in each TradeState to the given amount (regardless of unit of amount), based
  on the CompareOp enum.'
- 'Rosetta func: InterestCashSettlementAmount  Defines the performance calculations
  relevant for a fixed or floating rate payout.'
- 'Rosetta func: ResolveReset  Defines the interface for adopters to resolve a reset,
  given a trade state and a date.'
- 'Rosetta func: EquityCashSettlementAmount  Represents Part 1 Section 12 of the
  2018 ISDA CDM Equity Confirmation for Security Equity Swap, Para 72. ''Equity Cash
  Settlement Amount'' means, in respect of an Equity Cash Settlement Date, an amount
  in the Settlement Currency determined by the Calculation Agent as of the Equity
  Valuation Date to which the Equity Cash Settlement Amount relates, pursuant to the
  following formula: Equity Cash Settlement Amount = ABS(Rate Of Return) * Equity
  Notional Amount.'
- 'Rosetta func: Create_StockSplit  Function specification to create the fully-formed
  business event which represents the impact of a stock split (or a reverse stock
  split) on an Equity Derivatives contract on a certain date.'
- 'Rosetta func: Create_Execution  Specifies the function to compose an execution
  based on a minimum required set of inputs: product, quantity, parties, etc.'
- 'Rosetta func: Create_ContractFormation  Function specification that represents
  an executed trade for a contractual product that has been affirmed (or confirmed)
  by the two parties. The formed contract can reference a legal agreement for instance
  a master agreement, by using the optional legalAgreement input.'
- 'Rosetta func: Create_Exercise  Defines the process of putting into effect the
  rights specified in an options contract, such as to buy or sell a security.  Once
  exercised the option contract is terminated.'
- 'Rosetta func: Create_Reset  Defines how a Reset should be constructed.'
- 'Rosetta func: Create_Transfer  Defines how a transfer should be constructed, when
  representing the exchange of cash between parties.'
- 'Rosetta func: ResolveCashSettlementDate  A product agnostic function that resolves
  the settlement date of the payout for the period in question'
- 'Rosetta func: SecurityFinanceCashSettlementAmount'
- 'Rosetta func: Create_Split  Defines the logic for splitting a trade into separate
  copies. The split instruction contains a breakdown into N set of primitive instructions.
  Each set contains the primitive instructions to be applied to each post-split trade,
  eventually producing N trades. The split function underpins a number of business
  events such as clearing or allocation.'
- 'Rosetta func: Create_PartyChange  Defines the logic for changing one of the counterparties
  on a trade. A new trade identifier must be specified as a change of party results
  in a new trade. An ancillary party can also be specified, for instance to refer
  to the original executing party on the new trade.'
- 'Rosetta func: Create_QuantityChange  A specification of the inputs, outputs and
  constraints when calculating the after state of a Quantity Change Primitive Event'
- 'Rosetta func: Create_TermsChange  A specification of the inputs, outputs and constraints
  when calculating the after tradeState based Terms Change Primitive Instruction.'
- 'Rosetta func: FilterOpenTradeStates  Filter to only ''open'' TradeState - where
  both the closedState and positionState are not set.'
- 'Rosetta func: FilterClosedTradeStates  Filter to only ''closed'' TradeState -
  where either the closedState or positionState are set.'
- 'Rosetta func: Create_IndexTransitionTermsChange  Function specification to create
  a terms change that contains changes to the floating rate indexes and adds an adjustment
  spread to any existing spread.'
- 'Rosetta func: Create_Observation  Function specification to create an observation
  that incorporates an observation event into the observation history of a given trade
  state.'
- 'Rosetta func: Create_Valuation  Function specification to incorporate a new assessment
  of the valuation in the valuation history of a given trade state.'
- 'Rosetta func: UpdateSpreadAdjustmentAndRateOptions  For each of the trade state''s
  price quantity, find a matching price quantity instruction, and call the update
  function.'
- 'Rosetta func: ResolveSecurityFinanceBillingAmount  Calculates the billing amount
  for a Security Finance transaction.'
- 'Rosetta func: Create_Return  Defines the process of partially or fully returning
  a Security Lending Transaction.'
- 'Rosetta func: ResolveRepurchaseTransferInstruction  Resolves an instruction for
  settlement of a Repurchase Event'
- 'Rosetta func: Create_RollPrimitiveInstruction  Creates the primitive instructions
  for a trade roll. A trade roll consists in closing an existing trade and entering
  into a new one which has the same characteristics as the old one, except with an
  extended termination date and (possibly) a different price.'
- 'Rosetta func: Create_OnDemandRateChangePrimitiveInstruction  Creates a full primitive
  instruction for an on-demand rate change event. A rate change consists in closing
  the original trade and opening a new one with the same details as the original one,
  but with a new rate (price) and effective date. The business event logic checks
  that there is only 1 rate price in the original trade to be updated.'
- 'Rosetta func: Create_CancellationPrimitiveInstruction  Creates a primitive instruction
  for early cancellation.'
- 'Rosetta func: Create_PairOffInstruction  Creates a set of instructions to pair-off
  a set of trades based on a pair reference. A package component is created based
  on that pair reference and the list of identifiers for the underlying trades. That
  package component is then added onto the execution details of every underlying trade.
  The existing trades are not terminated.'
- 'Rosetta func: Create_ShapingInstruction  Creates a set of instructions to shape
  a trade based on shaped quantities and a package ID. The original trade is closed
  and split into (smaller) shaped trades based on a set of trade lots containing the
  shaped quantities and an identifier for each shaped trade. A package component is
  created based on the package ID and the list of identifiers for the shaped trades.
  That package component is then added onto the execution details of every shaped
  trade.'
- 'Rosetta func: Create_PartialDeliveryPrimitiveInstruction  Creates the primitive
  instruction for partial delivery of a repo transaction at settlement.'
- 'Rosetta func: Create_RepricePrimitiveInstruction  Creates the primitive instructions
  for a repricing that alters the cash amount of the trade. Transaction value and
  variation margin are processed separately as are transfers of cash and securities.'
- 'Rosetta func: Create_AdjustmentPrimitiveInstruction  Creates the primitive instructions
  for a repricing that alters the collateral quantity and value of the trade. Transaction
  value and variation margin are processed separately as are transfers of cash and
  securities.'
- 'Rosetta func: Create_SubstitutionPrimitiveInstruction  Creates the primitive instructions
  for a substitution of collateral by replacing the assetpayout of the trade.'
- 'Rosetta func: Create_OnDemandInterestPaymentPrimitiveInstruction  An instruction
  to make a interium interest payment by adding a payout leg to the deal.'
- 'Rosetta func: Create_TerminationInstruction  Creates the relevant primitive instruction
  for a termination, which consists in a quantity change to bring the quantity to
  zero.'
- 'Rosetta func: Create_TradeState  Creates a single trade state by applying primitive
  instructions to an existing trade state (optional in case an execution instruction
  is included). The primitive instructions are applied in the following order: Always
  first: - execution, if it exists, otherwise a before state must be provided The
  following 3 can be executed in any order, because they touch separate components
  of the trade: - quantity change - terms change - party change Always last: - contract
  formation, otherwise the contract could be invalid.'
- 'Rosetta func: Create_ExposureFromTrades  Builds an Exposure structure from a list
  of trades.'
- 'Rosetta func: PayoutObligationFulfillmentFromTrade  Determines the payouts and
  collateral payouts in a trade and whether the obligations have been fulfilled for
  each of them.'
in_subset:
- cdm_event_common
from_schema: https://w3id.org/lmodel/common-domain-model
related_mappings:
- gist:Transaction
slots:
- trade
- state
- resetHistory
- transferHistory
- observationHistory
- valuationHistory
slot_usage:
  state:
    name: state
    description: Represents the State of the Trade through its life-cycle.
    range: State
tree_root: true

Induced

name: TradeState
annotations:
  metadata_key:
    tag: metadata_key
    value: true
  rosetta_functions:
    tag: rosetta_functions
    value: '[{"name":"QuantityIncreased","inputs":[{"name":"before","type":"TradeState","cardinality":"1..1"},{"name":"after","type":"TradeState","cardinality":"0..*"}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"QuantityDecreased","inputs":[{"name":"before","type":"TradeState","cardinality":"1..1"},{"name":"after","type":"TradeState","cardinality":"0..*"}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"QuantityDecreasedToZero","inputs":[{"name":"before","type":"TradeState","cardinality":"0..*"},{"name":"after","type":"TradeState","cardinality":"0..*"}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"CompareTradeStatesToAmount","description":"For
      each TradeState, compare the Quantity amounts in each TradeState to the given
      amount (regardless of unit of amount), based on the CompareOp enum.","inputs":[{"name":"tradeStates","type":"TradeState","cardinality":"0..*"},{"name":"op","type":"CompareOp","cardinality":"1..1"},{"name":"amount","type":"number","cardinality":"1..1"}],"output":{"name":"result","type":"boolean","cardinality":"1..1"}},{"name":"InterestCashSettlementAmount","description":"Defines
      the performance calculations relevant for a fixed or floating rate payout.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"payout","type":"Payout","cardinality":"1..1"},{"name":"resets","type":"Reset","cardinality":"1..*"},{"name":"date","type":"date","cardinality":"1..1"}],"output":{"name":"interestCashSettlementAmount","type":"Transfer","cardinality":"1..1"}},{"name":"ResolveReset","description":"Defines
      the interface for adopters to resolve a reset, given a trade state and a date.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"date","type":"date","cardinality":"1..1"}],"output":{"name":"reset","type":"Reset","cardinality":"1..1"},"code_implementation":true},{"name":"EquityCashSettlementAmount","description":"Represents
      Part 1 Section 12 of the 2018 ISDA CDM Equity Confirmation for Security Equity
      Swap, Para 72. ''Equity Cash Settlement Amount'' means, in respect of an Equity
      Cash Settlement Date, an amount in the Settlement Currency determined by the
      Calculation Agent as of the Equity Valuation Date to which the Equity Cash Settlement
      Amount relates, pursuant to the following formula: Equity Cash Settlement Amount
      = ABS(Rate Of Return) * Equity Notional Amount.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"date","type":"date","cardinality":"1..1"}],"output":{"name":"equityCashSettlementAmount","type":"Transfer","cardinality":"1..1"}},{"name":"Create_StockSplit","description":"Function
      specification to create the fully-formed business event which represents the
      impact of a stock split (or a reverse stock split) on an Equity Derivatives
      contract on a certain date.","inputs":[{"name":"stockSplitInstruction","type":"StockSplitInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Execution","description":"Specifies
      the function to compose an execution based on a minimum required set of inputs:
      product, quantity, parties, etc.","inputs":[{"name":"instruction","type":"ExecutionInstruction","cardinality":"1..1"}],"output":{"name":"execution","type":"TradeState","cardinality":"1..1"}},{"name":"Create_ContractFormation","description":"Function
      specification that represents an executed trade for a contractual product that
      has been affirmed (or confirmed) by the two parties. The formed contract can
      reference a legal agreement for instance a master agreement, by using the optional
      legalAgreement input.","inputs":[{"name":"instruction","type":"ContractFormationInstruction","cardinality":"1..1"},{"name":"execution","type":"TradeState","cardinality":"1..1"}],"output":{"name":"contractFormation","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Exercise","description":"Defines
      the process of putting into effect the rights specified in an options contract,
      such as to buy or sell a security.  Once exercised the option contract is terminated.","inputs":[{"name":"exerciseInstruction","type":"ExerciseInstruction","cardinality":"1..1"},{"name":"originalTrade","type":"TradeState","cardinality":"1..1"}],"output":{"name":"exercise","type":"TradeState","cardinality":"1..*"}},{"name":"Create_Reset","description":"Defines
      how a Reset should be constructed.","inputs":[{"name":"instruction","type":"ResetInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"reset","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Transfer","description":"Defines
      how a transfer should be constructed, when representing the exchange of cash
      between parties.","inputs":[{"name":"instruction","type":"TransferInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"transfer","type":"TradeState","cardinality":"1..1"}},{"name":"ResolveCashSettlementDate","description":"A
      product agnostic function that resolves the settlement date of the payout for
      the period in question","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"date","type":"date","cardinality":"1..1"},"code_implementation":true},{"name":"SecurityFinanceCashSettlementAmount","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"date","type":"date","cardinality":"1..1"},{"name":"quantity","type":"Quantity","cardinality":"0..1"},{"name":"payerReceiver","type":"PayerReceiver","cardinality":"0..1"}],"output":{"name":"cashSettlementAmount","type":"Transfer","cardinality":"1..1"}},{"name":"Create_Split","description":"Defines
      the logic for splitting a trade into separate copies. The split instruction
      contains a breakdown into N set of primitive instructions. Each set contains
      the primitive instructions to be applied to each post-split trade, eventually
      producing N trades. The split function underpins a number of business events
      such as clearing or allocation.","inputs":[{"name":"breakdown","type":"PrimitiveInstruction","cardinality":"1..*"},{"name":"originalTrade","type":"TradeState","cardinality":"1..1"}],"output":{"name":"splitTrade","type":"TradeState","cardinality":"1..*"}},{"name":"Create_PartyChange","description":"Defines
      the logic for changing one of the counterparties on a trade. A new trade identifier
      must be specified as a change of party results in a new trade. An ancillary
      party can also be specified, for instance to refer to the original executing
      party on the new trade.","inputs":[{"name":"counterparty","type":"Counterparty","cardinality":"1..1"},{"name":"ancillaryParty","type":"AncillaryParty","cardinality":"0..1"},{"name":"partyRole","type":"PartyRole","cardinality":"0..1"},{"name":"tradeId","type":"TradeIdentifier","cardinality":"1..*"},{"name":"originalTrade","type":"TradeState","cardinality":"1..1"}],"output":{"name":"newTrade","type":"TradeState","cardinality":"1..1"}},{"name":"Create_QuantityChange","description":"A
      specification of the inputs, outputs and constraints when calculating the after
      state of a Quantity Change Primitive Event","inputs":[{"name":"instruction","type":"QuantityChangeInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"quantityChange","type":"TradeState","cardinality":"1..1"}},{"name":"Create_TermsChange","description":"A
      specification of the inputs, outputs and constraints when calculating the after
      tradeState based Terms Change Primitive Instruction.","inputs":[{"name":"termsChange","type":"TermsChangeInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"tradeState","type":"TradeState","cardinality":"1..1"}},{"name":"FilterOpenTradeStates","description":"Filter
      to only ''open'' TradeState - where both the closedState and positionState are
      not set.","inputs":[{"name":"tradeStates","type":"TradeState","cardinality":"0..*"}],"output":{"name":"openTradeStates","type":"TradeState","cardinality":"0..*"}},{"name":"FilterClosedTradeStates","description":"Filter
      to only ''closed'' TradeState - where either the closedState or positionState
      are set.","inputs":[{"name":"tradeStates","type":"TradeState","cardinality":"0..*"}],"output":{"name":"closedTradeStates","type":"TradeState","cardinality":"0..*"}},{"name":"Create_IndexTransitionTermsChange","description":"Function
      specification to create a terms change that contains changes to the floating
      rate indexes and adds an adjustment spread to any existing spread.","inputs":[{"name":"instruction","type":"IndexTransitionInstruction","cardinality":"1..1"},{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"termsChange","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Observation","description":"Function
      specification to create an observation that incorporates an observation event
      into the observation history of a given trade state.","inputs":[{"name":"instruction","type":"ObservationInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"Create_Valuation","description":"Function
      specification to incorporate a new assessment of the valuation in the valuation
      history of a given trade state.","inputs":[{"name":"instruction","type":"ValuationInstruction","cardinality":"1..1"},{"name":"before","type":"TradeState","cardinality":"1..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"UpdateSpreadAdjustmentAndRateOptions","description":"For
      each of the trade state''s price quantity, find a matching price quantity instruction,
      and call the update function.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"instructions","type":"PriceQuantity","cardinality":"1..*"}],"output":{"name":"updatedTradeState","type":"TradeState","cardinality":"1..1"}},{"name":"ResolveSecurityFinanceBillingAmount","description":"Calculates
      the billing amount for a Security Finance transaction.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"reset","type":"Reset","cardinality":"1..1"},{"name":"recordStartDate","type":"date","cardinality":"1..1"},{"name":"recordEndDate","type":"date","cardinality":"1..1"},{"name":"transferDate","type":"date","cardinality":"1..1"}],"output":{"name":"transfer","type":"Transfer","cardinality":"1..1"}},{"name":"Create_Return","description":"Defines
      the process of partially or fully returning a Security Lending Transaction.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"returnInstruction","type":"ReturnInstruction","cardinality":"1..1"},{"name":"returnDate","type":"date","cardinality":"1..1"}],"output":{"name":"returnEvent","type":"BusinessEvent","cardinality":"1..1"}},{"name":"ResolveRepurchaseTransferInstruction","description":"Resolves
      an instruction for settlement of a Repurchase Event","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"repurchaseDate","type":"date","cardinality":"1..1"}],"output":{"name":"repurchaseInstruction","type":"EventInstruction","cardinality":"1..1"}},{"name":"Create_RollPrimitiveInstruction","description":"Creates
      the primitive instructions for a trade roll. A trade roll consists in closing
      an existing trade and entering into a new one which has the same characteristics
      as the old one, except with an extended termination date and (possibly) a different
      price.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"effectiveRollDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"terminationDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"priceQuantity","type":"PriceQuantity","cardinality":"1..*"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_OnDemandRateChangePrimitiveInstruction","description":"Creates
      a full primitive instruction for an on-demand rate change event. A rate change
      consists in closing the original trade and opening a new one with the same details
      as the original one, but with a new rate (price) and effective date. The business
      event logic checks that there is only 1 rate price in the original trade to
      be updated.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"effectiveDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"agreedRate","type":"number","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_CancellationPrimitiveInstruction","description":"Creates
      a primitive instruction for early cancellation.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"newRepurchasePrice","type":"number","cardinality":"0..1"},{"name":"cancellationDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_PairOffInstruction","description":"Creates
      a set of instructions to pair-off a set of trades based on a pair reference.
      A package component is created based on that pair reference and the list of
      identifiers for the underlying trades. That package component is then added
      onto the execution details of every underlying trade. The existing trades are
      not terminated.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"2..*"},{"name":"pairReference","type":"Identifier","cardinality":"1..1"}],"output":{"name":"instruction","type":"Instruction","cardinality":"1..*"}},{"name":"Create_ShapingInstruction","description":"Creates
      a set of instructions to shape a trade based on shaped quantities and a package
      ID. The original trade is closed and split into (smaller) shaped trades based
      on a set of trade lots containing the shaped quantities and an identifier for
      each shaped trade. A package component is created based on the package ID and
      the list of identifiers for the shaped trades. That package component is then
      added onto the execution details of every shaped trade.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"tradeLots","type":"TradeLot","cardinality":"2..*"},{"name":"shapeIdentifier","type":"Identifier","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_PartialDeliveryPrimitiveInstruction","description":"Creates
      the primitive instruction for partial delivery of a repo transaction at settlement.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"deliveredPriceQuantity","type":"PriceQuantity","cardinality":"1..*"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_RepricePrimitiveInstruction","description":"Creates
      the primitive instructions for a repricing that alters the cash amount of the
      trade. Transaction value and variation margin are processed separately as are
      transfers of cash and securities.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"newAllinPrice","type":"number","cardinality":"1..1"},{"name":"newCashValue","type":"number","cardinality":"1..1"},{"name":"effectiveRepriceDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_AdjustmentPrimitiveInstruction","description":"Creates
      the primitive instructions for a repricing that alters the collateral quantity
      and value of the trade. Transaction value and variation margin are processed
      separately as are transfers of cash and securities.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"newAllinPrice","type":"number","cardinality":"1..1"},{"name":"newAssetQuantity","type":"number","cardinality":"1..1"},{"name":"effectiveRepriceDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_SubstitutionPrimitiveInstruction","description":"Creates
      the primitive instructions for a substitution of collateral by replacing the
      assetpayout of the trade.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"effectiveDate","type":"AdjustableOrRelativeDate","cardinality":"1..1"},{"name":"newCollateralPortfolio","type":"CollateralPortfolio","cardinality":"1..1"},{"name":"priceQuantity","type":"PriceQuantity","cardinality":"1..*"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_OnDemandInterestPaymentPrimitiveInstruction","description":"An
      instruction to make a interium interest payment by adding a payout leg to the
      deal.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"},{"name":"interestAmount","type":"Money","cardinality":"1..1"},{"name":"settlementDate","type":"SettlementDate","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_TerminationInstruction","description":"Creates
      the relevant primitive instruction for a termination, which consists in a quantity
      change to bring the quantity to zero.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"1..1"}],"output":{"name":"instruction","type":"PrimitiveInstruction","cardinality":"1..1"}},{"name":"Create_TradeState","description":"Creates
      a single trade state by applying primitive instructions to an existing trade
      state (optional in case an execution instruction is included). The primitive
      instructions are applied in the following order: Always first: - execution,
      if it exists, otherwise a before state must be provided The following 3 can
      be executed in any order, because they touch separate components of the trade:
      - quantity change - terms change - party change Always last: - contract formation,
      otherwise the contract could be invalid.","inputs":[{"name":"primitiveInstruction","type":"PrimitiveInstruction","cardinality":"0..1"},{"name":"before","type":"TradeState","cardinality":"0..1"}],"output":{"name":"after","type":"TradeState","cardinality":"1..1"}},{"name":"Create_ExposureFromTrades","description":"Builds
      an Exposure structure from a list of trades.","inputs":[{"name":"trades","type":"TradeState","cardinality":"0..*"}],"output":{"name":"exposure","type":"Exposure","cardinality":"0..1"}},{"name":"PayoutObligationFulfillmentFromTrade","description":"Determines
      the payouts and collateral payouts in a trade and whether the obligations have
      been fulfilled for each of them.","inputs":[{"name":"tradeState","type":"TradeState","cardinality":"0..1"}],"output":{"name":"result","type":"boolean","cardinality":"0..1"}}]'
description: Defines the fundamental financial information that can be changed by
  a Primitive Event and by extension any business or life-cycle event. Each TradeState
  specifies where a Trade is in its life-cycle. TradeState is a root type and as such,
  can be created independently to any other CDM data type, but can also be used as
  part of the CDM Event Model.
comments:
- 'Rosetta func: QuantityIncreased'
- 'Rosetta func: QuantityDecreased'
- 'Rosetta func: QuantityDecreasedToZero'
- 'Rosetta func: CompareTradeStatesToAmount  For each TradeState, compare the Quantity
  amounts in each TradeState to the given amount (regardless of unit of amount), based
  on the CompareOp enum.'
- 'Rosetta func: InterestCashSettlementAmount  Defines the performance calculations
  relevant for a fixed or floating rate payout.'
- 'Rosetta func: ResolveReset  Defines the interface for adopters to resolve a reset,
  given a trade state and a date.'
- 'Rosetta func: EquityCashSettlementAmount  Represents Part 1 Section 12 of the
  2018 ISDA CDM Equity Confirmation for Security Equity Swap, Para 72. ''Equity Cash
  Settlement Amount'' means, in respect of an Equity Cash Settlement Date, an amount
  in the Settlement Currency determined by the Calculation Agent as of the Equity
  Valuation Date to which the Equity Cash Settlement Amount relates, pursuant to the
  following formula: Equity Cash Settlement Amount = ABS(Rate Of Return) * Equity
  Notional Amount.'
- 'Rosetta func: Create_StockSplit  Function specification to create the fully-formed
  business event which represents the impact of a stock split (or a reverse stock
  split) on an Equity Derivatives contract on a certain date.'
- 'Rosetta func: Create_Execution  Specifies the function to compose an execution
  based on a minimum required set of inputs: product, quantity, parties, etc.'
- 'Rosetta func: Create_ContractFormation  Function specification that represents
  an executed trade for a contractual product that has been affirmed (or confirmed)
  by the two parties. The formed contract can reference a legal agreement for instance
  a master agreement, by using the optional legalAgreement input.'
- 'Rosetta func: Create_Exercise  Defines the process of putting into effect the
  rights specified in an options contract, such as to buy or sell a security.  Once
  exercised the option contract is terminated.'
- 'Rosetta func: Create_Reset  Defines how a Reset should be constructed.'
- 'Rosetta func: Create_Transfer  Defines how a transfer should be constructed, when
  representing the exchange of cash between parties.'
- 'Rosetta func: ResolveCashSettlementDate  A product agnostic function that resolves
  the settlement date of the payout for the period in question'
- 'Rosetta func: SecurityFinanceCashSettlementAmount'
- 'Rosetta func: Create_Split  Defines the logic for splitting a trade into separate
  copies. The split instruction contains a breakdown into N set of primitive instructions.
  Each set contains the primitive instructions to be applied to each post-split trade,
  eventually producing N trades. The split function underpins a number of business
  events such as clearing or allocation.'
- 'Rosetta func: Create_PartyChange  Defines the logic for changing one of the counterparties
  on a trade. A new trade identifier must be specified as a change of party results
  in a new trade. An ancillary party can also be specified, for instance to refer
  to the original executing party on the new trade.'
- 'Rosetta func: Create_QuantityChange  A specification of the inputs, outputs and
  constraints when calculating the after state of a Quantity Change Primitive Event'
- 'Rosetta func: Create_TermsChange  A specification of the inputs, outputs and constraints
  when calculating the after tradeState based Terms Change Primitive Instruction.'
- 'Rosetta func: FilterOpenTradeStates  Filter to only ''open'' TradeState - where
  both the closedState and positionState are not set.'
- 'Rosetta func: FilterClosedTradeStates  Filter to only ''closed'' TradeState -
  where either the closedState or positionState are set.'
- 'Rosetta func: Create_IndexTransitionTermsChange  Function specification to create
  a terms change that contains changes to the floating rate indexes and adds an adjustment
  spread to any existing spread.'
- 'Rosetta func: Create_Observation  Function specification to create an observation
  that incorporates an observation event into the observation history of a given trade
  state.'
- 'Rosetta func: Create_Valuation  Function specification to incorporate a new assessment
  of the valuation in the valuation history of a given trade state.'
- 'Rosetta func: UpdateSpreadAdjustmentAndRateOptions  For each of the trade state''s
  price quantity, find a matching price quantity instruction, and call the update
  function.'
- 'Rosetta func: ResolveSecurityFinanceBillingAmount  Calculates the billing amount
  for a Security Finance transaction.'
- 'Rosetta func: Create_Return  Defines the process of partially or fully returning
  a Security Lending Transaction.'
- 'Rosetta func: ResolveRepurchaseTransferInstruction  Resolves an instruction for
  settlement of a Repurchase Event'
- 'Rosetta func: Create_RollPrimitiveInstruction  Creates the primitive instructions
  for a trade roll. A trade roll consists in closing an existing trade and entering
  into a new one which has the same characteristics as the old one, except with an
  extended termination date and (possibly) a different price.'
- 'Rosetta func: Create_OnDemandRateChangePrimitiveInstruction  Creates a full primitive
  instruction for an on-demand rate change event. A rate change consists in closing
  the original trade and opening a new one with the same details as the original one,
  but with a new rate (price) and effective date. The business event logic checks
  that there is only 1 rate price in the original trade to be updated.'
- 'Rosetta func: Create_CancellationPrimitiveInstruction  Creates a primitive instruction
  for early cancellation.'
- 'Rosetta func: Create_PairOffInstruction  Creates a set of instructions to pair-off
  a set of trades based on a pair reference. A package component is created based
  on that pair reference and the list of identifiers for the underlying trades. That
  package component is then added onto the execution details of every underlying trade.
  The existing trades are not terminated.'
- 'Rosetta func: Create_ShapingInstruction  Creates a set of instructions to shape
  a trade based on shaped quantities and a package ID. The original trade is closed
  and split into (smaller) shaped trades based on a set of trade lots containing the
  shaped quantities and an identifier for each shaped trade. A package component is
  created based on the package ID and the list of identifiers for the shaped trades.
  That package component is then added onto the execution details of every shaped
  trade.'
- 'Rosetta func: Create_PartialDeliveryPrimitiveInstruction  Creates the primitive
  instruction for partial delivery of a repo transaction at settlement.'
- 'Rosetta func: Create_RepricePrimitiveInstruction  Creates the primitive instructions
  for a repricing that alters the cash amount of the trade. Transaction value and
  variation margin are processed separately as are transfers of cash and securities.'
- 'Rosetta func: Create_AdjustmentPrimitiveInstruction  Creates the primitive instructions
  for a repricing that alters the collateral quantity and value of the trade. Transaction
  value and variation margin are processed separately as are transfers of cash and
  securities.'
- 'Rosetta func: Create_SubstitutionPrimitiveInstruction  Creates the primitive instructions
  for a substitution of collateral by replacing the assetpayout of the trade.'
- 'Rosetta func: Create_OnDemandInterestPaymentPrimitiveInstruction  An instruction
  to make a interium interest payment by adding a payout leg to the deal.'
- 'Rosetta func: Create_TerminationInstruction  Creates the relevant primitive instruction
  for a termination, which consists in a quantity change to bring the quantity to
  zero.'
- 'Rosetta func: Create_TradeState  Creates a single trade state by applying primitive
  instructions to an existing trade state (optional in case an execution instruction
  is included). The primitive instructions are applied in the following order: Always
  first: - execution, if it exists, otherwise a before state must be provided The
  following 3 can be executed in any order, because they touch separate components
  of the trade: - quantity change - terms change - party change Always last: - contract
  formation, otherwise the contract could be invalid.'
- 'Rosetta func: Create_ExposureFromTrades  Builds an Exposure structure from a list
  of trades.'
- 'Rosetta func: PayoutObligationFulfillmentFromTrade  Determines the payouts and
  collateral payouts in a trade and whether the obligations have been fulfilled for
  each of them.'
in_subset:
- cdm_event_common
from_schema: https://w3id.org/lmodel/common-domain-model
related_mappings:
- gist:Transaction
slot_usage:
  state:
    name: state
    description: Represents the State of the Trade through its life-cycle.
    range: State
attributes:
  trade:
    name: trade
    description: Represents the Trade that has been effected by a business or life-cycle
      event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: TradeState
    domain_of:
    - TradeState
    - TradePricingReport
    range: Trade
    required: true
  state:
    name: state
    description: Represents the State of the Trade through its life-cycle.
    from_schema: https://w3id.org/lmodel/common-domain-model
    close_mappings:
    - fpml_5_10:Address.state
    rank: 1000
    owner: TradeState
    domain_of:
    - Address
    - TradeState
    - CounterpartyPositionState
    - ClosedState
    range: State
  resetHistory:
    name: resetHistory
    description: Represents the updated Trade attributes which can change as the result
      of a reset event. Only the changed values are captured, leaving the remaining
      data attributes empty. See Create_Reset function for further details on how
      TradeState is used in the Reset event. The TradeState data type is used to maintain
      backwards compatibility with the current Reset mechanism.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: TradeState
    domain_of:
    - TradeState
    range: Reset
    multivalued: true
    inlined: true
    inlined_as_list: true
  transferHistory:
    name: transferHistory
    description: Represents the updated Trade attributes which can change as the result
      of a transfer event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: TradeState
    domain_of:
    - TradeState
    range: TransferState
    multivalued: true
    inlined: true
    inlined_as_list: true
  observationHistory:
    name: observationHistory
    description: Represents the observed events related to a particular product or
      process, such as credit events or corporate actions.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: TradeState
    domain_of:
    - TradeState
    - CounterpartyPositionState
    range: ObservationEvent
    multivalued: true
    inlined: true
    inlined_as_list: true
  valuationHistory:
    name: valuationHistory
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: TradeState
    domain_of:
    - TradeState
    - CounterpartyPositionState
    range: Valuation
    multivalued: true
    inlined: true
    inlined_as_list: true
tree_root: true