Skip to main content
POST
/
quantlib
/
solver
/
finance
/
asw-spread
Calculate Asset Swap Spread
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/solver/finance/asw-spread \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "bond_price": 98,
  "face": 100,
  "coupon": 0.05,
  "maturity": 5,
  "frequency": 2,
  "base_rates": [
    0.03,
    0.032,
    0.034,
    0.036,
    0.038,
    0.04
  ],
  "base_times": [
    0.5,
    1,
    2,
    3,
    4,
    5
  ]
}
'
{
  "success": true,
  "data": {
    "asw_spread": 0.0145
  }
}

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

Current market price of the bond

Example:

98

coupon
number
required

Annual coupon rate as a decimal

Example:

0.05

maturity
number
required

Time to maturity in years

Example:

5

base_rates
number[]
required

Array of zero rates for the discount curve

Example:
[0.03, 0.032, 0.034, 0.036, 0.038, 0.04]
base_times
number[]
required

Array of times for the discount curve in years

Example:
[0.5, 1, 2, 3, 4, 5]
face
number
default:100

Face value of the bond

Example:

100

frequency
enum<integer>
default:2

Coupon payment frequency per year

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

2

Response

Successful Response

success
boolean
Example:

true

data
object