What's new

# Calculating Expected Shortfall

#### MG250

##### New Member
Hello,

In reviewing the Part 2 Formula sheet, I had a question regarding the ES calculation on page 21. It appears that ES is calculated by summing from the confidence level of interest and up and dividing by not "n" but "n-1" VaR points. Why is this not calculated by dividing by "n" points?

Thanks,
Mike

#### emilioalzamora1

##### Well-Known Member

The ES is average of the worst losses 100*(1-confidence)% in the tail.

In case of the formula sheet (Part II, page 21) you are referring to you have 200 observations (there must be an Excel around for this screenshot, @David Harper CFA FRM can you help out?) and assuming a 95% ES you care about the 5% of losses in the tail. This means you care about the worst 10 observations (P&L figures) calculated as (200*0.05)= 10.

There is a similar post back in 2001 but honestly I have troubles to retrieve the ES 4276 at 99% confidence myself.

Last edited:

#### bpdulog

##### Active Member
It is because you are cutting up the tail into n-1 # of slices

If I have 100 observations and use 95% cutoff as my VaR, then there are 4 observations in the tail

Maybe it is due to the fact that there are 2 different definitions for VaR, based on the author

I can't really explain why that is, but just accept it as a fact for the exam

#### emilioalzamora1

##### Well-Known Member
You are mixing things up here:

For a 95% confidence level the VaR is the 11th highest loss (200*0.05) + 1 = 11.

Unlike VaR which is a quantile, ES is an average of the tail losses which means at 95% confidence we have (200*0.05) the average of the worst 10 losses.

#### MG250

##### New Member
Correct. Even still, in the document I posted up above. The VaR is being calculated as the 11th worst loss and ES is being calculated as the sum of losses 1-10 divided by 9 (instead of divided by 10).

#### emilioalzamora1

##### Well-Known Member

You can calculcate the ES either in two ways:

1.) Take the average of the worst % of losses (e.g. the average of the worst 10 losses when we assume a 95% confidence level: 200*0.05 = 10) which means getting the sum of the worst 10 losses summed up and divide this sum by 10 (this is the tedious pencil and paper solution)

OR

2.) You can (in the case of 95% confidence we have 200 observations times 0.05 = 10) weigh each of the losses (weights need to sum up to 1). Hence, having to split 5% for 10 losses (0.05/10 = 0.005) you weigh each single loss with 0.5% (0.005) which then yields (applying the ES formula, see K. Dowd 'Measuring Market Risk', page 35) the same result as under 1.) above:

{ loss(1)*0.005 + loss(2)*0.005........loss(10)*0.005 } * 1/(1-0.95)

Last edited:

#### MG250

##### New Member
That is my assumption, actually.

Take a look at the document above. The ES is 6027 for observation 199. This implies ES is calculated as (2988+3039)/1. It should be (2988+3039)/2.

#### bpdulog

##### Active Member
That is my assumption, actually.

Take a look at the document above. The ES is 6027 for observation 199. This implies ES is calculated as (2988+3039)/1. It should be (2988+3039)/2.
I took a look at the spreadsheet. If you look at the formula in column F, he is using 201 and subtracting from that. So. instead of using n-1 denominator, you just assume n is +1 larger beforehand.

Meaning, there are 200 observations and he is subtracting from 201 which accounts for 1 less observation in the tail

#### emilioalzamora1

##### Well-Known Member
Would you be so kind and attach the spreadsheet if possible?

#### MG250

##### New Member
Ah, ok. Thanks for digging into that.

#### Ashok_Kothavle

##### Member
Hi

I am not sure if this will in any way help. Please refer to the attached excel for understanding why (n-1) and not 'n'.

Assumptions :

Assuming losses follow Normal distribution with Mean '0' and Standard Deviation =1 and we are computing 95% VaR. Hence, in Excel, you can compute [email protected]% = Normsinv(0.95) = 1.64485.

(If you are aware of VaR etc, then actually VaR = -Normsinv(1 - 0.95) = -(-1.64485) = 1.64485)

As you may be aware, by definition of VaR, this means you are 95% confident that tomorrow if you incur a loss, you won't lose more that 1.64485. However, it also means that there is 5% chance that your loss may exceed this VaR value of 1.64485.

And if that happens, what will be the loss? Unfortunately this is one of the limitations of VaR (other is VaR non sub-additive etc unless you are dealing with elliptical distributions).

VaR doesn't provide the answer to the question "Loss beyond VaR?".

Hence, we use Expected Shortfall measure which is coherent risk measure.

Assuming, the Area under the Standard Normal Curve (Mean = 0, stdev = 1) is divided into n = 10 equal parts (also called slices) beyond [email protected]% i.e. between 95% to 100%.

Hence, the first slice is (95% - 95.5%), second slice is (95.5% - 96%) and so on. Thus the 10th slice is (99.5% t0 100%). As you can observe from the attached excel, you have n = 10 slices, but the VaR points (beyond 95% VaR) are only 9 (i.e. = (n-1)).

As ES is simply the average of these VaR values (exceeding [email protected]%), you get ES = 2.025.

Please Note that Quantile Value @95% is your regular VaR and hence is not to be included in ES computation as ES by definition is loss exceeding VaR value. Also, as can be seen from the excel, NORMSINV(100%) is not defined. Hence, you are left with only 9 VaR data points (exceeding [email protected]%), hence the value (n-1) and not n.

Hope this helps.

Cheers!!!

Regards

Ashok

#### Attachments

• 16.4 KB Views: 103

#### emilioalzamora1

##### Well-Known Member
Remember the following two points:

1. We are dealing with a discrete ES here. NORMSINV uses correctly 1-confidence level (= significance = alpha) having -NORMSINV (1-0.05) in the case of a 95% VaR.

2. In case of a continuous ES (which cannot be straightforwardly computed with paper and pencil in opposite to the discrete ES) we would have (assuming a standard normal distributuon with mean of 0 and variance of 0), the ES formula simplifies down to:

NormalDensityFunction of the 1.645 quantile (for the 95%VaR) which means that the loss will - in 95% of the cases - NOT be higher than 1.6 standard deviations.

To get NORMDIST(1,645,0,1,0) = 0.1031

Then you simply divide 0.1031/0.05 = 2.063 >> ES at 95% confidence level.

Last edited:

#### David Harper CFA FRM

##### David Harper CFA FRM
Staff member
Subscriber
Hi @Ashok_Kothavle I agree with your calculations! I added column (C) which computes the exact corresponding ESs per =NORM.S.DIST(NORM.S.INV(confidence),FALSE)/(1-confidence) which agrees with @emilioalzamora1 . You are showing a valid approximation of the ES, per Dowd's method; this approximation is similar to Riemann approximation https://en.wikipedia.org/wiki/Riemann_sum

There is always a confusion (and my graphic at the top may have added to this, apologies) about ES: because ES is a conditional average defined by the probability (not the quantile), it has no dependence on VaR; e.g., while the discrete (distribution) 95.0% value at risk (VaR) has various answers due to the discretion implied by locating a specific quantile on a discrete distribution, the discrete 95.0% expected shortfall (ES) is unambiguous because it is the probability-weighted average of the 5.0% loss tail (technically, TCE does depend on the quantile, but nobody seems to use that). On the other hand, your approximation of the ES does utilize the VaR quantiles, but it's an approximation (in this case, 2.025 approximates the true value of 2.062713 and, as Dowd says, as you increased the number of "VaR slices" the approximation would tend toward 2.062713). I hope that's helpful!

#### Attachments

• 16.6 KB Views: 126

#### Ashok_Kothavle

##### Member
Hi @Ashok_Kothavle I agree with your calculations! I added column (C) which computes the exact corresponding ESs per =NORM.S.DIST(NORM.S.INV(confidence),FALSE)/(1-confidence) which agrees with @emilioalzamora1 . You are showing a valid approximation of the ES, per Dowd's method; this approximation is similar to Riemann approximation https://en.wikipedia.org/wiki/Riemann_sum

There is always a confusion (and my graphic at the top may have added to this, apologies) about ES: because ES is a conditional average defined by the probability (not the quantile), it has no dependence on VaR; e.g., while the discrete (distribution) 95.0% value at risk (VaR) has various answers due to the discretion implied by locating a specific quantile on a discrete distribution, the discrete 95.0% expected shortfall (ES) is unambiguous because it is the probability-weighted average of the 5.0% loss tail (technically, TCE does depend on the quantile, but nobody seems to use that). On the other hand, your approximation of the ES does utilize the VaR quantiles, but it's an approximation (in this case, 2.025 approximates the true value of 2.062713 and, as Dowd says, as you increased the number of "VaR slices" the approximation would tend toward 2.062713). I hope that's helpful!
Dear Mr David and emilioalzamora1

Thanks a lot for your great guidance. It's true I am being greatly influenced by Kevin Dowd . This forum helps to refine and polish our knowledge.

Thanks once again.

With best regards

Ashok

#### [email protected]

##### New Member
hi @David Harper CFA FRM trying to understand ES formula mentioned above , NORM.S.DIST(NORM.S.INV(0.99),FALSE)/(1-0.99 ) returns to pdf value at 2.32 divided by 0.01. But not able to relate to Dowd definition ( refer attached) .

#### David Harper CFA FRM

##### David Harper CFA FRM
Staff member
Subscriber
Hi @[email protected] The screenshot you posted is the general (and of course correct!) version of the expected shortfall (ES) for a continuous distribution as the conditional average of a tail (where the threshold is a probability, α). The ES formula used in Excel--i.e., =NORM.S.DIST(NORM.S.INV(0.99),FALSE)/(1-0.99 )--is for the standard normal distribution so it is a special case: it is the elegant solution to the same integral when the normal is assumed, please see http://blog.smaga.ch/expected-shortfall-closed-form-for-normal-distribution/ ... most distributions do not solve so conveniently I hope that helps!

Last edited:

#### [email protected]

##### New Member
thanks .That's really helpful to see the proof @David Harper CFA FRM

Last edited:

#### yalda

##### New Member
Hi
I'm going to calculate ES of a portfolio consist of 20 stocks (10 short positions and 10 long positions). what's the simplest way?
Thanks