{
  "spec": "fio",
  "spec_version": "0.3.0",
  "manifest": {
    "id": "bond-price-yield-2016",
    "name": "Bond Price and Yield Calculator",
    "description": "Prices a fixed-coupon bond from its yield, or solves the yield from a price, using a port of the workbook's macro.",
    "workbook": {
      "uri": "Calculate-Bond-Prices-macro-free.xlsx",
      "locale": "en-US",
      "date_system": 1900
    }
  },
  "ports": [
    {
      "id": "time_to_maturity_years",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'工作表1'!B1"
      },
      "schema": {
        "type": "number"
      },
      "default": 10,
      "constraints": {
        "min": 0.5,
        "max": 100
      },
      "description": "Time to maturity in years"
    },
    {
      "id": "annual_coupon_rate",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'工作表1'!B2"
      },
      "schema": {
        "type": "number"
      },
      "default": 0.08,
      "constraints": {
        "min": 0,
        "max": 1
      },
      "description": "Annual coupon rate as a decimal (0.08 is 8%)"
    },
    {
      "id": "discount_interest_rate",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'工作表1'!B3"
      },
      "schema": {
        "type": "number"
      },
      "default": 0.4347129575908184,
      "constraints": {
        "min": 0,
        "max": 1
      },
      "description": "Annual discount rate (yield) as a decimal"
    },
    {
      "id": "par_value",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'工作表1'!B4"
      },
      "schema": {
        "type": "number"
      },
      "default": 100,
      "constraints": {
        "min": 0
      },
      "description": "Par (face) value"
    },
    {
      "id": "payment_frequency",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'工作表1'!B5"
      },
      "schema": {
        "type": "integer"
      },
      "default": 2,
      "constraints": {
        "min": 1,
        "max": 2
      },
      "description": "Coupon payments per year (1 or 2)"
    },
    {
      "id": "market_price",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'工作表1'!B6"
      },
      "schema": {
        "type": "number"
      },
      "default": 20,
      "constraints": {
        "min": 0
      },
      "description": "Bond price to solve the yield for"
    },
    {
      "id": "bond_price",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'工作表1'!B6"
      },
      "schema": {
        "type": "number"
      },
      "description": "Bond price: discounted coupons plus discounted par"
    },
    {
      "id": "solved_yield",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'工作表1'!B3"
      },
      "schema": {
        "type": "number"
      },
      "description": "Annual yield that reproduces the market price, found by bisection between 0 and 1"
    },
    {
      "id": "periodic_coupon_payment",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "Check!B1"
      },
      "schema": {
        "type": "number"
      },
      "description": "Coupon paid each period"
    },
    {
      "id": "check_sheet_price_20_payments",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "Check!C21"
      },
      "schema": {
        "type": "number"
      },
      "description": "Price from the workbook's own 20-payment check table; comparable only when maturity times frequency is 20"
    }
  ]
}
