# Entropic value at risk

In financial mathematics and stochastic optimization, the concept of risk measure is used to quantify the risk involved in a random outcome or risk position. Many risk measures have hitherto been proposed, each having certain characteristics. The entropic value at risk (EVaR) is a coherent risk measure introduced by Ahmadi-Javid, which is an upper bound for the value at risk (VaR) and the conditional value at risk (CVaR), obtained from the Chernoff inequality. The EVaR can also be represented by using the concept of relative entropy. Because of its connection with the VaR and the relative entropy, this risk measure is called "entropic value at risk". The EVaR was developed to tackle some computational inefficiencies of the CVaR. Getting inspiration from the dual representation of the EVaR, Ahmadi-Javid developed a wide class of coherent risk measures, called g-entropic risk measures. Both the CVaR and the EVaR are members of this class.

## Definition

Let $(\Omega ,{\mathcal {F}},P)$ be a probability space with $\Omega$ a set of all simple events, ${\mathcal {F}}$ a $\sigma$-algebra of subsets of $\Omega$ and $P$ a probability measure on ${\mathcal {F}}$. Let $X$ be a random variable and $\mathbf {L} _{M^{+}}$ be the set of all Borel measurable functions $X:\Omega \to \mathbb {R}$ whose moment-generating function $M_{X}(z)$ exists for all $z\geq 0$. The entropic value at risk (EVaR) of $X\in \mathbf {L} _{M^{+}}$ with confidence level $1-\alpha$ is defined as follows:
| ${\text{EVaR}}_{1-\alpha }(X):=\inf _{z>0}\left\{z^{-1}\ln \left({\frac {M_{X}(z)}{\alpha }}\right)\right\}.$ | (1) |
In finance, the random variable $X\in \mathbf {L} _{M^{+}},$ in the above equation, is used to model the losses of a portfolio.
Consider the Chernoff inequality
| $\Pr(X\geq a)\leq e^{-za}M_{X}(z),\quad \forall z>0.$ | (2) |
Solving the equation $e^{-za}M_{X}(z)=\alpha$ for $a,$ results in
    $a_{X}(\alpha ,z):=z^{-1}\ln \left({\frac {M_{X}(z)}{\alpha }}\right).$
By considering the equation (1), we see that
    ${\text{EVaR}}_{1-\alpha }(X):=\inf _{z>0}\{a_{X}(\alpha ,z)\},$
which shows the relationship between the EVaR and the Chernoff inequality. It is worth noting that $a_{X}(1,z)$ is the entropic risk measure or exponential premium, which is a concept used in finance and insurance, respectively.
Let $\mathbf {L} _{M}$ be the set of all Borel measurable functions $X:\Omega \to \mathbb {R}$ whose moment-generating function $M_{X}(z)$ exists for all $z$. The dual representation (or robust representation) of the EVaR is as follows:
| ${\text{EVaR}}_{1-\alpha }(X)=\sup _{Q\in \Im }(E_{Q}(X)),$ | (3) |
where $X\in \mathbf {L} _{M},$ and $\Im$ is a set of probability measures on $(\Omega ,{\mathcal {F}})$ with $\Im =\{Q\ll P:D_{KL}(Q||P)\leq -\ln \alpha \}$. Note that
    $D_{KL}(Q||P):=\int {\frac {dQ}{dP}}\left(\ln {\frac {dQ}{dP}}\right)dP$
is the relative entropy of $Q$ with respect to $P,$ also called the Kullback–Leibler divergence. The dual representation of the EVaR discloses the reason behind its naming.

## Properties

* The EVaR is a coherent risk measure.
* The moment-generating function $M_{X}(z)$ can be represented by the EVaR: for all $X\in \mathbf {L} _{M^{+}}$ and $z>0$
| $M_{X}(z)=\sup _{0<\alpha \leq 1}\{\alpha \exp(z{\text{EVaR}}_{1-\alpha }(X))\}.$ | (4) |
* For $X,Y\in \mathbf {L} _{M}$, ${\text{EVaR}}_{1-\alpha }(X)={\text{EVaR}}_{1-\alpha }(Y)$ for all $\alpha \in ]0,1]$ if and only if $F_{X}(b)=F_{Y}(b)$ for all $b\in \mathbb {R}$.
* The entropic risk measure with parameter $\theta ,$ can be represented by means of the EVaR: for all $X\in \mathbf {L} _{M^{+}}$ and $\theta >0$
| $\theta ^{-1}\ln M_{X}(\theta )=a_{X}(1,\theta )=\sup _{0<\alpha \leq 1}\{{\text{EVaR}}_{1-\alpha }(X)+\theta ^{-1}\ln \alpha \}.$ | (5) |
* The EVaR with confidence level $1-\alpha$ is the tightest possible upper bound that can be obtained from the Chernoff inequality for the VaR and the CVaR with confidence level $1-\alpha$;
| ${\text{VaR}}(X)\leq {\text{CVaR}}(X)\leq {\text{EVaR}}(X).$ | (6) |
* The following inequality holds for the EVaR:
| ${\text{E}}(X)\leq {\text{EVaR}}_{1-\alpha }(X)\leq {\text{esssup}}(X)$ | (7) |
    where ${\text{E}}(X)$ is the expected value of $X$ and ${\text{esssup}}(X)$ is the essential supremum of $X$, i.e., $\inf _{t\in \mathbb {R} }\{t:\Pr(X\leq t)=1\}$. So do hold ${\text{EVaR}}_{0}(X)={\text{E}}(X)$ and $\lim _{\alpha \to 0}{\text{EVaR}}_{1-\alpha }(X)={\text{esssup}}(X)$.

## Examples

For $X\sim N(\mu ,\sigma ^{2}),$
| ${\text{EVaR}}_{1-\alpha }(X)=\mu +\sigma {\sqrt {-2\ln \alpha }}.$ | (8) |
For $X\sim U(a,b),$
| ${\text{EVaR}}_{1-\alpha }(X)=\inf _{t>0}\left\lbrace t\ln \left(t{\frac {e^{t^{-1}b}-e^{t^{-1}a}}{b-a}}\right)-t\ln \alpha \right\rbrace .$ | (9) |
Figures 1 and 2 show the comparing of the VaR, CVaR and EVaR for $N(0,1)$ and $U(0,1)$.

## Optimization

Let $\rho$ be a risk measure. Consider the optimization problem
| $\min _{{\boldsymbol {w}}\in {\boldsymbol {W}}}\rho (G({\boldsymbol {w}},{\boldsymbol {\psi }})),$ | (10) |
where ${\boldsymbol {w}}\in {\boldsymbol {W}}\subseteq \mathbb {R} ^{n}$ is an $n$-dimensional real decision vector, ${\boldsymbol {\psi }}$ is an $m$-dimensional real random vector with a known probability distribution and the function $G({\boldsymbol {w}},.):\mathbb {R} ^{m}\to \mathbb {R}$ is a Borel measurable function for all values ${\boldsymbol {w}}\in {\boldsymbol {W}}.$ If $\rho ={\text{EVaR}},$ then the optimization problem (10) turns into:
| $\min _{{\boldsymbol {w}}\in {\boldsymbol {W}},t>0}\left\{t\ln M_{G({\boldsymbol {w}},{\boldsymbol {\psi }})}(t^{-1})-t\ln \alpha \right\}.$ | (11) |
Let ${\boldsymbol {S}}_{\boldsymbol {\psi }}$ be the support of the random vector ${\boldsymbol {\psi }}.$ If $G(.,{\boldsymbol {s}})$ is convex for all ${\boldsymbol {s}}\in {\boldsymbol {S}}_{\boldsymbol {\psi }}$, then the objective function of the problem (11) is also convex. If $G({\boldsymbol {w}},{\boldsymbol {\psi }})$ has the form
| $G({\boldsymbol {w}},{\boldsymbol {\psi }})=g_{0}({\boldsymbol {w}})+\sum _{i=1}^{m}g_{i}({\boldsymbol {w}})\psi _{i},\qquad g_{i}:\mathbb {R} ^{n}\to \mathbb {R} ,i=0,1,\ldots ,m,$ | (12) |
and $\psi _{1},\ldots ,\psi _{m}$ are independent random variables in $\mathbf {L} _{M}$, then (11) becomes
| $\min _{{\boldsymbol {w}}\in {\boldsymbol {W}},t>0}\left\lbrace g_{0}({\boldsymbol {w}})+t\sum _{i=1}^{m}\ln M_{g_{i}({\boldsymbol {w}})\psi _{i}}(t^{-1})-t\ln \alpha \right\rbrace .$ | (13) |
which is computationally tractable. But for this case, if one uses the CVaR in problem (10), then the resulting problem becomes as follows:
| $\min _{{\boldsymbol {w}}\in {\boldsymbol {W}},t\in \mathbb {R} }\left\lbrace t+{\frac {1}{\alpha }}{\text{E}}\left[g_{0}({\boldsymbol {w}})+\sum _{i=1}^{m}g_{i}({\boldsymbol {w}})\psi _{i}-t\right]_{+}\right\rbrace .$ | (14) |
It can be shown that by increasing the dimension of $\psi$, problem (14) is computationally intractable even for simple cases. For example, assume that $\psi _{1},\ldots ,\psi _{m}$ are independent discrete random variables that take $k$ distinct values. For fixed values of ${\boldsymbol {w}}$ and $t,$ the complexity of computing the objective function given in problem (13) is of order $mk$ while the computing time for the objective function of problem (14) is of order $k^{m}$. For illustration, assume that $k=2,m=100$ and the summation of two numbers takes $10^{-12}$ seconds. For computing the objective function of problem (14) one needs about $4\times 10^{10}$ years, whereas the evaluation of objective function of problem (13) takes about $10^{-10}$ seconds. This shows that formulation with the EVaR outperforms the formulation with the CVaR (see for more details).

## Generalization (g-entropic risk measures)

Drawing inspiration from the dual representation of the EVaR given in (3), one can define a wide class of information-theoretic coherent risk measures, which are introduced in. Let $g$ be a convex proper function with $g(1)=0$ and $\beta$ be a non-negative number. The $g$-entropic risk measure with divergence level $\beta$ is defined as
| ${\text{ER}}_{g,\beta }(X):=\sup _{Q\in \Im }{\text{E}}_{Q}(X)$ | (15) |
where $\Im =\{Q\ll P:H_{g}(P,Q)\leq \beta \}$ in which $H_{g}(P,Q)$ is the generalized relative entropy of $Q$ with respect to $P$. A primal representation of the class of $g$-entropic risk measures can be obtained as follows:
| ${\text{ER}}_{g,\beta }(X)=\inf _{t>0,\mu \in \mathbb {R} }\left\lbrace t\left[\mu +{\text{E}}_{P}\left(g^{*}\left({\frac {X}{t}}-\mu +\beta \right)\right)\right]\right\rbrace$ | (16) |
where $g^{*}$ is the conjugate of $g$. By considering
| $g(x)={\begin{cases}x\ln x&x>0\\0&x=0\\+\infty &x<0\end{cases}}$ | (17) |
with $g^{*}(x)=e^{x-1}$ and $\beta =-\ln \alpha$, the EVaR formula can be deduced. The CVaR is also a $g$-entropic risk measure, which can be obtained from (16) by setting
| $g(x)={\begin{cases}0&0\leq x\leq {\frac {1}{\alpha }}\\+\infty &{\text{otherwise}}\end{cases}}$ | (18) |
with $g^{*}(x)={\tfrac {1}{\alpha }}\max\{0,x\}$ and $\beta =0$ (see for more details).
For more results on $g$-entropic risk measures see.

## Disciplined Convex Programming Framework

The disciplined convex programming framework of sample EVaR was proposed by Cajas and has the following form:
| ${\begin{aligned}{\text{EVaR}}_{\alpha }(X)&=\left\{{\begin{array}{ll}{\underset {z,\,t,\,u}{\text{min}}}&t+z\ln \left({\frac {1}{\alpha T}}\right)\\{\text{s.t.}}&z\geq \sum _{j=1}^{T}u_{j}\\&(X_{j}-t,z,u_{j})\in K_{\text{exp}}\;\forall \;j=1,\ldots ,T\\\end{array}}\right.\end{aligned}}$ | (19) |
where $z$, $t$ and $u$ are variables; $K_{\text{exp}}$ is an exponential cone; and $T$ is the number of observations. If we define $w$ as the vector of weights for $N$ assets, $r$ the matrix of returns and $\mu$ the mean vector of assets, we can posed the minimization of the expected EVaR given a level of expected portfolio return ${\bar {\mu }}$ as follows.
| ${\begin{aligned}&{\underset {w,\,z,\,t,\,u}{\text{min}}}&&t+z\ln \left({\frac {1}{\alpha T}}\right)\\&{\text{s.t.}}&&\mu w^{\tau }\geq {\bar {\mu }}\\&&&\sum _{i=1}^{N}w_{i}=1\\&&&z\geq \sum _{j=1}^{T}u_{j}\\&&&(-r_{j}w^{\tau }-t,z,u_{j})\in K_{\text{exp}}\;\forall \;j=1,\ldots ,T\\&&&w_{i}\geq 0\;;\;\forall \;i=1,\ldots ,N\\\end{aligned}}$ | (20) |
Applying the disciplined convex programming framework of EVaR to uncompounded cumulative returns distribution, Cajas proposed the entropic drawdown at risk(EDaR) optimization problem. We can posed the minimization of the expected EDaR given a level of expected return ${\bar {\mu }}$ as follows:
| ${\begin{aligned}&{\underset {w,\,z,\,t,\,u,\,d}{\text{min}}}&&t+z\ln \left({\frac {1}{\alpha T}}\right)\\&{\text{s.t.}}&&\mu w^{\tau }\geq {\bar {\mu }}\\&&&\sum _{i=1}^{N}w_{i}=1\\&&&z\geq \sum _{j=1}^{T}u_{j}\\&&&(d_{j}-R_{j}w^{\tau }-t,z,u_{j})\in K_{\text{exp}}\;\forall \;j=1,\ldots ,T\\&&&d_{j}\geq R_{j}w^{\tau }\;\forall \;j=1,\ldots ,T\\&&&d_{j}\geq d_{j-1}\;\forall \;j=1,\ldots ,T\\&&&d_{j}\geq 0\;\forall \;j=1,\ldots ,T\\&&&d_{0}=0\\&&&w_{i}\geq 0\;;\;\forall \;i=1,\ldots ,N\\\end{aligned}}$ | (21) |
where $d$ is a variable that represent the uncompounded cumulative returns of portfolio and $R$ is the matrix of uncompounded cumulative returns of assets.
For other problems like risk parity, maximization of return/risk ratio or constraints on maximum risk levels for EVaR and EDaR, you can see for more details.
The advantage of model EVaR and EDaR using a disciplined convex programming framework, is that we can use softwares like CVXPY or MOSEK to model this portfolio optimization problems. EVaR and EDaR are implemented in the python package Riskfolio-Lib.