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/"



Slots

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

Usages

used by used in type used
PriceSchedule composite range PriceComposite
Price composite range PriceComposite

In Subsets

Comments

  • Rosetta condition: ArithmeticOperator — if operandType = PriceOperandEnum -> ForwardPoint or operandType = PriceOperandEnum -> AccruedInterest then arithmeticOperator = ArithmeticOperationEnum -> Add or arithmeticOperator = ArithmeticOperationEnum -> Subtract

Identifier and Mapping Information

Schema Source

Mappings

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

LinkML Source

Direct

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.
comments:
- 'Rosetta condition: ArithmeticOperator  if operandType = PriceOperandEnum -> ForwardPoint
  or operandType = PriceOperandEnum -> AccruedInterest then arithmeticOperator = ArithmeticOperationEnum
  -> Add or arithmeticOperator = ArithmeticOperationEnum -> Subtract'
in_subset:
- cdm_observable_asset
from_schema: https://w3id.org/lmodel/common-domain-model
slots:
- baseValue
- operand
- arithmeticOperator
- operandType

Induced

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.
comments:
- 'Rosetta condition: ArithmeticOperator  if operandType = PriceOperandEnum -> ForwardPoint
  or operandType = PriceOperandEnum -> AccruedInterest then arithmeticOperator = ArithmeticOperationEnum
  -> Add or arithmeticOperator = ArithmeticOperationEnum -> Subtract'
in_subset:
- cdm_observable_asset
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
    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
    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
    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
    rank: 1000
    owner: PriceComposite
    domain_of:
    - PriceComposite
    range: PriceOperandEnum