Skip to main content
POST
/
quantlib
/
risk
/
portfolio-risk
/
optimal-hedge
Calculate Optimal Hedge Ratio
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/risk/portfolio-risk/optimal-hedge \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "returns": [
    0.015,
    -0.022,
    0.018,
    -0.025,
    0.012,
    -0.015
  ],
  "hedge_returns": [
    -0.012,
    0.019,
    -0.015,
    0.021,
    -0.01,
    0.013
  ]
}
'
{
  "success": true,
  "data": {
    "optimal_hedge_ratio": -0.87
  }
}

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

Historical returns of asset to be hedged

Example:
[0.02, -0.03, 0.01, -0.02]
hedge_returns
number[]
required

Historical returns of hedging instrument

Example:
[-0.018, 0.028, -0.009, 0.019]

Response

Optimal hedge ratio

success
boolean
Example:

true

data
object