{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$anchor": "cdm.observable.asset",
  "type": "object",
  "title": "PriceSchedule",
  "description": "Specifies the price of a financial instrument in a trade as a schedule of measures. A price generically expresses the value of an exchange as a ratio: it measures the amount of one thing needed to be exchanged for 1 unit of another thing (e.g. cash in a specific currency in exchange for a bond or share). This generic representation can be used to support any type of financial price beyond just cash price: e.g. an interest rate, a foreign exchange rate, etc. This data type is generically based on a schedule and can also be used to represent a price as a single value.",
  "properties": {
    "value": {
      "description": "Specifies the value of the measure as a number. Optional because in a measure vector or schedule, this single value may be omitted.",
      "type": "number"
    },
    "unit": {
      "description": "Qualifies the unit by which the amount is measured. Optional because a measure may be unit-less (e.g. when representing a ratio between amounts in the same unit).",
      "$ref": "cdm-base-math-UnitType.schema.json"
    },
    "datedValue": {
      "description": "A schedule of step date and value pairs. On each step date the associated step value becomes effective. The step dates are used to order the steps by ascending order. This attribute is optional so the data type may be used to define a schedule with a single value.",
      "type": "array",
      "items": {
        "$ref": "cdm-base-math-DatedValue.schema.json"
      },
      "minItems": 0
    },
    "perUnitOf": {
      "description": "Provides an attribute to define the unit of the thing being priced. For example, {amount, unitOfAmount, PerUnitOfAmount} = [10, EUR, Shares] = (10.00 EUR/SHARE) * (300,000 SHARES) = EUR 3,000,000.00 (Shares cancel out in the calculation).",
      "$ref": "cdm-base-math-UnitType.schema.json"
    },
    "priceType": {
      "description": "Specifies the price type as an enumeration: interest rate, exchange rate, asset price etc. This attribute is mandatory so that prices can always be clasiffied according to their type. The price type implies some constraints on the price's units.",
      "$ref": "cdm-observable-asset-PriceTypeEnum.schema.json"
    },
    "priceExpression": {
      "description": "(Optionally) Specifies whether the price is expressed in absolute or percentage terms.",
      "$ref": "cdm-observable-asset-PriceExpressionEnum.schema.json"
    },
    "composite": {
      "description": "(Optionally) Specifies the underlying price components if the price can be expressed as a composite: e.g. dirty price = clean price + accrued.",
      "$ref": "cdm-observable-asset-PriceComposite.schema.json"
    },
    "arithmeticOperator": {
      "description": "(Optionally) When the price is to be understood as an operator to apply to an observable, i.e. a spread, multiplier or min/max.",
      "$ref": "cdm-base-math-ArithmeticOperationEnum.schema.json"
    },
    "cashPrice": {
      "description": "(Optionally when the price type is cash) Additional attributes that further define a cash price, e.g. what type of fee it is.",
      "$ref": "cdm-observable-asset-CashPrice.schema.json"
    }
  },
  "required": [
    "priceType"
  ]
}
