Skip to main content
POST
/
quantlib
/
economics
/
equilibrium
/
ces
CES Consumer Demand
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/economics/equilibrium/ces \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "rho": -0.5,
  "weights": [
    0.5,
    0.5
  ],
  "income": 1000,
  "prices": [
    10,
    5
  ]
}
'
{
  "success": true,
  "data": {
    "demand": [
      41.42,
      117.16
    ],
    "utility": 75.45,
    "elasticity_of_substitution": 0.667
  }
}

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
rho
number
required

Substitution parameter (rho = (sigma-1)/sigma where sigma is elasticity of substitution). rho < 1 for substitutes, rho = 0 for Cobb-Douglas, rho → -∞ for Leontief.

Example:

-0.5

weights
number[]
required

Share parameters for the two goods [w1, w2]

Required array length: 2 elements
Required range: x >= 0
Example:
[0.5, 0.5]
income
number
required

Consumer's total income or budget

Required range: x >= 0
Example:

1000

prices
number[]
required

Prices of the two goods [p1, p2]

Required array length: 2 elements
Required range: x >= 0
Example:
[10, 5]

Response

Successful Response

success
boolean
Example:

true

data
object