Black76 Caplet Price
curl --request POST \
--url https://api.fincept.in/quantlib/pricing/black76/caplet \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"forward_rate": 0.03,
"strike": 0.035,
"discount_factor": 0.95,
"volatility": 0.2,
"t_start": 1,
"t_end": 1.25,
"notional": 1000000
}
'import requests
url = "https://api.fincept.in/quantlib/pricing/black76/caplet"
payload = {
"forward_rate": 0.03,
"strike": 0.035,
"discount_factor": 0.95,
"volatility": 0.2,
"t_start": 1,
"t_end": 1.25,
"notional": 1000000
}
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_rate: 0.03,
strike: 0.035,
discount_factor: 0.95,
volatility: 0.2,
t_start: 1,
t_end: 1.25,
notional: 1000000
})
};
fetch('https://api.fincept.in/quantlib/pricing/black76/caplet', 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/pricing/black76/caplet",
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_rate' => 0.03,
'strike' => 0.035,
'discount_factor' => 0.95,
'volatility' => 0.2,
't_start' => 1,
't_end' => 1.25,
'notional' => 1000000
]),
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/pricing/black76/caplet"
payload := strings.NewReader("{\n \"forward_rate\": 0.03,\n \"strike\": 0.035,\n \"discount_factor\": 0.95,\n \"volatility\": 0.2,\n \"t_start\": 1,\n \"t_end\": 1.25,\n \"notional\": 1000000\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/pricing/black76/caplet")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"forward_rate\": 0.03,\n \"strike\": 0.035,\n \"discount_factor\": 0.95,\n \"volatility\": 0.2,\n \"t_start\": 1,\n \"t_end\": 1.25,\n \"notional\": 1000000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fincept.in/quantlib/pricing/black76/caplet")
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_rate\": 0.03,\n \"strike\": 0.035,\n \"discount_factor\": 0.95,\n \"volatility\": 0.2,\n \"t_start\": 1,\n \"t_end\": 1.25,\n \"notional\": 1000000\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"caplet_price": 234.56
}
}{
"detail": "Invalid API key"
}{
"detail": "Insufficient credits. This endpoint costs 2 credits per request."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}quantlib-pricing
Black76 Caplet Price
Price an interest rate caplet using the Black76 model. A caplet is a call option on an interest rate that pays off when the reference rate exceeds the strike rate.
Payoff: max(L - K, 0) × τ × N × DF
Where:
- L = realized LIBOR/forward rate
- K = strike rate
- τ = accrual period (t_end - t_start)
- N = notional
- DF = discount factor
Use Cases:
- Price interest rate caps (sum of caplets)
- Hedge floating rate exposures
- Value borrower’s protection against rate increases
- Structure interest rate derivatives
Tier: Standard (2 credits/request) [Tier: PRO, Credits: 5]
POST
/
quantlib
/
pricing
/
black76
/
caplet
Black76 Caplet Price
curl --request POST \
--url https://api.fincept.in/quantlib/pricing/black76/caplet \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"forward_rate": 0.03,
"strike": 0.035,
"discount_factor": 0.95,
"volatility": 0.2,
"t_start": 1,
"t_end": 1.25,
"notional": 1000000
}
'import requests
url = "https://api.fincept.in/quantlib/pricing/black76/caplet"
payload = {
"forward_rate": 0.03,
"strike": 0.035,
"discount_factor": 0.95,
"volatility": 0.2,
"t_start": 1,
"t_end": 1.25,
"notional": 1000000
}
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_rate: 0.03,
strike: 0.035,
discount_factor: 0.95,
volatility: 0.2,
t_start: 1,
t_end: 1.25,
notional: 1000000
})
};
fetch('https://api.fincept.in/quantlib/pricing/black76/caplet', 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/pricing/black76/caplet",
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_rate' => 0.03,
'strike' => 0.035,
'discount_factor' => 0.95,
'volatility' => 0.2,
't_start' => 1,
't_end' => 1.25,
'notional' => 1000000
]),
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/pricing/black76/caplet"
payload := strings.NewReader("{\n \"forward_rate\": 0.03,\n \"strike\": 0.035,\n \"discount_factor\": 0.95,\n \"volatility\": 0.2,\n \"t_start\": 1,\n \"t_end\": 1.25,\n \"notional\": 1000000\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/pricing/black76/caplet")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"forward_rate\": 0.03,\n \"strike\": 0.035,\n \"discount_factor\": 0.95,\n \"volatility\": 0.2,\n \"t_start\": 1,\n \"t_end\": 1.25,\n \"notional\": 1000000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fincept.in/quantlib/pricing/black76/caplet")
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_rate\": 0.03,\n \"strike\": 0.035,\n \"discount_factor\": 0.95,\n \"volatility\": 0.2,\n \"t_start\": 1,\n \"t_end\": 1.25,\n \"notional\": 1000000\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"caplet_price": 234.56
}
}{
"detail": "Invalid API key"
}{
"detail": "Insufficient credits. This endpoint costs 2 credits per request."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API key for authentication. Get your key at https://api.fincept.in/auth/register
Body
application/json
Forward interest rate for the period (decimal format)
Example:
0.03
Strike rate of the caplet/floorlet (decimal format)
Example:
0.035
Discount factor to present value
Example:
0.95
Annualized volatility of the forward rate (decimal format)
Example:
0.2
Start time of the accrual period in years
Example:
1
End time of the accrual period in years
Example:
1.25
Notional amount
Example:
1000000
⌘I
