Skip to main content
POST
/
quantlib
/
risk
/
evt
/
gpd
Generalized Pareto Distribution (GPD) - Peaks Over Threshold
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/risk/evt/gpd \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "data": [
    -0.01,
    -0.05,
    -0.03,
    -0.08,
    -0.02,
    -0.12,
    -0.04
  ],
  "threshold": -0.05,
  "quantile": 0.9,
  "fit_method": "mle"
}
'
{
  "success": true,
  "data": {
    "threshold": -0.05,
    "xi": 0.23,
    "beta": 0.018,
    "n_exceedances": 45,
    "extreme_quantile_99": -0.142,
    "expected_shortfall": -0.095
  }
}

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
data
number[]
required

Loss or return data for tail analysis

Minimum array length: 100
Example:
[-0.01, -0.05, -0.03, -0.08]
threshold
number | null

Threshold value for defining extreme events (auto-selected if not provided)

Example:

-0.04

quantile
number
default:0.95

Quantile level for threshold selection if threshold not provided

Example:

0.95

fit_method
enum<string>
default:mle

Fitting method for GPD parameters

Available options:
mle,
pwm
Example:

"mle"

Response

GPD fit results

success
boolean
Example:

true

data
object