Skip to content

Class: PriceComposite

Defines the inputs required to calculate a price as a simple composite of 2 other values. The inputs consist of 2 numbers and a simple arithmetic operator. This generic data type applies to a variety of use cases where a price is obtained by simple composition, e.g. dirty = clean + accrued (Bond), forward rate = spot rate + forward point (FX) etc.

URI: common_domain_model:PriceComposite

 classDiagram
    class PriceComposite
    click PriceComposite href "../PriceComposite/"
      PriceComposite : arithmeticOperator
        
          
    
        
        
        PriceComposite --> "1" ArithmeticOperationEnum : arithmeticOperator
        click ArithmeticOperationEnum href "../ArithmeticOperationEnum/"
    

        
      PriceComposite : baseValue
        
      PriceComposite : operand
        
      PriceComposite : operandType
        
          
    
        
        
        PriceComposite --> "0..1" PriceOperandEnum : operandType
        click PriceOperandEnum href "../PriceOperandEnum/"
    

        
      
Name Cardinality and Range Description Inheritance
baseValue 1
Decimal
The 1st value in the arithmetic operation, which may be non-commutative in so… direct
operand 1
Decimal
The 2nd value in the arithmetic operation, which may be non-commutative in so… direct
arithmeticOperator 1
ArithmeticOperationEnum
Specifies the arithmetic operator via an enumeration direct
operandType 0..1
PriceOperandEnum
Optionally qualifies the type of operand: e direct
used by used in type used
Price composite range PriceComposite
PriceSchedule composite range PriceComposite

Rule Applied Preconditions Postconditions Elseconditions
any_of [{'slot_conditions': {'operandType': {'value_presence': 'PRESENT', 'equals_string': 'ForwardPoint'}}}, {'slot_conditions': {'operandType': {'value_presence': 'PRESENT', 'equals_string': 'AccruedInterest'}}}] [{'slot_conditions': {'arithmeticOperator': {'equals_string': 'Add'}}}, {'slot_conditions': {'arithmeticOperator': {'equals_string': 'Subtract'}}}]
Mapping Type Mapped Value
self common_domain_model:PriceComposite
native common_domain_model:PriceComposite
name: PriceComposite
description: Defines the inputs required to calculate a price as a simple composite
of 2 other values. The inputs consist of 2 numbers and a simple arithmetic operator.
This generic data type applies to a variety of use cases where a price is obtained
by simple composition, e.g. dirty = clean + accrued (Bond), forward rate = spot
rate + forward point (FX) etc.
from_schema: https://w3id.org/lmodel/common-domain-model
attributes:
baseValue:
name: baseValue
description: 'The 1st value in the arithmetic operation, which may be non-commutative
in some cases: Subtract, Divide). This 1st operand is called ''baseValue'' as
it refers to the price anchor in the arithmetic operation: e.g. the clean price
(Bond) or the spot rate (FX).'
from_schema: https://w3id.org/lmodel/common-domain-model/cdm_observable_asset
rank: 1000
domain_of:
- PriceComposite
range: decimal
required: true
operand:
name: operand
description: 'The 2nd value in the arithmetic operation, which may be non-commutative
in some cases: Subtract, Divide). The 2nd operand is called ''operand'' to distinguish
it from the 1st one which is the price anchor.'
from_schema: https://w3id.org/lmodel/common-domain-model/cdm_observable_asset
rank: 1000
domain_of:
- PriceComposite
range: decimal
required: true
arithmeticOperator:
name: arithmeticOperator
description: Specifies the arithmetic operator via an enumeration.
from_schema: https://w3id.org/lmodel/common-domain-model/cdm_observable_asset
rank: 1000
domain_of:
- PriceComposite
- PriceSchedule
range: ArithmeticOperationEnum
required: true
operandType:
name: operandType
description: 'Optionally qualifies the type of operand: e.g. accrued or forward
point.'
from_schema: https://w3id.org/lmodel/common-domain-model/cdm_observable_asset
rank: 1000
domain_of:
- PriceComposite
range: PriceOperandEnum
rules:
- preconditions:
any_of:
- slot_conditions:
operandType:
name: operandType
value_presence: PRESENT
equals_string: ForwardPoint
- slot_conditions:
operandType:
name: operandType
value_presence: PRESENT
equals_string: AccruedInterest
postconditions:
any_of:
- slot_conditions:
arithmeticOperator:
name: arithmeticOperator
equals_string: Add
- slot_conditions:
arithmeticOperator:
name: arithmeticOperator
equals_string: Subtract
description: 'ArithmeticOperator: If operand type is accrued or forward point, then
operator must be either add or subtract.'
name: PriceComposite
description: Defines the inputs required to calculate a price as a simple composite
of 2 other values. The inputs consist of 2 numbers and a simple arithmetic operator.
This generic data type applies to a variety of use cases where a price is obtained
by simple composition, e.g. dirty = clean + accrued (Bond), forward rate = spot
rate + forward point (FX) etc.
from_schema: https://w3id.org/lmodel/common-domain-model
attributes:
baseValue:
name: baseValue
description: 'The 1st value in the arithmetic operation, which may be non-commutative
in some cases: Subtract, Divide). This 1st operand is called ''baseValue'' as
it refers to the price anchor in the arithmetic operation: e.g. the clean price
(Bond) or the spot rate (FX).'
from_schema: https://w3id.org/lmodel/common-domain-model/cdm_observable_asset
rank: 1000
owner: PriceComposite
domain_of:
- PriceComposite
range: decimal
required: true
operand:
name: operand
description: 'The 2nd value in the arithmetic operation, which may be non-commutative
in some cases: Subtract, Divide). The 2nd operand is called ''operand'' to distinguish
it from the 1st one which is the price anchor.'
from_schema: https://w3id.org/lmodel/common-domain-model/cdm_observable_asset
rank: 1000
owner: PriceComposite
domain_of:
- PriceComposite
range: decimal
required: true
arithmeticOperator:
name: arithmeticOperator
description: Specifies the arithmetic operator via an enumeration.
from_schema: https://w3id.org/lmodel/common-domain-model/cdm_observable_asset
rank: 1000
owner: PriceComposite
domain_of:
- PriceComposite
- PriceSchedule
range: ArithmeticOperationEnum
required: true
operandType:
name: operandType
description: 'Optionally qualifies the type of operand: e.g. accrued or forward
point.'
from_schema: https://w3id.org/lmodel/common-domain-model/cdm_observable_asset
rank: 1000
owner: PriceComposite
domain_of:
- PriceComposite
range: PriceOperandEnum
rules:
- preconditions:
any_of:
- slot_conditions:
operandType:
name: operandType
value_presence: PRESENT
equals_string: ForwardPoint
- slot_conditions:
operandType:
name: operandType
value_presence: PRESENT
equals_string: AccruedInterest
postconditions:
any_of:
- slot_conditions:
arithmeticOperator:
name: arithmeticOperator
equals_string: Add
- slot_conditions:
arithmeticOperator:
name: arithmeticOperator
equals_string: Subtract
description: 'ArithmeticOperator: If operand type is accrued or forward point, then
operator must be either add or subtract.'