CRRA: Constant Relative Risk Aversion (CRRA) Utility Function

View source: R/CRRA.R

CRRAR Documentation

Constant Relative Risk Aversion (CRRA) Utility Function

Description

Compute the value and the certainty equivalent of the CRRA utility function.

Usage

CRRA(x, gamma, prob = rep(1/length(x), length(x)))

Arguments

x

a payoff k-vector.

gamma

the relative risk aversion coefficient.

prob

a probability k-vector. By default, the states are assumed to occur with equal probability.

Value

A list containing the following components:

  • u: the utility level.

  • CE: the certainty equivalent.

Examples

csv <- 0.05 # coefficient of standard deviation
mu <- 90 # mu <- 100
sigma <- mu * csv
x <- seq(mu - 5 * sigma, mu + 5 * sigma, length.out = 10000)
pd <- dnorm(x, mean = mu, sd = sigma)
gamma <- 0.8
# the ratio of risk premium to expected return (i.e. the relative risk premium).
(mu - CRRA(x, gamma, pd)$CE) / mu

####
df <- apply_expand.grid(
  function(arg) {
    CRRA(arg["x"], arg["gamma"])$u
  },
  x = seq(0.5, 3, 0.1),
  gamma = c(0.5, 1, 2, 3)
)
coplot(result ~ x | as.factor(gamma), data = df)

GE documentation built on Nov. 8, 2023, 9:07 a.m.

Related to CRRA in GE...