The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

fixed_income / wire operation

Bond price/yield analytics

totalfinance.fixed_income.bond_analytics

Full fixed-rate bond analytics from a specification: given a `yield`, price it; given a `price`, solve the yield to maturity — then report clean/dirty price, accrued interest, Macaulay/modified duration, convexity, and DV01. Dates are YYYY-MM-DD; rates are decimals.

Pack / profilesfixed_income / default, full
Default discoveryIncluded
Required capabilitiesNone
Effects / authorizationnone / none
Cost / cancellationsmall / Do not assume inline interruption
Handle-eligible inputsNone
Idempotencynot-applicable
Input schema
{
  "type": "object",
  "properties": {
    "issueDate": {
      "type": "string",
      "description": "Dated date / first accrual date, YYYY-MM-DD"
    },
    "maturityDate": {
      "type": "string",
      "description": "Maturity date, YYYY-MM-DD"
    },
    "couponRate": {
      "type": "number",
      "description": "Annualized coupon rate (decimal; 0.05 = 5%)"
    },
    "frequency": {
      "type": "string",
      "enum": [
        "annual",
        "semiannual",
        "quarterly",
        "monthly"
      ],
      "description": "Coupon frequency"
    },
    "faceValue": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Redemption / par value (default 100)"
    },
    "dayCount": {
      "type": "string",
      "enum": [
        "30/360",
        "ACT/360",
        "ACT/365F",
        "ACT/ACT",
        "30E/360"
      ],
      "description": "Accrual day count (default 30/360)"
    },
    "settlementDate": {
      "type": "string",
      "description": "Settlement date, YYYY-MM-DD"
    },
    "yield": {
      "type": "number",
      "description": "Annualized yield (decimal) — provide this OR `price`"
    },
    "price": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Bond price — provide this OR `yield`"
    },
    "priceType": {
      "type": "string",
      "enum": [
        "clean",
        "dirty"
      ],
      "description": "How to read `price` (default clean)"
    }
  },
  "additionalProperties": false,
  "required": [
    "issueDate",
    "maturityDate",
    "couponRate",
    "frequency",
    "settlementDate"
  ]
}
Output schema
{
  "type": "object",
  "properties": {
    "value": {
      "description": "The computed result"
    },
    "assumptions": {
      "type": "object",
      "description": "Every applied convention, echoed"
    },
    "diagnostics": {
      "type": "object",
      "description": "Engine/method/warnings (+ convergence where iterative)"
    }
  },
  "required": [
    "value",
    "assumptions",
    "diagnostics"
  ]
}

All operations · Setup, handles, jobs & permissions