Skip to main content
POST
/
quantlib
/
solver
/
finance
/
bond-yield
Calculate Bond Yield to Maturity
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/solver/finance/bond-yield \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "price": 98.5,
  "face": 100,
  "coupon": 0.05,
  "maturity": 5,
  "frequency": 2,
  "guess": 0.05
}
'
{
  "success": true,
  "data": {
    "yield_to_maturity": 0.0538,
    "price": 98.5,
    "coupon": 0.05
  }
}

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
price
number
required

Current market price of the bond (clean price)

Example:

98.5

coupon
number
required

Annual coupon rate as a decimal (e.g., 0.05 for 5%)

Example:

0.05

maturity
number
required

Time to maturity in years

Example:

5

face
number
default:100

Face value (par value) of the bond

Example:

100

frequency
enum<integer>
default:2

Coupon payment frequency per year (1=annual, 2=semi-annual, 4=quarterly, 12=monthly)

Available options:
1,
2,
4,
12
Example:

2

guess
number
default:0.05

Initial guess for the yield (used by the solver)

Example:

0.05

Response

Successful Response

success
boolean
Example:

true

data
object