Skip to main content
POST
/
quantlib
/
models
/
short-rate
/
bond-price
Short Rate Bond Pricing
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/models/short-rate/bond-price \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "model": "vasicek",
  "kappa": 0.15,
  "theta": 0.05,
  "sigma": 0.012,
  "r0": 0.03,
  "maturities": [
    0.25,
    0.5,
    1,
    2,
    5,
    10
  ]
}
'
{
  "success": true,
  "data": {
    "model": "vasicek",
    "bonds": [
      {
        "maturity": 0.25,
        "bond_price": 99.25
      },
      {
        "maturity": 0.5,
        "bond_price": 98.51
      },
      {
        "maturity": 1,
        "bond_price": 97.05
      },
      {
        "maturity": 2,
        "bond_price": 94.18
      },
      {
        "maturity": 5,
        "bond_price": 86.07
      },
      {
        "maturity": 10,
        "bond_price": 74.08
      }
    ]
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register

Body

application/json
maturities
number[]
required

Array of bond maturities in years (e.g., [0.25, 0.5, 1, 2, 5, 10] for 3M, 6M, 1Y, 2Y, 5Y, 10Y bonds)

model
enum<string>
default:vasicek

Short rate model to use. Vasicek allows negative rates, CIR ensures positive rates, Hull-White fits an initial term structure

Available options:
vasicek,
cir,
hull_white
kappa
number
default:0.1

Mean reversion speed (annualized). Higher values mean faster reversion to long-term rate. Typical range: 0.01-0.5

theta
number
default:0.05

Long-term mean rate (annualized). The rate towards which the short rate reverts. Typical range: 0.01-0.10 (1%-10%)

sigma
number
default:0.01

Volatility of the short rate (annualized). Controls the randomness of rate movements. Typical range: 0.005-0.02

r0
number
default:0.03

Initial short rate (annualized). Current spot rate. Typical range: 0.00-0.10 (0%-10%)

Response

Successfully calculated bond prices

success
boolean
Example:

true

data
object
Example:
{
  "model": "vasicek",
  "bonds": [
    { "maturity": 0.25, "bond_price": 99.25 },
    { "maturity": 0.5, "bond_price": 98.51 },
    { "maturity": 1, "bond_price": 97.05 },
    { "maturity": 2, "bond_price": 94.18 },
    { "maturity": 5, "bond_price": 86.07 },
    { "maturity": 10, "bond_price": 74.08 }
  ]
}