PriceComposite
Type CDM 7.2.0Defines 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.
Attributes
All 4 declared on PriceComposite. Cardinality in amber is required.
| Name | Type | Card. | Description |
|---|---|---|---|
| baseValue | number | 1..1 | 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). |
| operand | number | 1..1 | 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. |
| arithmeticOperator | ArithmeticOperationEnum | 1..1 | Specifies the arithmetic operator via an enumeration. |
| operandType | PriceOperandEnum | 0..1 | Optionally qualifies the type of operand: e.g. accrued or forward point. |
Conditions
Validation rules the model enforces on this type, in Rune. An instance that breaks one of these is invalid CDM, whatever produced it.
if operandType = PriceOperandEnum -> ForwardPoint
or operandType = PriceOperandEnum -> AccruedInterest
then arithmeticOperator = ArithmeticOperationEnum -> Add
or arithmeticOperator = ArithmeticOperationEnum -> Subtract Referenced by
1 type holds a PriceComposite as an attribute.
Open PriceComposite in the Model Browser
Walk the tree and the reference graph interactively, and switch releases to see how the type has changed. Free, no signup.