curl --request POST \
--url https://api.fincept.in/quantlib/models/hull-white/calibrate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"kappa": 0.15,
"sigma": 0.012,
"r0": 0.025,
"market_tenors": [
0.5,
1,
2,
5,
10
],
"market_rates": [
0.0275,
0.03,
0.0345,
0.04,
0.045
]
}
'import requests
url = "https://api.fincept.in/quantlib/models/hull-white/calibrate"
payload = {
"kappa": 0.15,
"sigma": 0.012,
"r0": 0.025,
"market_tenors": [0.5, 1, 2, 5, 10],
"market_rates": [0.0275, 0.03, 0.0345, 0.04, 0.045]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
kappa: 0.15,
sigma: 0.012,
r0: 0.025,
market_tenors: [0.5, 1, 2, 5, 10],
market_rates: [0.0275, 0.03, 0.0345, 0.04, 0.045]
})
};
fetch('https://api.fincept.in/quantlib/models/hull-white/calibrate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fincept.in/quantlib/models/hull-white/calibrate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'kappa' => 0.15,
'sigma' => 0.012,
'r0' => 0.025,
'market_tenors' => [
0.5,
1,
2,
5,
10
],
'market_rates' => [
0.0275,
0.03,
0.0345,
0.04,
0.045
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fincept.in/quantlib/models/hull-white/calibrate"
payload := strings.NewReader("{\n \"kappa\": 0.15,\n \"sigma\": 0.012,\n \"r0\": 0.025,\n \"market_tenors\": [\n 0.5,\n 1,\n 2,\n 5,\n 10\n ],\n \"market_rates\": [\n 0.0275,\n 0.03,\n 0.0345,\n 0.04,\n 0.045\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fincept.in/quantlib/models/hull-white/calibrate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"kappa\": 0.15,\n \"sigma\": 0.012,\n \"r0\": 0.025,\n \"market_tenors\": [\n 0.5,\n 1,\n 2,\n 5,\n 10\n ],\n \"market_rates\": [\n 0.0275,\n 0.03,\n 0.0345,\n 0.04,\n 0.045\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fincept.in/quantlib/models/hull-white/calibrate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"kappa\": 0.15,\n \"sigma\": 0.012,\n \"r0\": 0.025,\n \"market_tenors\": [\n 0.5,\n 1,\n 2,\n 5,\n 10\n ],\n \"market_rates\": [\n 0.0275,\n 0.03,\n 0.0345,\n 0.04,\n 0.045\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"model": "hull_white",
"calibrated_bonds": [
{
"maturity": 0.5,
"bond_price": 98.64
},
{
"maturity": 1,
"bond_price": 97.04
},
{
"maturity": 2,
"bond_price": 93.32
},
{
"maturity": 5,
"bond_price": 81.87
},
{
"maturity": 10,
"bond_price": 64.07
}
]
}
}{
"detail": "Invalid API key"
}{
"detail": "Insufficient credits. This endpoint requires 5 credits. Current balance: 2 credits."
}{
"detail": [
{
"loc": [
"body",
"kappa"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Hull-White Model Calibration
Calibrate a Hull-White short rate model to match market yield curve data. The Hull-White model extends Vasicek by fitting an initial term structure, making it ideal for pricing derivatives consistently with observed market rates. Use this endpoint to calibrate the model parameters and generate fitted bond prices for validation. [Tier: ENTERPRISE, Credits: 10]
curl --request POST \
--url https://api.fincept.in/quantlib/models/hull-white/calibrate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"kappa": 0.15,
"sigma": 0.012,
"r0": 0.025,
"market_tenors": [
0.5,
1,
2,
5,
10
],
"market_rates": [
0.0275,
0.03,
0.0345,
0.04,
0.045
]
}
'import requests
url = "https://api.fincept.in/quantlib/models/hull-white/calibrate"
payload = {
"kappa": 0.15,
"sigma": 0.012,
"r0": 0.025,
"market_tenors": [0.5, 1, 2, 5, 10],
"market_rates": [0.0275, 0.03, 0.0345, 0.04, 0.045]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
kappa: 0.15,
sigma: 0.012,
r0: 0.025,
market_tenors: [0.5, 1, 2, 5, 10],
market_rates: [0.0275, 0.03, 0.0345, 0.04, 0.045]
})
};
fetch('https://api.fincept.in/quantlib/models/hull-white/calibrate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fincept.in/quantlib/models/hull-white/calibrate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'kappa' => 0.15,
'sigma' => 0.012,
'r0' => 0.025,
'market_tenors' => [
0.5,
1,
2,
5,
10
],
'market_rates' => [
0.0275,
0.03,
0.0345,
0.04,
0.045
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fincept.in/quantlib/models/hull-white/calibrate"
payload := strings.NewReader("{\n \"kappa\": 0.15,\n \"sigma\": 0.012,\n \"r0\": 0.025,\n \"market_tenors\": [\n 0.5,\n 1,\n 2,\n 5,\n 10\n ],\n \"market_rates\": [\n 0.0275,\n 0.03,\n 0.0345,\n 0.04,\n 0.045\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fincept.in/quantlib/models/hull-white/calibrate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"kappa\": 0.15,\n \"sigma\": 0.012,\n \"r0\": 0.025,\n \"market_tenors\": [\n 0.5,\n 1,\n 2,\n 5,\n 10\n ],\n \"market_rates\": [\n 0.0275,\n 0.03,\n 0.0345,\n 0.04,\n 0.045\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fincept.in/quantlib/models/hull-white/calibrate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"kappa\": 0.15,\n \"sigma\": 0.012,\n \"r0\": 0.025,\n \"market_tenors\": [\n 0.5,\n 1,\n 2,\n 5,\n 10\n ],\n \"market_rates\": [\n 0.0275,\n 0.03,\n 0.0345,\n 0.04,\n 0.045\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"model": "hull_white",
"calibrated_bonds": [
{
"maturity": 0.5,
"bond_price": 98.64
},
{
"maturity": 1,
"bond_price": 97.04
},
{
"maturity": 2,
"bond_price": 93.32
},
{
"maturity": 5,
"bond_price": 81.87
},
{
"maturity": 10,
"bond_price": 64.07
}
]
}
}{
"detail": "Invalid API key"
}{
"detail": "Insufficient credits. This endpoint requires 5 credits. Current balance: 2 credits."
}{
"detail": [
{
"loc": [
"body",
"kappa"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Authorizations
API key for authentication. Get your key at https://api.fincept.in/auth/register
Body
Array of market rate tenors in years (e.g., [0.5, 1, 2, 5, 10])
Corresponding market rates (yields) for each tenor, annualized
Mean reversion speed parameter (fixed during calibration)
Volatility parameter (fixed during calibration)
Initial short rate
Response
Successfully calibrated Hull-White model
true
Show child attributes
Show child attributes
{
"model": "hull_white",
"calibrated_bonds": [
{ "maturity": 0.5, "bond_price": 98.64 },
{ "maturity": 1, "bond_price": 97.04 },
{ "maturity": 2, "bond_price": 93.32 },
{ "maturity": 5, "bond_price": 81.87 },
{ "maturity": 10, "bond_price": 64.07 }
]
}
