Calculate the certainty equivalent (CE) of a risky lottery: the guaranteed amount that yields the same utility as the risky prospect. CE solves U(CE) = E[U(X)] where X is the random outcome. For risk-averse individuals, CE < E[X] (expected value). The difference E[X] - CE is the risk premium. Returns the certain wealth equivalent to the lottery. Use for valuing risky assets and insurance.
API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register
Type of utility function to use
cara, crra, log "crra"
Possible wealth outcomes
1[8000, 12000]Utility function parameter (risk_aversion for CARA, gamma for CRRA, unused for log)
2
Probabilities for each outcome (must sum to 1, if null uses uniform)
0 <= x <= 1[0.5, 0.5]