{
  "tool": "msc-finance--capital-markets.bond_price_duration",
  "name": "Bond price, duration and convexity (CDU-BUS-FIN-900)",
  "answers": "What is this bond worth at this yield, and how sensitive is its price to a change in yield?",
  "degree": {
    "id": "competency:msc-finance--capital-markets",
    "code": "CDU-BUS-FIN-900",
    "name": "MSc Finance — Capital Markets",
    "version": "1.0.0"
  },
  "reference": "CFA Institute CBOK, Fixed Income: price from yield to maturity, Macaulay and modified duration, convexity (periodic compounding)",
  "endpoint": "/faculty/msc-finance--capital-markets/bond_price_duration",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "faceValue",
      "couponRate",
      "yieldToMaturity",
      "years",
      "frequency"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "faceValue": {
        "type": "number",
        "description": "Par value repaid at maturity",
        "minimum": 0.01
      },
      "couponRate": {
        "type": "number",
        "description": "Annual coupon rate, 0–1",
        "minimum": 0,
        "maximum": 1
      },
      "yieldToMaturity": {
        "type": "number",
        "description": "Annual yield to maturity, 0–1",
        "minimum": 0,
        "maximum": 1
      },
      "years": {
        "type": "number",
        "description": "Whole years to maturity",
        "minimum": 1,
        "maximum": 100
      },
      "frequency": {
        "type": "string",
        "description": "Coupons per year",
        "enum": [
          "annual",
          "semiannual",
          "quarterly",
          "monthly"
        ]
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "price",
      "macaulayDuration",
      "modifiedDuration",
      "convexity"
    ],
    "properties": {
      "price": {
        "type": "number",
        "description": "Full price per the face value"
      },
      "macaulayDuration": {
        "type": "number",
        "description": "Years"
      },
      "modifiedDuration": {
        "type": "number",
        "description": "Percentage price change per unit change in yield"
      },
      "convexity": {
        "type": "number",
        "description": "Years squared"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "faceValue": 1000,
    "couponRate": 0.06,
    "yieldToMaturity": 0.05,
    "years": 5,
    "frequency": "semiannual"
  }
}