Skip to content

Class: PrimitiveInstruction

A Primitive Instruction describes the inputs required to pass into the corresponding PrimitiveEvent function.

URI: common_domain_model:PrimitiveInstruction

 classDiagram
    class PrimitiveInstruction
    click PrimitiveInstruction href "../PrimitiveInstruction/"
      PrimitiveInstruction : contractFormation





        PrimitiveInstruction --> "0..1" ContractFormationInstruction : contractFormation
        click ContractFormationInstruction href "../ContractFormationInstruction/"



      PrimitiveInstruction : execution





        PrimitiveInstruction --> "0..1" ExecutionInstruction : execution
        click ExecutionInstruction href "../ExecutionInstruction/"



      PrimitiveInstruction : exercise





        PrimitiveInstruction --> "0..1" ExerciseInstruction : exercise
        click ExerciseInstruction href "../ExerciseInstruction/"



      PrimitiveInstruction : indexTransition





        PrimitiveInstruction --> "0..1" IndexTransitionInstruction : indexTransition
        click IndexTransitionInstruction href "../IndexTransitionInstruction/"



      PrimitiveInstruction : observation





        PrimitiveInstruction --> "0..1" ObservationInstruction : observation
        click ObservationInstruction href "../ObservationInstruction/"



      PrimitiveInstruction : partyChange





        PrimitiveInstruction --> "0..1" PartyChangeInstruction : partyChange
        click PartyChangeInstruction href "../PartyChangeInstruction/"



      PrimitiveInstruction : quantityChange





        PrimitiveInstruction --> "0..1" QuantityChangeInstruction : quantityChange
        click QuantityChangeInstruction href "../QuantityChangeInstruction/"



      PrimitiveInstruction : reset





        PrimitiveInstruction --> "0..1" ResetInstruction : reset
        click ResetInstruction href "../ResetInstruction/"



      PrimitiveInstruction : split





        PrimitiveInstruction --> "0..1" SplitInstruction : split
        click SplitInstruction href "../SplitInstruction/"



      PrimitiveInstruction : stockSplit





        PrimitiveInstruction --> "0..1" StockSplitInstruction : stockSplit
        click StockSplitInstruction href "../StockSplitInstruction/"



      PrimitiveInstruction : termsChange





        PrimitiveInstruction --> "0..1" TermsChangeInstruction : termsChange
        click TermsChangeInstruction href "../TermsChangeInstruction/"



      PrimitiveInstruction : transfer





        PrimitiveInstruction --> "0..1" TransferInstruction : transfer
        click TransferInstruction href "../TransferInstruction/"



      PrimitiveInstruction : valuation





        PrimitiveInstruction --> "0..1" ValuationInstruction : valuation
        click ValuationInstruction href "../ValuationInstruction/"



Slots

Name Cardinality and Range Description Inheritance
contractFormation 0..1
ContractFormationInstruction
Specifies instructions describing an contract formation primitive event direct
execution 0..1
ExecutionInstruction
Specifies instructions describing an execution primitive event direct
exercise 0..1
ExerciseInstruction
Specifies instructions describing an exercise primitive event direct
partyChange 0..1
PartyChangeInstruction
Specifies instructions describing a party change primitive event direct
quantityChange 0..1
QuantityChangeInstruction
Specifies instructions describing an quantity change primitive event direct
reset 0..1
ResetInstruction
Specifies instructions describing a reset event direct
split 0..1
SplitInstruction
Specifies instructions to split a trade into multiple branches direct
termsChange 0..1
TermsChangeInstruction
Specifies instructions describing a terms change primitive event direct
transfer 0..1
TransferInstruction
Specifies instructions describing a transfer primitive event direct
indexTransition 0..1
IndexTransitionInstruction
Specifies inputs needed to process a Index Transition business event direct
stockSplit 0..1
StockSplitInstruction
Specifies inputs needed to process a Stock Split business event direct
observation 0..1
ObservationInstruction
Specifies inputs needed to process an observation direct
valuation 0..1
ValuationInstruction
Specifies inputs needed to process an update of a valuation direct

Usages

used by used in type used
Instruction primitiveInstruction range PrimitiveInstruction
ExerciseInstruction exerciseQuantity range PrimitiveInstruction
SplitInstruction breakdown range PrimitiveInstruction

In Subsets

Comments

  • 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_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_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: NewTradeInstructionOnlyExists
  • 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.

Identifier and Mapping Information

Annotations

property value
rosetta_functions [{"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_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_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":"NewTradeInstructionOnlyExists","inputs":[{"name":"primitiveInstruction","type":"PrimitiveInstruction","cardinality":"1..1"}],"output":{"name":"result","type":"boolean","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"}}]

Schema Source

Mappings

Mapping Type Mapped Value
self common_domain_model:PrimitiveInstruction
native common_domain_model:PrimitiveInstruction

LinkML Source

Direct

name: PrimitiveInstruction
annotations:
  rosetta_functions:
    tag: rosetta_functions
    value: '[{"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_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_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":"NewTradeInstructionOnlyExists","inputs":[{"name":"primitiveInstruction","type":"PrimitiveInstruction","cardinality":"1..1"}],"output":{"name":"result","type":"boolean","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"}}]'
description: A Primitive Instruction describes the inputs required to pass into the
  corresponding PrimitiveEvent function.
comments:
- '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_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_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: NewTradeInstructionOnlyExists'
- '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.'
in_subset:
- cdm_event_common
from_schema: https://w3id.org/lmodel/common-domain-model
slots:
- contractFormation
- execution
- exercise
- partyChange
- quantityChange
- reset
- split
- termsChange
- transfer
- indexTransition
- stockSplit
- observation
- valuation

Induced

name: PrimitiveInstruction
annotations:
  rosetta_functions:
    tag: rosetta_functions
    value: '[{"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_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_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":"NewTradeInstructionOnlyExists","inputs":[{"name":"primitiveInstruction","type":"PrimitiveInstruction","cardinality":"1..1"}],"output":{"name":"result","type":"boolean","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"}}]'
description: A Primitive Instruction describes the inputs required to pass into the
  corresponding PrimitiveEvent function.
comments:
- '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_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_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: NewTradeInstructionOnlyExists'
- '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.'
in_subset:
- cdm_event_common
from_schema: https://w3id.org/lmodel/common-domain-model
attributes:
  contractFormation:
    name: contractFormation
    description: Specifies instructions describing an contract formation primitive
      event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    range: ContractFormationInstruction
  execution:
    name: execution
    description: Specifies instructions describing an execution primitive event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    range: ExecutionInstruction
  exercise:
    name: exercise
    description: Specifies instructions describing an exercise primitive event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    range: ExerciseInstruction
  partyChange:
    name: partyChange
    description: Specifies instructions describing a party change primitive event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    range: PartyChangeInstruction
  quantityChange:
    name: quantityChange
    description: Specifies instructions describing an quantity change primitive event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    range: QuantityChangeInstruction
  reset:
    name: reset
    description: Specifies instructions describing a reset event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    - ResolvablePriceQuantity
    range: ResetInstruction
  split:
    name: split
    description: Specifies instructions to split a trade into multiple branches.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    range: SplitInstruction
  termsChange:
    name: termsChange
    description: Specifies instructions describing a terms change primitive event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    range: TermsChangeInstruction
  transfer:
    name: transfer
    description: Specifies instructions describing a transfer primitive event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    - TransferState
    range: TransferInstruction
  indexTransition:
    name: indexTransition
    description: Specifies inputs needed to process a Index Transition business event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    range: IndexTransitionInstruction
  stockSplit:
    name: stockSplit
    description: Specifies inputs needed to process a Stock Split business event.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    range: StockSplitInstruction
  observation:
    name: observation
    description: Specifies inputs needed to process an observation.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    - BillingRecordInstruction
    range: ObservationInstruction
  valuation:
    name: valuation
    description: Specifies inputs needed to process an update of a valuation.
    from_schema: https://w3id.org/lmodel/common-domain-model
    rank: 1000
    owner: PrimitiveInstruction
    domain_of:
    - PrimitiveInstruction
    - ValuationInstruction
    range: ValuationInstruction