curl --request POST \
--url https://api.fincept.in/quantlib/physics/entropy/renyi \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"probabilities": [
0.5,
0.3,
0.15,
0.05
],
"alpha": 2,
"base": 2.718281828459045
}
'{
"success": true,
"data": {
"renyi_entropy": 0.9562,
"alpha": 2
}
}{
"detail": "Invalid API key"
}{
"detail": "Insufficient credits. This endpoint requires 5 credits."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}quantlib-physics
Calculate Renyi Entropy
Calculates the Renyi entropy, a generalization of Shannon entropy parameterized by α. Different α values emphasize different aspects of the distribution: α→0 emphasizes rare events, α=1 recovers Shannon entropy, α→∞ emphasizes the most probable event. Useful for risk-sensitive information measures in finance.
Use Cases:
- Risk-sensitive portfolio uncertainty measures
- Tail risk assessment (low α emphasizes tails)
- Robust entropy estimation for noisy data
- Multi-scale information analysis
- Compare distributions with varying risk preferences
Formula: H_α(X) = (1/(1-α)) log(Σ p(x)^α)
Credits: 5 credits per request (Pro Tier) [Tier: ENTERPRISE, Credits: 10]
POST
/
quantlib
/
physics
/
entropy
/
renyi
curl --request POST \
--url https://api.fincept.in/quantlib/physics/entropy/renyi \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"probabilities": [
0.5,
0.3,
0.15,
0.05
],
"alpha": 2,
"base": 2.718281828459045
}
'{
"success": true,
"data": {
"renyi_entropy": 0.9562,
"alpha": 2
}
}{
"detail": "Invalid API key"
}{
"detail": "Insufficient credits. This endpoint requires 5 credits."
}{
"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
Discrete probability distribution (must sum to 1)
Example:
[0.5, 0.3, 0.15, 0.05]
Renyi parameter (α=0: max-entropy, α=1: Shannon, α=2: collision entropy, α→∞: min-entropy)
Example:
2
Logarithm base for entropy calculation
Example:
2.718281828459045
⌘I
