Questions on the Mathematics behind Expected Shortfall and Value at Risk











up vote
0
down vote

favorite












I have a couple questions on the mathematics behind some general value at risk (VaR) and expected shortfall (ES) calculations.
$$
P(L > VaR(alpha))=alpha
$$

$$
ES(alpha)=E[L|L > VaR(alpha)]
$$





First, I need to find that, for distribution $R$ with pdf $f$ ,
$$
ES(alpha) = frac{-S_0}{alpha}int^{q_alpha}_{-infty}rf(r)dr
$$

I have done the following
$$
ES(alpha) = E[L|L>VaR(alpha)] = E[-S_0R|L>VaR(alpha)]
$$

$$
= int^{q_alpha}_{-infty}-S_0rfrac{P(R=r)}{P(L>VaR(alpha))}dr
= -S_0int^{q_alpha}_{-infty}rfrac{f(r)}{alpha}dr
= frac{-S_0}{alpha}int^{q_alpha}_{-infty}rf(r)dr
$$

I understand this for the most part, but I am somewhat confused as to how the $q_alpha$ comes into the fray?





Second, I need to find that, for distribution $Rsim N(mu, sigma^2)$,
$$
ES(alpha)=-S_0left(mu-frac{sigma}{alphasqrt{2pi}}e^{frac{-z^2_alpha}{2}}right)
$$

where $z_alpha$ is the $alpha$th quantile of $N(0,1)$. I assume that I follow from where the first part left off and use the normal distribution pdf in place of $f(r)$ such that
$$
ES(alpha)= frac{-S_0}{alpha}int^{q_alpha}_{-infty}rfrac{1}{sqrt{2pisigma^2}}e^{frac{-(r-mu)^2}{2sigma^2}}dr
$$

where $frac{(r-mu)^2}{sigma^2}=z^2$. However, how this would connect back to the given $ES(alpha)$ is very unclear to me.










share|cite|improve this question


























    up vote
    0
    down vote

    favorite












    I have a couple questions on the mathematics behind some general value at risk (VaR) and expected shortfall (ES) calculations.
    $$
    P(L > VaR(alpha))=alpha
    $$

    $$
    ES(alpha)=E[L|L > VaR(alpha)]
    $$





    First, I need to find that, for distribution $R$ with pdf $f$ ,
    $$
    ES(alpha) = frac{-S_0}{alpha}int^{q_alpha}_{-infty}rf(r)dr
    $$

    I have done the following
    $$
    ES(alpha) = E[L|L>VaR(alpha)] = E[-S_0R|L>VaR(alpha)]
    $$

    $$
    = int^{q_alpha}_{-infty}-S_0rfrac{P(R=r)}{P(L>VaR(alpha))}dr
    = -S_0int^{q_alpha}_{-infty}rfrac{f(r)}{alpha}dr
    = frac{-S_0}{alpha}int^{q_alpha}_{-infty}rf(r)dr
    $$

    I understand this for the most part, but I am somewhat confused as to how the $q_alpha$ comes into the fray?





    Second, I need to find that, for distribution $Rsim N(mu, sigma^2)$,
    $$
    ES(alpha)=-S_0left(mu-frac{sigma}{alphasqrt{2pi}}e^{frac{-z^2_alpha}{2}}right)
    $$

    where $z_alpha$ is the $alpha$th quantile of $N(0,1)$. I assume that I follow from where the first part left off and use the normal distribution pdf in place of $f(r)$ such that
    $$
    ES(alpha)= frac{-S_0}{alpha}int^{q_alpha}_{-infty}rfrac{1}{sqrt{2pisigma^2}}e^{frac{-(r-mu)^2}{2sigma^2}}dr
    $$

    where $frac{(r-mu)^2}{sigma^2}=z^2$. However, how this would connect back to the given $ES(alpha)$ is very unclear to me.










    share|cite|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a couple questions on the mathematics behind some general value at risk (VaR) and expected shortfall (ES) calculations.
      $$
      P(L > VaR(alpha))=alpha
      $$

      $$
      ES(alpha)=E[L|L > VaR(alpha)]
      $$





      First, I need to find that, for distribution $R$ with pdf $f$ ,
      $$
      ES(alpha) = frac{-S_0}{alpha}int^{q_alpha}_{-infty}rf(r)dr
      $$

      I have done the following
      $$
      ES(alpha) = E[L|L>VaR(alpha)] = E[-S_0R|L>VaR(alpha)]
      $$

      $$
      = int^{q_alpha}_{-infty}-S_0rfrac{P(R=r)}{P(L>VaR(alpha))}dr
      = -S_0int^{q_alpha}_{-infty}rfrac{f(r)}{alpha}dr
      = frac{-S_0}{alpha}int^{q_alpha}_{-infty}rf(r)dr
      $$

      I understand this for the most part, but I am somewhat confused as to how the $q_alpha$ comes into the fray?





      Second, I need to find that, for distribution $Rsim N(mu, sigma^2)$,
      $$
      ES(alpha)=-S_0left(mu-frac{sigma}{alphasqrt{2pi}}e^{frac{-z^2_alpha}{2}}right)
      $$

      where $z_alpha$ is the $alpha$th quantile of $N(0,1)$. I assume that I follow from where the first part left off and use the normal distribution pdf in place of $f(r)$ such that
      $$
      ES(alpha)= frac{-S_0}{alpha}int^{q_alpha}_{-infty}rfrac{1}{sqrt{2pisigma^2}}e^{frac{-(r-mu)^2}{2sigma^2}}dr
      $$

      where $frac{(r-mu)^2}{sigma^2}=z^2$. However, how this would connect back to the given $ES(alpha)$ is very unclear to me.










      share|cite|improve this question













      I have a couple questions on the mathematics behind some general value at risk (VaR) and expected shortfall (ES) calculations.
      $$
      P(L > VaR(alpha))=alpha
      $$

      $$
      ES(alpha)=E[L|L > VaR(alpha)]
      $$





      First, I need to find that, for distribution $R$ with pdf $f$ ,
      $$
      ES(alpha) = frac{-S_0}{alpha}int^{q_alpha}_{-infty}rf(r)dr
      $$

      I have done the following
      $$
      ES(alpha) = E[L|L>VaR(alpha)] = E[-S_0R|L>VaR(alpha)]
      $$

      $$
      = int^{q_alpha}_{-infty}-S_0rfrac{P(R=r)}{P(L>VaR(alpha))}dr
      = -S_0int^{q_alpha}_{-infty}rfrac{f(r)}{alpha}dr
      = frac{-S_0}{alpha}int^{q_alpha}_{-infty}rf(r)dr
      $$

      I understand this for the most part, but I am somewhat confused as to how the $q_alpha$ comes into the fray?





      Second, I need to find that, for distribution $Rsim N(mu, sigma^2)$,
      $$
      ES(alpha)=-S_0left(mu-frac{sigma}{alphasqrt{2pi}}e^{frac{-z^2_alpha}{2}}right)
      $$

      where $z_alpha$ is the $alpha$th quantile of $N(0,1)$. I assume that I follow from where the first part left off and use the normal distribution pdf in place of $f(r)$ such that
      $$
      ES(alpha)= frac{-S_0}{alpha}int^{q_alpha}_{-infty}rfrac{1}{sqrt{2pisigma^2}}e^{frac{-(r-mu)^2}{2sigma^2}}dr
      $$

      where $frac{(r-mu)^2}{sigma^2}=z^2$. However, how this would connect back to the given $ES(alpha)$ is very unclear to me.







      integration probability-distributions normal-distribution






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Nov 16 at 1:03









      strwars

      346




      346






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          For the first part, you are conditioning on on $L>VaR(alpha),$ which means $R<q_alpha.$ The density of $R,$ conditional on $R<q_alpha$ is zero for $R>q_alpha,$ so when you integrate over it to get the conditional expectation, the integral cuts off at $q_alpha.$ You are correct that the conditional density is given by $frac{f(r)}{alpha}$ for $r<q_alpha,$ and your line of reasoning to derive the formula looks mostly right, except that $P(R=r)$ is not the same thing as the density $f(r)$ (in fact $P(R=r)=0$ for any $r$ assuming the distribution is continuous).



          For the second part, you are right that you just need to plug the normal distribution. As for where to go from there, you have to compute the integral. To do this, substitute $u=(r-mu)/sigma$ and get $$ frac{-S_0}{alpha}int^{q_alpha}_{-infty}rfrac{1}{sqrt{2pisigma^2}}e^{frac{-(r-mu)^2}{2sigma^2}}dr = frac{-S_0}{alpha}int^{z_alpha}_{-infty}(mu+sigma u)frac{1}{sqrt{2pi}}e^{frac{-u^2}{2}}du\=-frac{S_0mu}{alpha}int_{-infty}^{z_alpha}frac{1}{sqrt{2pi}}e^{-u^2/2}du -frac{S_0sigma}{alphasqrt{2pi}}int_{-infty}^{z_alpha} ue^{-u^2/2}du$$ where we used the fact that $z_alpha=(q_alpha-mu)/sigma.$
          The first integral is $alpha$ by definition and the second can be done with a substitution.






          share|cite|improve this answer























          • So would you say it is more accurate to use $= frac{int^{infty}_{-infty}-S_0rf(r)dr}{P(L>VaR(alpha))}$ than the $P(R=r)$ above?
            – strwars
            Nov 16 at 14:55












          • @strwars Sure, just replace $P(R=r)$ with $f(r).$
            – spaceisdarkgreen
            Nov 16 at 15:09











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "69"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3000574%2fquestions-on-the-mathematics-behind-expected-shortfall-and-value-at-risk%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          For the first part, you are conditioning on on $L>VaR(alpha),$ which means $R<q_alpha.$ The density of $R,$ conditional on $R<q_alpha$ is zero for $R>q_alpha,$ so when you integrate over it to get the conditional expectation, the integral cuts off at $q_alpha.$ You are correct that the conditional density is given by $frac{f(r)}{alpha}$ for $r<q_alpha,$ and your line of reasoning to derive the formula looks mostly right, except that $P(R=r)$ is not the same thing as the density $f(r)$ (in fact $P(R=r)=0$ for any $r$ assuming the distribution is continuous).



          For the second part, you are right that you just need to plug the normal distribution. As for where to go from there, you have to compute the integral. To do this, substitute $u=(r-mu)/sigma$ and get $$ frac{-S_0}{alpha}int^{q_alpha}_{-infty}rfrac{1}{sqrt{2pisigma^2}}e^{frac{-(r-mu)^2}{2sigma^2}}dr = frac{-S_0}{alpha}int^{z_alpha}_{-infty}(mu+sigma u)frac{1}{sqrt{2pi}}e^{frac{-u^2}{2}}du\=-frac{S_0mu}{alpha}int_{-infty}^{z_alpha}frac{1}{sqrt{2pi}}e^{-u^2/2}du -frac{S_0sigma}{alphasqrt{2pi}}int_{-infty}^{z_alpha} ue^{-u^2/2}du$$ where we used the fact that $z_alpha=(q_alpha-mu)/sigma.$
          The first integral is $alpha$ by definition and the second can be done with a substitution.






          share|cite|improve this answer























          • So would you say it is more accurate to use $= frac{int^{infty}_{-infty}-S_0rf(r)dr}{P(L>VaR(alpha))}$ than the $P(R=r)$ above?
            – strwars
            Nov 16 at 14:55












          • @strwars Sure, just replace $P(R=r)$ with $f(r).$
            – spaceisdarkgreen
            Nov 16 at 15:09















          up vote
          1
          down vote



          accepted










          For the first part, you are conditioning on on $L>VaR(alpha),$ which means $R<q_alpha.$ The density of $R,$ conditional on $R<q_alpha$ is zero for $R>q_alpha,$ so when you integrate over it to get the conditional expectation, the integral cuts off at $q_alpha.$ You are correct that the conditional density is given by $frac{f(r)}{alpha}$ for $r<q_alpha,$ and your line of reasoning to derive the formula looks mostly right, except that $P(R=r)$ is not the same thing as the density $f(r)$ (in fact $P(R=r)=0$ for any $r$ assuming the distribution is continuous).



          For the second part, you are right that you just need to plug the normal distribution. As for where to go from there, you have to compute the integral. To do this, substitute $u=(r-mu)/sigma$ and get $$ frac{-S_0}{alpha}int^{q_alpha}_{-infty}rfrac{1}{sqrt{2pisigma^2}}e^{frac{-(r-mu)^2}{2sigma^2}}dr = frac{-S_0}{alpha}int^{z_alpha}_{-infty}(mu+sigma u)frac{1}{sqrt{2pi}}e^{frac{-u^2}{2}}du\=-frac{S_0mu}{alpha}int_{-infty}^{z_alpha}frac{1}{sqrt{2pi}}e^{-u^2/2}du -frac{S_0sigma}{alphasqrt{2pi}}int_{-infty}^{z_alpha} ue^{-u^2/2}du$$ where we used the fact that $z_alpha=(q_alpha-mu)/sigma.$
          The first integral is $alpha$ by definition and the second can be done with a substitution.






          share|cite|improve this answer























          • So would you say it is more accurate to use $= frac{int^{infty}_{-infty}-S_0rf(r)dr}{P(L>VaR(alpha))}$ than the $P(R=r)$ above?
            – strwars
            Nov 16 at 14:55












          • @strwars Sure, just replace $P(R=r)$ with $f(r).$
            – spaceisdarkgreen
            Nov 16 at 15:09













          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          For the first part, you are conditioning on on $L>VaR(alpha),$ which means $R<q_alpha.$ The density of $R,$ conditional on $R<q_alpha$ is zero for $R>q_alpha,$ so when you integrate over it to get the conditional expectation, the integral cuts off at $q_alpha.$ You are correct that the conditional density is given by $frac{f(r)}{alpha}$ for $r<q_alpha,$ and your line of reasoning to derive the formula looks mostly right, except that $P(R=r)$ is not the same thing as the density $f(r)$ (in fact $P(R=r)=0$ for any $r$ assuming the distribution is continuous).



          For the second part, you are right that you just need to plug the normal distribution. As for where to go from there, you have to compute the integral. To do this, substitute $u=(r-mu)/sigma$ and get $$ frac{-S_0}{alpha}int^{q_alpha}_{-infty}rfrac{1}{sqrt{2pisigma^2}}e^{frac{-(r-mu)^2}{2sigma^2}}dr = frac{-S_0}{alpha}int^{z_alpha}_{-infty}(mu+sigma u)frac{1}{sqrt{2pi}}e^{frac{-u^2}{2}}du\=-frac{S_0mu}{alpha}int_{-infty}^{z_alpha}frac{1}{sqrt{2pi}}e^{-u^2/2}du -frac{S_0sigma}{alphasqrt{2pi}}int_{-infty}^{z_alpha} ue^{-u^2/2}du$$ where we used the fact that $z_alpha=(q_alpha-mu)/sigma.$
          The first integral is $alpha$ by definition and the second can be done with a substitution.






          share|cite|improve this answer














          For the first part, you are conditioning on on $L>VaR(alpha),$ which means $R<q_alpha.$ The density of $R,$ conditional on $R<q_alpha$ is zero for $R>q_alpha,$ so when you integrate over it to get the conditional expectation, the integral cuts off at $q_alpha.$ You are correct that the conditional density is given by $frac{f(r)}{alpha}$ for $r<q_alpha,$ and your line of reasoning to derive the formula looks mostly right, except that $P(R=r)$ is not the same thing as the density $f(r)$ (in fact $P(R=r)=0$ for any $r$ assuming the distribution is continuous).



          For the second part, you are right that you just need to plug the normal distribution. As for where to go from there, you have to compute the integral. To do this, substitute $u=(r-mu)/sigma$ and get $$ frac{-S_0}{alpha}int^{q_alpha}_{-infty}rfrac{1}{sqrt{2pisigma^2}}e^{frac{-(r-mu)^2}{2sigma^2}}dr = frac{-S_0}{alpha}int^{z_alpha}_{-infty}(mu+sigma u)frac{1}{sqrt{2pi}}e^{frac{-u^2}{2}}du\=-frac{S_0mu}{alpha}int_{-infty}^{z_alpha}frac{1}{sqrt{2pi}}e^{-u^2/2}du -frac{S_0sigma}{alphasqrt{2pi}}int_{-infty}^{z_alpha} ue^{-u^2/2}du$$ where we used the fact that $z_alpha=(q_alpha-mu)/sigma.$
          The first integral is $alpha$ by definition and the second can be done with a substitution.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Nov 16 at 4:54

























          answered Nov 16 at 2:01









          spaceisdarkgreen

          31.6k21552




          31.6k21552












          • So would you say it is more accurate to use $= frac{int^{infty}_{-infty}-S_0rf(r)dr}{P(L>VaR(alpha))}$ than the $P(R=r)$ above?
            – strwars
            Nov 16 at 14:55












          • @strwars Sure, just replace $P(R=r)$ with $f(r).$
            – spaceisdarkgreen
            Nov 16 at 15:09


















          • So would you say it is more accurate to use $= frac{int^{infty}_{-infty}-S_0rf(r)dr}{P(L>VaR(alpha))}$ than the $P(R=r)$ above?
            – strwars
            Nov 16 at 14:55












          • @strwars Sure, just replace $P(R=r)$ with $f(r).$
            – spaceisdarkgreen
            Nov 16 at 15:09
















          So would you say it is more accurate to use $= frac{int^{infty}_{-infty}-S_0rf(r)dr}{P(L>VaR(alpha))}$ than the $P(R=r)$ above?
          – strwars
          Nov 16 at 14:55






          So would you say it is more accurate to use $= frac{int^{infty}_{-infty}-S_0rf(r)dr}{P(L>VaR(alpha))}$ than the $P(R=r)$ above?
          – strwars
          Nov 16 at 14:55














          @strwars Sure, just replace $P(R=r)$ with $f(r).$
          – spaceisdarkgreen
          Nov 16 at 15:09




          @strwars Sure, just replace $P(R=r)$ with $f(r).$
          – spaceisdarkgreen
          Nov 16 at 15:09


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3000574%2fquestions-on-the-mathematics-behind-expected-shortfall-and-value-at-risk%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Probability when a professor distributes a quiz and homework assignment to a class of n students.

          Aardman Animations

          Are they similar matrix