Learn R Programming

GE (version 0.1.1)

CRRA: Constant Relative Risk Aversion (CRRA) Utility Function

Description

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

Usage

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

Arguments

x

a vector of all possible states (e.g. returns).

gamma

the relative risk aversion coefficient.

p

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

Value

A list consisting of the value and the certainty equivalent.

Examples

Run this code
# NOT RUN {
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
# }

Run the code above in your browser using DataLab