curl --request POST \
--url https://api.fincept.in/quantlib/volatility/sabr/calibrate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"forward": 100,
"expiry": 1,
"strikes": [
90,
95,
100,
105,
110
],
"market_vols": [
0.27,
0.26,
0.25,
0.25,
0.26
],
"beta": 0.5,
"method": "least_squares"
}
'import requests
url = "https://api.fincept.in/quantlib/volatility/sabr/calibrate"
payload = {
"forward": 100,
"expiry": 1,
"strikes": [90, 95, 100, 105, 110],
"market_vols": [0.27, 0.26, 0.25, 0.25, 0.26],
"beta": 0.5,
"method": "least_squares"
}
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({
forward: 100,
expiry: 1,
strikes: [90, 95, 100, 105, 110],
market_vols: [0.27, 0.26, 0.25, 0.25, 0.26],
beta: 0.5,
method: 'least_squares'
})
};
fetch('https://api.fincept.in/quantlib/volatility/sabr/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/volatility/sabr/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([
'forward' => 100,
'expiry' => 1,
'strikes' => [
90,
95,
100,
105,
110
],
'market_vols' => [
0.27,
0.26,
0.25,
0.25,
0.26
],
'beta' => 0.5,
'method' => 'least_squares'
]),
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/volatility/sabr/calibrate"
payload := strings.NewReader("{\n \"forward\": 100,\n \"expiry\": 1,\n \"strikes\": [\n 90,\n 95,\n 100,\n 105,\n 110\n ],\n \"market_vols\": [\n 0.27,\n 0.26,\n 0.25,\n 0.25,\n 0.26\n ],\n \"beta\": 0.5,\n \"method\": \"least_squares\"\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/volatility/sabr/calibrate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"forward\": 100,\n \"expiry\": 1,\n \"strikes\": [\n 90,\n 95,\n 100,\n 105,\n 110\n ],\n \"market_vols\": [\n 0.27,\n 0.26,\n 0.25,\n 0.25,\n 0.26\n ],\n \"beta\": 0.5,\n \"method\": \"least_squares\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fincept.in/quantlib/volatility/sabr/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 \"forward\": 100,\n \"expiry\": 1,\n \"strikes\": [\n 90,\n 95,\n 100,\n 105,\n 110\n ],\n \"market_vols\": [\n 0.27,\n 0.26,\n 0.25,\n 0.25,\n 0.26\n ],\n \"beta\": 0.5,\n \"method\": \"least_squares\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"alpha": 0.248,
"beta": 0.5,
"rho": -0.18,
"nu": 0.32
}
}{
"detail": "Invalid API key"
}{
"detail": "Endpoint requires Standard tier or higher"
}{
"detail": [
{
"loc": [
"body",
"volatility"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Calibrate SABR Model
Calibrate SABR model parameters (alpha, beta, rho, nu) to match market volatilities across strikes. Uses optimization to find the best-fit SABR parameters that reproduce market smile. Beta can be fixed or calibrated. Supports multiple optimization methods and custom weighting. Essential for building market-consistent volatility surfaces. [Tier: PRO, Credits: 5]
curl --request POST \
--url https://api.fincept.in/quantlib/volatility/sabr/calibrate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"forward": 100,
"expiry": 1,
"strikes": [
90,
95,
100,
105,
110
],
"market_vols": [
0.27,
0.26,
0.25,
0.25,
0.26
],
"beta": 0.5,
"method": "least_squares"
}
'import requests
url = "https://api.fincept.in/quantlib/volatility/sabr/calibrate"
payload = {
"forward": 100,
"expiry": 1,
"strikes": [90, 95, 100, 105, 110],
"market_vols": [0.27, 0.26, 0.25, 0.25, 0.26],
"beta": 0.5,
"method": "least_squares"
}
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({
forward: 100,
expiry: 1,
strikes: [90, 95, 100, 105, 110],
market_vols: [0.27, 0.26, 0.25, 0.25, 0.26],
beta: 0.5,
method: 'least_squares'
})
};
fetch('https://api.fincept.in/quantlib/volatility/sabr/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/volatility/sabr/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([
'forward' => 100,
'expiry' => 1,
'strikes' => [
90,
95,
100,
105,
110
],
'market_vols' => [
0.27,
0.26,
0.25,
0.25,
0.26
],
'beta' => 0.5,
'method' => 'least_squares'
]),
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/volatility/sabr/calibrate"
payload := strings.NewReader("{\n \"forward\": 100,\n \"expiry\": 1,\n \"strikes\": [\n 90,\n 95,\n 100,\n 105,\n 110\n ],\n \"market_vols\": [\n 0.27,\n 0.26,\n 0.25,\n 0.25,\n 0.26\n ],\n \"beta\": 0.5,\n \"method\": \"least_squares\"\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/volatility/sabr/calibrate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"forward\": 100,\n \"expiry\": 1,\n \"strikes\": [\n 90,\n 95,\n 100,\n 105,\n 110\n ],\n \"market_vols\": [\n 0.27,\n 0.26,\n 0.25,\n 0.25,\n 0.26\n ],\n \"beta\": 0.5,\n \"method\": \"least_squares\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fincept.in/quantlib/volatility/sabr/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 \"forward\": 100,\n \"expiry\": 1,\n \"strikes\": [\n 90,\n 95,\n 100,\n 105,\n 110\n ],\n \"market_vols\": [\n 0.27,\n 0.26,\n 0.25,\n 0.25,\n 0.26\n ],\n \"beta\": 0.5,\n \"method\": \"least_squares\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"alpha": 0.248,
"beta": 0.5,
"rho": -0.18,
"nu": 0.32
}
}{
"detail": "Invalid API key"
}{
"detail": "Endpoint requires Standard tier or higher"
}{
"detail": [
{
"loc": [
"body",
"volatility"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Authorizations
API key for authentication. Get your key at https://api.fincept.in/auth/register
Body
Forward price of the underlying
x >= 0100
Time to expiry in years
x >= 01
Array of market strike prices
3[90, 95, 100, 105, 110]
Array of market implied volatilities for each strike
3[0.27, 0.26, 0.25, 0.25, 0.26]
Fixed beta value (if provided, beta is not calibrated). Common: 0 (normal), 0.5 (CIR), 1 (lognormal)
0 <= x <= 10.5
Optional weights for each strike in calibration (e.g., vega-weighted)
[0.8, 1, 1.2, 1, 0.8]
Optimization method: 'least_squares' (default), 'nelder_mead', 'powell'
least_squares, nelder_mead, powell "least_squares"
