User:Sarykalin


 * [[$$   \mu_{X \cup Y} = \frac{1}{N_{X \cup Y}}\left(N_X\mu_X + N_Y\mu_Y - N_{X\cap Y}\mu_{X\cap Y}\right)\end{align}$$
 * [[$$|\begin{align}

\sigma_{X \cup Y} &= \sqrt{ \frac{1}{N_{X \cup Y} - 1}\left([N_X - 1]\sigma_X^2 + N_X\mu_X^2 + [N_Y - 1]\sigma_Y^2 + N_Y\mu _Y^2 - [N_{X \cap Y}-1]\sigma_{X \cap Y}^2 - N_{X \cap Y}\mu_{X \cap Y}^2 - [N_X + N_Y - N_{X \cap Y}]\mu_{X \cup Y}^2\right)  } \end{align}$$]]

In engineering, Conditional Value-at-Risk (CVaR) is a concept frequently used to quantify tails of distributions. CVaR is also called Expected Shortfall or Expected Tail Loss. Unlike the article on Expected Shortfall, which defines CVaR of gain as is common in the financial world, this article provides an engineering view on CVaR in the following way. First, definitions and axioms of CVaR are given for loss distributions. Second, with some details on measurment of CVaR, we primarily focus on management of CVaR in engineering, which includes optimization properties, definitions of CVaR-risk and CVaR-deviation and relationships between them and other related concepts.

For continuous distributions, CVaR with the confidence level &alpha; is equal to the average of &alpha;% highest losses. However the general definition of CVaR is more complex.

The idea of averaging certain percentage of worst scenarios has been used for a long time. However, the usage of this concept in financial and risk management setting is relatively new. The term Conditional Value-at-Risk was introduced first in the paper by Rockafellar and Uryasev. The idea of this term is to underline relation of CVaR with value-at-risk (VaR), since for continuous loss distributions CVaR is an average of losses exceeding VaR.

The importance of CVaR is in the fact that it relates two important concepts, maximum loss and average loss. CVaR with extreme values of the threshold is equivalent to either maximum loss (&alpha; = 0%) or to average loss (&alpha; = 100%). Values of &alpha; in between produce various values of CVaR.

Definition
Let X be a random loss function with the cumulative distribution function FX(z)=P{X &le; z}. If X has a continuous probability distribution then CVaR&alpha;(X) equals the conditional expectation of X subject to X &ge; VaR&alpha;(X).


 * $$\mathrm{CVaR}_{\,\alpha}(X)=E[X | X \geq \mathrm{VaR}_{\,\alpha}(X)], \,\!$$

where VaR&alpha;(X) = min{z | FX(z) &ge; &alpha;} is value-at-risk of X with confidence level &alpha;, or &alpha;-quantile of the loss distribution.



In general, CVaR&alpha;(X) is equal to the mean of the generalized &alpha;-tail distribution:


 * $$ \mathrm{CVaR}_{\,\alpha}(X) = \int_{-\infty}^{\infty} z \, dF^{\alpha}_{X}(z),$$

where
 * $$ F^{\alpha}_{X}(z) = \begin{cases} 0, & \text{when }z < \mathrm{VaR}_{\,\alpha}(X), \\

\frac{F_{X}(z)-\alpha}{1-\alpha}, & \text{when }z \geq \mathrm{VaR}_{\,\alpha}(X) \end{cases}$$

Formula for calculation of CVaR in the general case:
 * $$ \mathrm{CVaR}_{\,\alpha}(X) = \lambda_{\,\alpha}(X) \,

\mathrm{VaR}_{\,\alpha}(X) + (1-\lambda_{\,\alpha}(X)) \, \mathrm{CVaR}_{\,\alpha}^+(X),$$ where
 * $$\lambda_{\,\alpha}(X) = \frac{F_X(\mathrm{VaR}_{\,\alpha}(X))-\alpha}{1-\alpha}$$

and
 * $$\mathrm{CVaR}_{\,\alpha}^+(X) = E[X\, | \, X > \mathrm{VaR}_{\,\alpha}(X)].$$

If FX(VaR&alpha;(X))=1, so that VaR&alpha;(X) is the highest loss that can occur, then CVaR&alpha;(X)=VaR&alpha;(X).

Other definitions of CVaR include


 * $$\mathrm{CVaR}_{\,\alpha}(X) = \min_{C} \left\{ C + \frac{1}{1-\alpha} \, E[X - C]^+\right\},\,\, \text{where }[t]^+ = \max\{0,t\} $$

and


 * $$\mathrm{CVaR}_{\,\alpha}(X) = \cfrac{1}{\alpha} \int_0^{\alpha}\mathrm{VaR}_{\,\beta}(X)\,d\beta \,.$$

Calculation Examples
The main difficulty of calculating CVaR in the general case is that one may need to slit a probability atom. For example, when the distribution is modelled by scenarios, CVaR may be obtained by averaging a fractional number of scenarios.

For illustration of CVaR calculation, suppose 5 equally likely scenarios with losses f1,...,f5, assuming that f1 &le; ... &le; f5. CVaR with confidence level &alpha; is calculated by taking an average of (1-&alpha;)% highest losses possibly using a fraction of one of scenarios. The part of the loss distribution between levels 1 and 1-&alpha; is rescaled so that is spans the full probability of 100%.



For &alpha;1=60%, CVaR60%(X) is the average of 1-&alpha;1=40% highest losses, which is the average of the last two scenarios.


 * $$ \mathrm{CVaR}_{\,60\%}(X) = \frac{20\% f_5 + 20\% f_6}{20\% + 20\%}=\frac{f_5+f_6}{2}. $$



For &alpha;2=55%, CVaR55%(X) is the average of 1-&alpha;2=45% highest losses. This is the case when a probability atom is spit at loss f3. CVaR is a weighted sum of f5, f4, and f3, where f5 and f4 contribute with their full probability of 20% and f3 contributes with only 60%-&alpha;2=5% instead of its full probability.


 * $$ \mathrm{CVaR}_{\,55\%}(X) = \frac{5\% f_{3}+ 20\% f_{5} + 20\% f_{6}}{5\%+20\%+20\%} $$



Finally, for &alpha;3=95%, CVaR95%(X) is the average of 1-&alpha;3=5% of highest losses. Since only f5 is contributing to the average with the probability 5%.


 * $$ \mathrm{CVaR}_{\,95\%}(X) = \frac{5\% f_5}{5\%} = f_5. $$



CVaR-risk and CVaR-deviation
In the above definition, CVaR&alpha;(X) defined above measures losses versus zero. In this sense, it is a risk measure. One should tell apart CVaR-risk and CVaR-deviation. CVaR-deviation CVaR&Delta;&alpha;(X) measures losses versus mean value of the distribution.
 * $$ \mathrm{CVaR}^{\Delta}_{\alpha}(X)=\mathrm{CVaR}_{\,\alpha}(X-EX) \;. \!$$

The reverse relationship is
 * $$ \mathrm{CVaR}_{\,\alpha}(X)=\mathrm{CVaR}^{\Delta}_{\alpha}(X)+EX \;. \!$$

CVaR-risk is a coherent risk measure. CVaR-deviation is a coherent deviation measure.

Optimization
CVaR can be effectively optimized and constrained. Consider a random loss function $f(x,y)$ depending upon the decision vector x and a random vector y of risk factors. For instance, f(x,y)=-(y1x1+y2x2) is the negative return of a portfolio involving two instruments. Here x1,x2 are positions and y1,y2 are rates of returns of two instruments in the portfolio. The function
 * $$ \mathrm{F}_{\alpha}(x,\zeta)=\zeta+\frac{1}{1-\alpha}E\{[f(x,y)-\zeta]^{+}\} \;, \zeta \in \mathbf{R},\! $$

can be used instead of CVaR.

Function F&alpha;(x,&zeta;) has the following properties.
 * F&alpha;(x,&zeta;) is convex with respect to &alpha;,
 * VaR&alpha;(x) is a minimum point of function F&alpha;(x,&zeta;) with respect to &zeta;,
 * When F&alpha;(x,&zeta;) is minimized with respect to &zeta;, it is equal to CVaR&alpha;(x) at optimality.


 * $$ \mathrm{CVaR}_{\,\alpha}(x)=\min_{\alpha}F_{\alpha}(x,\zeta)\;.$$

In optimization problems, CVaR can enter into the objective or constraints or both. A big advantage of CVaR over VaR in this context is the preservation of convexity, i.e., if f(x,y) is convex in x than CVaR&alpha;(x) is convex in x. Moreover, if f(x,y) is convex in x then the function F&alpha;(x,&zeta;) is convex in both x and &zeta;. This convexity is valuable because minimizing F&alpha;(x,&zeta;) over (x,&zeta;) &isin; X&times;R, results in minimizing CVaR&alpha;(x)


 * $$ \min_{x \in X} \mathrm{CVaR}_{\,\alpha}(x)=\min_{(x,\zeta) \in X \times \Re}F_{\alpha}(x,\zeta) \;, $$

where X is a feasible set for x.

In addition, if (x*,&zeta;*) minimizes F&alpha;(x,&zeta;) over X&times;R, then not only does x* minimize CVaR&alpha;(x) over X but also


 * $$ \mathrm{CVaR}_{\,\alpha}(x^{*})=F_{\alpha}(x^{*},\zeta^{*})\;.$$

In risk management CVaR can be utilized to "shape" the risk in an optimization model. For that purpose, several confidence levels can be specified. For any selection of confidence levels &alpha;i and loss tolerances &omega;i, i=1,...,l, the problem


 * $$ \min\limits_{x \in X} \,g(x) \text{  subject to } \mathrm{CVaR}_{\alpha_{i}}(x) \leq \omega_{i},\, i=1,...,l, $$

is equivalent to the problem


 * $$ \min\limits_{(x, \zeta_{1},..,\zeta_{l}) \in X \times \Re \times...\times\Re} \,g(x)  \text{  subject to } F_{\alpha_{i}}(x,\zeta_{i}) \leq \omega_{i} \,\,, \quad i=1,...,l. $$

When the feasible set X and the function g are convex and f(x,y) is convex in x, the above optimization problems are ones of convex programming and are especially favorable for computation. When Y is a discrete probability space with elements yk having probabilities pk, k=1,..,N, then F&alpha;(x,&zeta;) has the form


 * $$ F_{\alpha_{i}}(x,\zeta_{i})=\zeta_{i}+ \frac{1}{1-\alpha_{i}}\sum_{k=1}^{N}p_{k}[f(x,y_{k})-\zeta_{i}]^{+}. $$

The constraint F&alpha;(x,&zeta;) &le; &omega; can be replaced by a system of inequalities by introducing additional variables &eta;k.
 * $$ \eta_{k} \geq 0, \, f(x,y_{k})-\zeta-\eta_{k} \leq 0, \, k=1,..,N ,$$


 * $$ \zeta+ \frac{1}{1-\alpha}\sum_{k=1}^{N}p_{k}\eta_{k} \leq \omega \; .$$

The minimization problem in ??? can be converted into the minimization of g(x) with the constraints F&alpha; i (x, &zeta;i) &le; &omega;i being replaced as presented in ???. When fuctionf is linear in x, ???? constraints are linear.