I am supposed to calculate the value at risk and expected shortfall of an asset with revenue given by a density function: $f(x)=0.5\exp{(-|x-0.05|)}$.
My workings:
If I understand it correctly, than $VaR_\alpha=F^{-1}(\alpha)$. Thus I need to compute the distribution function:
For $x_1<0.05$ $$\int^{x_1}_{-\infty}\frac12 e^xe^{-0.05}dx=\frac12e^{-0.05}e^{x_1}$$
For $x_2\geq 0.05$ $$ \frac12+\int^{x_2}_{0.05}f(x)dx=1-\int^{\infty}_{x_2}\frac12e^{-x}e^{0.05}dx= 1-\frac12e^{0.05}e^{-x_2} $$
Thus, for $y<\frac12$, $VaR_\alpha=\log{2\alpha e^{0.05}}$ and for $y\geq\frac12$, $VaR_\alpha=\log{\frac{e^{0.05}}{2(1-\alpha)}}$
Now, again, if I understand it correctly (and this time I really am not sure) $$CVaR_\alpha=\frac{1}{1-\alpha}\int^{\infty}_{VaR_\alpha} xf(x)dx$$
This is where I'd like to stop and check with Math.SE.
My questions:
- Is this correct, so far?
- Is the CVaR formula correct?
- Is there any good text about CVaR on the internet? I've been unable to find one that'd treat the subject more mathematically. Especially an example including a density function would be very helpful.
Thank you for help.