Skip to main content
POST
/
quantlib
/
risk
/
copula
/
sample
Generate Copula Samples
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/risk/copula/sample \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "copula_type": "clayton",
  "correlation": 2.5,
  "n_samples": 5000,
  "seed": 123
}
'
{
  "success": true,
  "data": {
    "copula": "clayton",
    "n_samples": 5000,
    "tail_dependence": {
      "upper": 0,
      "lower": 0.714
    },
    "sample_preview": [
      [
        0.234,
        0.567
      ],
      [
        0.891,
        0.123
      ],
      [
        0.456,
        0.789
      ]
    ]
  }
}

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
copula_type
enum<string>
required

Type of copula to use

Available options:
gaussian,
student_t,
clayton,
frank,
gumbel,
joe
Example:

"student_t"

correlation
number
default:0.5

Correlation parameter (for Gaussian/Student-t) or theta parameter (for Archimedean copulas)

Required range: -0.99 <= x <= 0.99
Example:

0.5

df
integer | null

Degrees of freedom for Student-t copula (required if copula_type is student_t)

Required range: x >= 2
Example:

5

n_samples
integer
default:1000

Number of samples to generate

Required range: x >= 100
Example:

1000

seed
integer | null

Random seed for reproducibility

Example:

42

Response

Copula samples generated successfully

success
boolean
Example:

true

data
object