SlideShare a Scribd company logo
1 of 34
Download to read offline
Abstract

       Extreme Value Theory (EVT) has emerged as an important statistical
discipline for the applied sciences. It is useful because it provides techniques for
estimating models that predict events occurring at extremely low probabilities.
This paper describes EVT and tools such as quantile plots and mean excess
plots used to determine the appropriateness of EVT for modeling given data.
EVT techniques are then applied to model daily return of stock of three large
companies: IBM, Ford and Nortel. The results show that Generalized Pareto
Distribution (GPD) can appropriately model extreme daily returns, particularly
extreme daily losses. Finally the parameters of the appropriate GPD are
estimated, and Value-at-Risk (VaR) and Expected Shortfall, the two key risk
measures used by industry practitioners, are calculated based on the estimated
GPD.

Keywords: Extreme Value Theory, Generalized Pareto Distribution, Value-at-
Risk, Expected Shortfall




                                                                          1 of 34
Introduction, Scope & Purpose
        EVT has been successfully applied in engineering, biology, meteorology,
insurance and a myriad of other applied sciences1. This paper will focus on
Applications of EVT in Financial Markets.


        It has been noted that EVT’s application to extreme risk in financial
markets maybe motivated by the problem of daily determination of VaR for
losses incurred due to adverse market movements. Risk Managers are
interested in describing the tail of a loss distribution and measuring the expected
size of a loss that exceeds VaR2. Until recently, most parametric methods used
the Normal distribution to estimate VaR. However, under the assumption of
normality, the risk of high quantiles is underestimated, especially for the fat-tailed
series common in financial data.


        This paper outlines the theoretical underpinnings of EVT and works
through examples illustrating how EVT can be applied to financial data. The first
part of this paper introduces classical EVT, models for maxima/minima and
threshold models. However, modeling the maxima or minima of financial data is
of little value to risk managers. Instead, a threshold model based on the
Generalized Pareto Distribution (GPD) is argued to be most suited for risk
managers because it can be used to model the tail of a loss distribution3. Thus,
the second part of this paper models daily returns price for IBM, Ford and Nortel
stocks using the Generalized Pareto Distribution.




1
  Coles, Stuart. An Introduction to Statistical Modeling of Extreme Values.
2
  McNeil, A. “Extreme Value Theory for Risk Managers”. Pg 1-2
3
  Ibid.



                                                                              2 of 34
Theoretical Underpinnings4
Classical EVT and Models
           The fundamental model of Extreme Value Theory is based on the
behavior of Mn where:
                                          Mn = max{X1, …, Xn}


and Xi are independent identically distributed (iid) random variables. In theory,
the distribution of Mn can be easily derived if the distribution of Xi are known
because if F(z) is the distribution of the Xi, then


        FMn(z) = P(Mn ≤ z) = P(X1 ≤ z, …, Xn ≤ z) = P(X1 ≤ z)…P(Xn ≤ z) = [F(z) ]n


           In practice this is not possible because the distributions of the Xi are not
usually known. One possible solution to this problem is to estimate F(z) based on
observed values and then to derive FMn(z). However this approach is problematic
because any estimation involves errors and small errors in estimating F(z) would
lead to large errors in the estimation of FMn(z).


           Another solution is to accept F(z) as unknown and then to try and find a
family of functions that model FMn based only on extreme (maximal) data. The
arguments to justify this method are analogous to the justifications underlying the
Central Limit Theorem. Pursuing this method further, we consider:


                   Mn* = (Mn – bn)/an where {an > 0} and {bn} are constants


Appropriate choices of bn and an stabilize location and scale of Mn* as n         ∞. All
possible limit distributions for Mn* are given by the Extremal Types Theorem:




4
    Adapted from book by Stuart Coles. See references.


                                                                              3 of 34
In the above distribution, b is the location parameter, a is the scale
parameter and α is the shape parameter. The type I, type II and type III models
above are known as the Gumbel, Frechet, and Weibull distributions respectively.
This theorem says that regardless of the distribution of the Xi, if we normalize Mn
to Mn*, then the distribution of Mn* is of only 3 possible types.


       These three types of extreme models have distinct forms of behavior
corresponding to different forms of the tail distribution of the Xi. Application of
EVT requires choosing one of the three models to estimate parameters. But this
raises two important problems. Firstly, how do you know which model type to use?
A technique is needed to choose the appropriate model type for given data.
Secondly, once the decision of model type has been made, all subsequent
inferences will rest on the assumption that the decision of model type was correct
and thus will not allow for any uncertainty in that decision.


       These problems are solved by combing the three model forms into the
Generalized Extreme Value Distribution:




                                                                            4 of 34
In this combined model, µ is the location parameter, σ is the scale
parameter and ξ is the shape parameter. When ξ > 0, the GEV distribution
corresponds to the Frechet distribution. When ξ < 0, the GEV distribution
corresponds to the Weibull distribution. The case of ξ = 0 can be interpreted as
taking the limit as ξ 0 and this corresponds to the Gumbel distribution.


        By doing statistical inference on ξ, the two problems associated with
choosing model types are solved. The data itself now determines the most
appropriate type of tail behavior. Furthermore, uncertainty in estimating ξ
corresponds to uncertainty in choosing the correct model type.


        At this point we stop to consider that our original problem was to model Mn,
not Mn*. In practice, the constants an and bn may not be known. However, we
have shown that P(Mn* ≤ z) = P((Mn - bn)/ an ≤ z) ≈ G(z). Then for large n, we can
write
                         P(Mn≤ z) ≈ G((z - bn)/ an) = G*(z)

where G*(z) is also a member of the GEV family of distributions. Since the
parameters of the distribution have to be estimated anyways, it is irrelevant that
the parameters for G(z) are different than the parameters for G*(z) for a given
data set.




                                                                           5 of 34
By the above argument, an approach to modeling extremes of Xi is
developed. First all the data is blocked into a sequence of observations of size n
(n is large). From each block, we can derive block maxima: Mn 1, …, Mn m where
Mn i is the block maxima from the block i of size n. The GEV can now be fitted
using Mn 1, …, Mn m as data. Often blocks are chosen according to time periods of
1 year.

Block Minima
      At this point let us note that the GEV distribution also provides asymptotic
models for minima. Given data z1,…,zn , we can simply maximize -z1,…,-zn.


Inference on GEV distribution:
      The aforementioned method for implementing the GEV distribution
required us to divide the data into equal size blocks and fit to the set of block
maxima. However choosing block size is always a trade off between bias and
variance. Overly small block sizes lead to bias because approximation by the
GEV model is poor. Overly large block sizes generate fewer block maxima and
thus lead to large estimation variance. For time series data sets, block sizes of
one year are commonly chosen because this usually makes plausible the
assumption that block maxima have common distribution.


      Now we consider Z1 ,…,Zn where Zi are iid block maxima from a GEV
distribution whose parameters need estimation. The Zi are independent even if
the Xi are not independent (as in the case of most time series). Likelihood-based
estimation provides one effective method of estimating these parameters. The
log-likelihood for the GEV when ξ ≠ 0 is




                                                                         6 of 34
The log-likelihood for the GEV when ξ = 0 (corresponding to the Gumbel
distribution) is:




       For any given data set, these log likelihood functions can be maximized
using numerical methods. The estimators derived from this method can be
assumed to be approximately multivariate normal and unbiased. Confidence
intervals and other inferences follow from this assumption of normality. Model
checking can be done by plotting the empirical distribution function evaluated at
zi for ordered block maxima against the model evaluated with the estimates. A
good fit will produce a linear graph lying close to the line y = x.

Threshold Models
       In our quest to model extreme events, we may be given an entire time
series of daily observations. Better use of this data is made by avoiding blocking.
If X1, X2, … are iid, then extreme events can be defined as those Xi that exceed
some high threshold u. In modeling extreme events, we are interested in the
conditional probability of X-u given X > u. Theory tells us that if block maxima of
the data have an approximate GEV distribution, then this conditional probability
can be approximated by the Generalized Pareto Distribution.




                                                                          7 of 34
Moreover, the parameters of the GPD (modeling excess over threshold)
are uniquely determined by the parameters of the associated GEV model
regardless of the block size. This is because the shape parameter ξ is
independent of block size. Also β = σ + ξ(u – µ) where σ and µ are from the
associated GEV distribution. Changing block size n in the associated model
adjusts σ and µ in a self-compensating way so that β remains constant.


Modeling Threshold Excesses
       Naturally the first step in modeling extreme data within the framework of
threshold models is to choose an appropriate threshold. Choice of threshold is
analogous to the problem of choosing the appropriate block size in the GEV
model. If the threshold is set too low, then the data beyond the threshold will
deviate significantly from the GPD. On the other hand, if the threshold is set too
high, there will not be enough data to estimate the model, and a high variance
will result. So we must choose as low a threshold as possible provided that the
GPD is still a reasonable approximation for excesses beyond the threshold. One
method to determine the threshold is to create the mean excess function plot.
Theory tells us that if Y has GPD, then E(Y) = β/(1- ξ). Since the conditional
distribution of excesses beyond threshold is approximated by GPD, we know
from theory that for a threshold u0:


                          E( X– u0 | X > u0 ) = β(u0)/(1- ξ)

where β(u0) is the value of β corresponding to the threshold u0. However, if the
excess beyond u0 can be modeled with GPD, then so can excess beyond any
other threshold u>u0. It has been shown that for u >u0,


                                                                         8 of 34
E( X– u | X > u ) = (β(u0) + ξu) / (1- ξ)


This is linear in u. Therefore we expect that for thresholds beyond which the
excesses follow a GPD, the conditional mean will be a linear function. Thus we
have the following method to determine the threshold. : Let x1, …, xn be the data
to be modeled.


      1. Order the data: x(1),…, x(n)
      2. For each u in { x(1),…, x(n) } calculate the sample mean of the difference
         between the x’s and u for all x’s > u. In other words, calculate and plot:




      3. Identify the point beyond which this graph is approximately linear and
         choose that as the threshold for the model. Ensure that there are sufficient
         points beyond the chosen threshold to make meaningful inferences.

Estimating Parameters
         Once the threshold is chosen, likelihood techniques can be used to
estimate parameters for the GPD model while considering only the data that lies
beyond the chosen threshold. Let y1,…, yk be the excesses of a threshold u (so yi
= xi – u for xi > u). The log likelihood function for the GPD in the case where ξ ≠ 0
is:
                         ℓ(β,ξ) = -kln(β) – (1 + 1/ξ)∑ ln(1 + ξyi/β)


provided that (1 + ξyi/β) > 0 for i = 1,…,k.
In the case of ξ = 0, the log likelihood function is:



                                                                            9 of 34
ℓ(β) = -k*ln(β) – (1/β)∑ yi


These log likelihood functions can be numerically maximized and the maximum
likelihood estimate (mle) for β, ξ can be found.


Model Checking
           The models validity can be checked with probably plots, quantile plots and
density plots. For a threshold u and threshold excesses y(1),…, y(k), the probability
plot (for i = 1,…, k) consists of the pairs


                        {i/(k+1), 1 – (1 + ξy(i)/β)-1/ξ }using the mle for ξ


The quantile plot consists of the pairs


                                  {H-1(i/(k+1)), y(i)} for i= 1,…, k


where H-1(t) = u + β/ξ[t-ξ – 1] using the mle for β and ξ.


           If the GPD is a good fit, the probability plot and the quantile plot will be
approximately linear. Also the density function of the fitted GPD can be
compared to a histogram of the threshold excesses.


Estimating VaR and Expected Shortfall5
           As mentioned in the introduction, a major use of EVT in risk management
is to characterize the tail of a loss distribution using VaR and Expected Shortfall.
VaR is a high quantile of a distribution of losses and can represent an upper
bound for losses that is exceeded only rarely. Expected Shortfall is expected size
of a loss that exceeds VaR.




5
    McNeil, A. “Extreme Value Theory for Risk Managers”. Pg 2-3.


                                                                                 10 of 34
Using historical simulation and maximum likelihood estimates of the
parameters of GPD, the following tail estimator has been derived:




where Nu is the number of data points that exceed the threshold u and n is the
total number of data points. The VaR estimate for a probability q is calculated by
inverting the tail estimation of the above formula to give:




The expected shortfall is related to VaR by the following formula:



where the second term is the mean of the excess distribution over the threshold.
In practice, these can be calculated using the ‘riskmeasures’ function of the EVIR
package in R.


Application of EVT
       We now turn to three examples that illustrate how to fit the GPD to
financial data and produce a model for extremes beyond a threshold. The raw
data for these examples are the historical prices of IBM, Ford, and Nortel stocks
which were downloaded from:
IBM stock: http://finance.yahoo.com/q/hp?s=IBM
Ford stock: http://finance.yahoo.com/q/hp?s=F
Nortel stock: http://finance.yahoo.com/q/hp?s=NT


       The data analyzed however are historical daily returns price. The returns
price for each day was calculated by the formula:




                                                                         11 of 34
Returns price = (today’s price – yesterday’s price)/yesterday’s price


       Clearly, the returns price is a measure of daily gain or loss in stock price
regardless of the actual stock price. Modeling extremes of returns price is useful
because it can help risk managers determine what the maximum gain or more
importantly, maximum loss that can be incurred in one day.

Historical Daily Returns Prices of IBM
       The time series for IBM ranged between January 2 1980 and March 26
2004. The first step in analyzing this data is to see if it can be satisfactorily
modeled by the Normal distribution. We do this by creating a normal quantile plot
and look for linearity:




       Notice that the data near the endpoints deviates from linearity significantly.
This implies that the true distribution of the data is fat tailed and so the extremes
are not normally distributed. This provides us with the impetus to model the
extremes using EVT.




                                                                              12 of 34
Now we must determine the threshold beyond which we can define the
data as “extreme”. To do this, we must first construct a plot of the mean excess
function. Then we try to determine a high enough point beyond which the plot
looks linear but at the same time provides sufficient points for inference.
Furthermore, we will omit the three largest losses because they tend to distort
the plot6. The mean excess function for different possible thresholds is:




From this plot we can estimate the threshold to be approximately 0.06 because
the data seems to kink downward at this point. This represents the threshold for
daily gain in stock prices. Now we can fit the GPD to data beyond this threshold
by using the gpd function in the EVIR software. We get the following results using
likelihood methods of estimation:


Total Number of Data Points: 6118
Chosen Threshold: 0.06
Number of Points Exceeding Threshold: 44

6
 As mentioned in McNeil, A. & Saladin, T. “The Peaks over Threshold Method for Estimating High
Quantiles of Loss Distributions” Departement Mathematik ETH Zentrum.


                                                                                        13 of 34
Approximate Percentile at which threshold is located: 99th percentile
Parameter Estimate for Shape (ξ): -0.1376
Parameter Estimate for β: 0.0253
Variance-Covariance Matrix:

                             Shape                          Beta
Shape                        0.0631                         -0.0017
Beta                         -0.0017                        5.406e-05

Now we must do diagnostic checks to see if the model is a good fit. The quantile
plot of the residuals is:




Since this quantile plot is approximately linear, we conclude that the GPD is a
good fit for this data. Thus extreme values (beyond 0.06) can be modeled by:


                     G(x) = 1 – (1 + (-0.1376)x/(0.0253))1/(0.1376)


        We have just modeled the extremes for daily gain of IBM stock prices.
However, in many financial situations, we have greater concern with negative
values for daily returns because that implies that a loss is incurred. In order to



                                                                           14 of 34
analyze extreme negative values, we need to multiply the given data by -1 and
repeat the procedure outlined above.


      We will now model the negative daily returns for IBM stock prices. The
modified mean excess function is:




From this plot we choose can choose 0.05 as a threshold. So -0.05 represents
the threshold for daily loss. Now we can fit the GPD to data beyond this threshold
by using the gpd function in the EVIR software. We get the following results using
likelihood methods of estimation:




                                                                        15 of 34
Total Number of Data Points: 6118
Chosen Threshold: 0.05
Number of Points Exceeding Threshold: 46
Approximate Percentile at which threshold is located: 99th percentile
Parameter Estimate for Shape (ξ): 0.4689
Parameter Estimate for β: 0.0128
Variance-Covariance Matrix:


                            Shape                       Beta
Shape                       0.0566                      -0.0005
Beta                        -0.0005                     1.169e-05
Now we must do diagnostic checks to see if the model is a good fit. The quantile
plot of the residuals
is:




                                                                        16 of 34
Since this quantile plot is approximately linear, we conclude that the GPD
is a good fit for this data. Thus the negative extreme values (beyond -0.025) can
be modeled by:


                          G(x) = 1 – (1 + (0.4689)x/(0.0128))-1/(0.4689)


          In risk management, we are interested in estimates of VaR and Expected
Shortfall for different p-values of this model. In statistical language, VaR is simply
a quantile estimate7. These are easily found for the above model using the EVIR
software:

           p-value                    Estimate of VaR              Estimate of Expected
                                                                         Shortfall
0.99                           0.04658902                       0.0676375
0.999                          0.09292915                       0.1548897
0.9999                         0.22934078                       0.4117342
0.99999                        0.63089623                       1.1678084


Historical Daily Returns Prices of Ford
          Historical Prices of Ford Stocks was downloaded from Yahoo Finance.
The time series ranged from January 2 1987 to March 26 2004. The returns price
was calculated and forms the data for the present analysis. To see if the data has
a fat tail, we plot the normal quantiles for this data:




7
    McNeil, A. “Extreme Value Theory for Risk Managers” pg 7.


                                                                                 17 of 34
We see that the tail curves slightly away from the straight line, indicating
deviation from normality. For confirmation, we also plot the empirical distribution
function of the data on the log-log scale. A straight line on the double log scale
implies Pareto tail behavior8:




8
    EVIR help document.


                                                                           18 of 34
We see that the tail is approximately linear. So we are now justified in fitting
the GPD to the tails. As before, we must first find the threshold by plotting the
Mean Excess function. Furthermore, we will omit the three largest losses
because they tend to distort the plot9:




9
 As mentioned in McNeil, A. & Saladin, T. “The Peaks over Threshold Method for Estimating High
Quantiles of Loss Distributions” Departement Mathematik ETH Zentrum.


                                                                                        19 of 34
We see that the graph is approximately linear beyond 0.06; so we will choose
this as our threshold. This represents the threshold for maximum possible gain
per day. Now we will fit the GPD for the data beyond this threshold using the gpd
function of the EVIR package. We get the following results using likelihood
methods of estimation:
Total Number of Data Points: 4348
Chosen Threshold: 0.03
Number of Points Exceeding Threshold: 47
Approximate Percentile at which threshold is located: 98th percentile
Parameter Estimate for Shape (ξ): 0.4607
Parameter Estimate for β: 0.0158
Variance-Covariance Matrix:
                            Shape                       Beta
Shape                       0.03637                     -0.0003453
Beta                        -0.0003453                  1.306e-05



                                                                        20 of 34
Now we look at the quantile plot of the residuals to see if the GPD model is
a good fit:




The quantile plot seems to be approximately linear, indicating that we have found
a good fit for this data. So we conclude that negative extreme values (beyond
0.03) can be modeled by:


                   G(x) = 1 – (1 + (0.4607)x/(0.0158))-1/(0.4607)


      The above model corresponds to daily gain of Ford stock prices. In order
to analyze extreme negative values, we need to multiply the given data by -1
and repeat the procedure outlined above. We will now model the negative daily
returns for Ford stock prices. The last 3 data points in the mean excess function
are omitted as before. The mean excess function is now:




                                                                        21 of 34
From this plot we can estimate the threshold to be approximately 0.05. So
-0.05 represents the threshold for daily loss. Now we can fit the GPD to data
beyond this threshold by using the GPD function in the EVIR software. We get
the following results using likelihood methods of estimation:


Total Number of Data Points: 4348
Chosen Threshold: 0.05
Number of Points Exceeding Threshold: 58
Approximate Percentile at which threshold is located: 98th percentile
Parameter Estimate for Shape (ξ): 0.2646
Parameter Estimate for β: 0.01145




                                                                        22 of 34
Variance-Covariance Matrix:
                              Shape                         Beta
Shape                         0.02022                       -1.619e-04
Beta                          -1.619e-04                    4.577e-06

Now we must do diagnostic checks to see if the model is a good fit. The quantile
plot of the residuals is:




Since this quantile plot is approximately linear, we conclude that the GPD is a
good fit for this data. Thus negative extreme values (beyond -0.05) can be
modeled by:
                     G(x) = 1 – (1 + (0.2646)x/(0.01145))-1/(0.2646)


        In risk management, we are interested in estimates of VaR and Expected
Shortfall for different p-values of this model. These are easily found for the above
model using the EVIR software:




                                                                          23 of 34
p-values                Estimate of VaR             Estimate of Expected
                                                                 Shortfall
0.99                     0.05343                        0.0702
0.999                    0.09260                        0.1235
0.9999                   0.1646                         0.2214
0.99999                  0.2971                         0.4015


Historical Daily Returns Prices of Nortel
     Historical Prices of Nortel stocks were downloaded from Yahoo Finance.
The time series ranged from December 16 1991 to March 26 2004. The returns
price was calculated and forms the data for the present analysis. To see if the
data has a fat tail, we plot the normal quantiles for this data:




                                                                         24 of 34
Notice that the data near the endpoints deviates significantly from linearity.
This implies that the true distribution of the data is a fat tailed distribution and so
the extremes are not normally distributed. This provides us with the impetus to
model the extremes using EVT.


     To choose the threshold we now consider the plot of the mean excess
function:




From this plot we estimate the threshold to be approximately 0.105. This
represents the threshold for the maximum possible gain everyday. Now we can




                                                                              25 of 34
fit the GPD to data beyond this threshold by using the gpd function in the EVIR
software. We get the following results using likelihood methods of estimation:


Total Number of Data Points: 3093
Chosen Threshold: 0.105
Number of Points Exceeding Threshold: 40
Approximate Percentile at which threshold is located: 98th percentile
Parameter Estimate for Shape (ξ): -0.1379
Parameter Estimate for β: 0.04853
Variance-Covariance Matrix:
                              Shape                       Beta
Shape                         0.0329                      -0.0017
Beta                          -0.0017                     0.0001349


       Now consider the following quantile plot of the residual to verify whether the
aforementioned model is a good fit for the data:




                                                                           26 of 34
The quantile plot seems to be approximately linear, indicating that we have found
a good fit for this data. Thus we conclude that negative extreme values (beyond
0.105) can be modeled by:


                  G(x) = 1 – (1 + (-0.1379)x/(0.04853))-1/(-0.1379)


      The above model corresponds to the extremes for daily gain of Nortel
stock prices. In order to analyze extreme negative values, we need to multiply
the given data by -1 and repeat the procedure outlined above. We will now model




                                                                       27 of 34
the negative daily returns for Nortel stock prices. The modified mean excess
function is:




From this plot we can estimate the threshold to be approximately 0.07. So -0.07
represents the threshold for daily loss. Now we can fit the GPD to data beyond
this threshold by using the gpd function in the EVIR software. We get the
following results using likelihood methods of estimation:


Total Number of Data Points: 3093
Chosen Threshold: 0.07
Number of Points Exceeding Threshold: 77


                                                                        28 of 34
Approximate Percentile at which threshold is located: 97th percentile
Parameter Estimate for Shape (ξ): 0.2601
Parameter Estimate for β: 0.0285
Variance-Covariance Matrix:
                            Shape                       Beta
Shape                       0.02658                     -6.342e-04
Beta                        -6.342e-04                  3.123e-05


Now we must do diagnostic checks to see if the model is a good fit. The quantile
plot of the residuals is:




                                                                        29 of 34
Since this quantile plot is approximately linear, we conclude that the GPD is a
good fit for this data. So we conclude that negative extreme values (beyond
-0.03) can be modeled by:


                    G(x) = 1 – (1 + (0.2601)x/(0.0285))-1/(0.2601)


        In risk management, we are interested in estimates of VaR and Expected
Shortfall for different p-values of this model. These are also easily found for the
above model using the EVIR software:
        p-values              Estimate of VaR               Estimate of Expected
                                                                     Shortfall
0.99                    0.09933                         0.1482
0.999                   0.2132                          0.3021
0.9999                  0.4206                          0.5823
0.99999                 0.7980                          1.092




                                                                                 30 of 34
R Software and Code Used to Model Data
       First of all, the EVIR and EVD packages must be downloaded and
installed into the R program in order to utilize functions pertaining to EVT. These
can be procured for free from the following website:
                 http://www.maths.lancs.ac.uk/~stephena/software.html
The following is a generic version of the specific code used to do model the three
cases above.
//Imports the EVD and EVIR packages needed for modeling.
>library(evd)
>library(evir)


//Reads the file “data.txt” containing data to be modeled.
>data = scan(“data.txt”)


//Plots the sample normal quantiles against the theoretical normal quantiles
>qqnorm(data)


//Adds a line to the normal QQ-plot.
>qqline(data, col=2)


//Plots empirical distribution of data on a log-log scale
>emplot(data, alog = “xy”, labels=TRUE)


//Creates the plot of the mean excess function for the data.
>meplot(data, omit=3, labels=TRUE)


//Fits the GPD for data beyond threshold t, and uses maximum likelihood method to
//estimate parameters.
>FittedData=gpd(data, threshold = t, method = c(“ml”))




                                                                               31 of 34
//Displays the details of the GPD fit to the data.
>FittedData


//Provides 4 different plots to assess the fit of the GPD model. The user can choose the
//requisite plot from a menu.
>plot.gpd(FittedData, labels=TRUE)


//Once data is fitted, calculates estimates of quantiles and expected shortfall for the model
//for a given vector of probability levels p.
>riskmeasures(FittedData, p)




                                                                                  32 of 34
Conclusion
       EVT is here to stay as a technique for the risk managers toolkit. Whenever
the tails of probability distributions are of interest, it is natural to consider applying
the theoretically supported techniques of EVT. Methods based around the
assumptions of normal distributions are likely to underestimate tail risk. Although
not perfect, EVT provides the best available models to predict extreme events.

       In the second part of the study, it was shown that EVT can be used to
successfully model the daily returns of the stock prices. It illustrates how EVT can
be used as a day-to-day exploratory risk management tool.




                                                                               33 of 34
References

  1. Bensalah, Younes. (November 2000) “Steps in Applying Extreme Value
     Theory to Finance: A Review” Bank of Canada Working Paper 2000-20.
  2. Coles, Stuart. An Introduction to Statistical Modelling of Extreme Values.
     London: Springer, 2001.
  3. Embrechts P., Klüppelberg C., & Mikosch T. Modelling Extremal Events
     for Insurance and Finance. Heidelberg: Springer-Verlag, 1999.
  4. McNeil, A. & Saladin, T. (April 24, 1997), “The Peaks over Threshold
     Method for Estimating High Quantiles of Loss Distributions” Departement
     Mathematik ETH Zentrum.
  5. McNeil, A. (May 17, 1999), “Extreme Value Theory for Risk Managers”
     Departement Mathematik ETH Zentrum.
  6. Stephenson, A. (2003), “EVD Documentation”. Documentation for
     Extreme Value Distributions package for R Statistical Program.
     (http://www.maths.lancs.ac.uk/~stephena/software.html)
  7. Stephenson, A. (2003), “EVD Documentation”. Documentation for
     Extreme Value Distributions package for R Statistical Program.
     (http://www.maths.lancs.ac.uk/~stephena/software.html)
  8. Stephenson, A. (2002), “EVIR”. Documentation for Extreme Value In R
     package for R Statistical Program.
     (http://www.maths.lancs.ac.uk/~stephena/software.html)




                                                                       34 of 34

More Related Content

What's hot

Research on the Trading Strategy Based On Interest Rate Term Structure Change...
Research on the Trading Strategy Based On Interest Rate Term Structure Change...Research on the Trading Strategy Based On Interest Rate Term Structure Change...
Research on the Trading Strategy Based On Interest Rate Term Structure Change...inventionjournals
 
FurtherInvestegationOnProbabilisticErrorBounds_final
FurtherInvestegationOnProbabilisticErrorBounds_finalFurtherInvestegationOnProbabilisticErrorBounds_final
FurtherInvestegationOnProbabilisticErrorBounds_finalMohammad Abdo
 
Cpt sampling theory revision sheet
Cpt sampling theory revision sheetCpt sampling theory revision sheet
Cpt sampling theory revision sheetVXplain
 
Selection of bin width and bin number in histograms
Selection of bin width and bin number in histogramsSelection of bin width and bin number in histograms
Selection of bin width and bin number in histogramsKushal Kumar Dey
 
Speaker Recognition using Gaussian Mixture Model
Speaker Recognition using Gaussian Mixture Model Speaker Recognition using Gaussian Mixture Model
Speaker Recognition using Gaussian Mixture Model Saurab Dulal
 
11.the comparative study of finite difference method and monte carlo method f...
11.the comparative study of finite difference method and monte carlo method f...11.the comparative study of finite difference method and monte carlo method f...
11.the comparative study of finite difference method and monte carlo method f...Alexander Decker
 
Vasicek Model Project
Vasicek Model ProjectVasicek Model Project
Vasicek Model ProjectCedric Melhy
 
The application of discrete choice models in marketing
The application of discrete choice models in marketingThe application of discrete choice models in marketing
The application of discrete choice models in marketingAlexander Decker
 
A Study on Youth Violence and Aggression using DEMATEL with FCM Methods
A Study on Youth Violence and Aggression using DEMATEL with FCM MethodsA Study on Youth Violence and Aggression using DEMATEL with FCM Methods
A Study on Youth Violence and Aggression using DEMATEL with FCM Methodsijdmtaiir
 
Andrew_Hair_Assignment_3
Andrew_Hair_Assignment_3Andrew_Hair_Assignment_3
Andrew_Hair_Assignment_3Andrew Hair
 
A SURVEY OF CLUSTERING ALGORITHMS IN ASSOCIATION RULES MINING
A SURVEY OF CLUSTERING ALGORITHMS IN ASSOCIATION RULES MININGA SURVEY OF CLUSTERING ALGORITHMS IN ASSOCIATION RULES MINING
A SURVEY OF CLUSTERING ALGORITHMS IN ASSOCIATION RULES MININGAIRCC Publishing Corporation
 
Stability criterion of periodic oscillations in a (16)
Stability criterion of periodic oscillations in a (16)Stability criterion of periodic oscillations in a (16)
Stability criterion of periodic oscillations in a (16)Alexander Decker
 

What's hot (18)

Research on the Trading Strategy Based On Interest Rate Term Structure Change...
Research on the Trading Strategy Based On Interest Rate Term Structure Change...Research on the Trading Strategy Based On Interest Rate Term Structure Change...
Research on the Trading Strategy Based On Interest Rate Term Structure Change...
 
ABC in Varanasi
ABC in VaranasiABC in Varanasi
ABC in Varanasi
 
FurtherInvestegationOnProbabilisticErrorBounds_final
FurtherInvestegationOnProbabilisticErrorBounds_finalFurtherInvestegationOnProbabilisticErrorBounds_final
FurtherInvestegationOnProbabilisticErrorBounds_final
 
P1
P1P1
P1
 
Cpt sampling theory revision sheet
Cpt sampling theory revision sheetCpt sampling theory revision sheet
Cpt sampling theory revision sheet
 
Selection of bin width and bin number in histograms
Selection of bin width and bin number in histogramsSelection of bin width and bin number in histograms
Selection of bin width and bin number in histograms
 
Speaker Recognition using Gaussian Mixture Model
Speaker Recognition using Gaussian Mixture Model Speaker Recognition using Gaussian Mixture Model
Speaker Recognition using Gaussian Mixture Model
 
B0343011014
B0343011014B0343011014
B0343011014
 
11.the comparative study of finite difference method and monte carlo method f...
11.the comparative study of finite difference method and monte carlo method f...11.the comparative study of finite difference method and monte carlo method f...
11.the comparative study of finite difference method and monte carlo method f...
 
Vasicek Model Project
Vasicek Model ProjectVasicek Model Project
Vasicek Model Project
 
The application of discrete choice models in marketing
The application of discrete choice models in marketingThe application of discrete choice models in marketing
The application of discrete choice models in marketing
 
A Study on Youth Violence and Aggression using DEMATEL with FCM Methods
A Study on Youth Violence and Aggression using DEMATEL with FCM MethodsA Study on Youth Violence and Aggression using DEMATEL with FCM Methods
A Study on Youth Violence and Aggression using DEMATEL with FCM Methods
 
Sfs4e ppt 07
Sfs4e ppt 07Sfs4e ppt 07
Sfs4e ppt 07
 
Andrew_Hair_Assignment_3
Andrew_Hair_Assignment_3Andrew_Hair_Assignment_3
Andrew_Hair_Assignment_3
 
Sampling theory
Sampling theorySampling theory
Sampling theory
 
A SURVEY OF CLUSTERING ALGORITHMS IN ASSOCIATION RULES MINING
A SURVEY OF CLUSTERING ALGORITHMS IN ASSOCIATION RULES MININGA SURVEY OF CLUSTERING ALGORITHMS IN ASSOCIATION RULES MINING
A SURVEY OF CLUSTERING ALGORITHMS IN ASSOCIATION RULES MINING
 
Stability criterion of periodic oscillations in a (16)
Stability criterion of periodic oscillations in a (16)Stability criterion of periodic oscillations in a (16)
Stability criterion of periodic oscillations in a (16)
 
CLIM Program: Remote Sensing Workshop, Blocking Methods for Spatial Statistic...
CLIM Program: Remote Sensing Workshop, Blocking Methods for Spatial Statistic...CLIM Program: Remote Sensing Workshop, Blocking Methods for Spatial Statistic...
CLIM Program: Remote Sensing Workshop, Blocking Methods for Spatial Statistic...
 

Similar to Applications Of Evt In Financial Markets

Prob and statistics models for outlier detection
Prob and statistics models for outlier detectionProb and statistics models for outlier detection
Prob and statistics models for outlier detectionTrilochan Panigrahi
 
Non-Normally Distributed Errors In Regression Diagnostics.docx
Non-Normally Distributed Errors In Regression Diagnostics.docxNon-Normally Distributed Errors In Regression Diagnostics.docx
Non-Normally Distributed Errors In Regression Diagnostics.docxvannagoforth
 
A comparative study of clustering and biclustering of microarray data
A comparative study of clustering and biclustering of microarray dataA comparative study of clustering and biclustering of microarray data
A comparative study of clustering and biclustering of microarray dataijcsit
 
chap4_Parametric_Methods.ppt
chap4_Parametric_Methods.pptchap4_Parametric_Methods.ppt
chap4_Parametric_Methods.pptShayanChowdary
 
Diagnostic methods for Building the regression model
Diagnostic methods for Building the regression modelDiagnostic methods for Building the regression model
Diagnostic methods for Building the regression modelMehdi Shayegani
 
V. pacáková, d. brebera
V. pacáková, d. breberaV. pacáková, d. brebera
V. pacáková, d. breberalogyalaa
 
Maxillofacial Pathology Detection Using an Extended a Contrario Approach Comb...
Maxillofacial Pathology Detection Using an Extended a Contrario Approach Comb...Maxillofacial Pathology Detection Using an Extended a Contrario Approach Comb...
Maxillofacial Pathology Detection Using an Extended a Contrario Approach Comb...sipij
 
Further investegationonprobabilisticerrorbounds final
Further investegationonprobabilisticerrorbounds finalFurther investegationonprobabilisticerrorbounds final
Further investegationonprobabilisticerrorbounds finalMohammad
 
Characterization of student’s t distribution with some application to finance
Characterization of student’s t  distribution with some application to financeCharacterization of student’s t  distribution with some application to finance
Characterization of student’s t distribution with some application to financeAlexander Decker
 
Probability distribution Function & Decision Trees in machine learning
Probability distribution Function  & Decision Trees in machine learningProbability distribution Function  & Decision Trees in machine learning
Probability distribution Function & Decision Trees in machine learningSadia Zafar
 
Estimating ambiguity preferences and perceptions in multiple prior models: Ev...
Estimating ambiguity preferences and perceptions in multiple prior models: Ev...Estimating ambiguity preferences and perceptions in multiple prior models: Ev...
Estimating ambiguity preferences and perceptions in multiple prior models: Ev...Nicha Tatsaneeyapan
 
Thesis_NickyGrant_2013
Thesis_NickyGrant_2013Thesis_NickyGrant_2013
Thesis_NickyGrant_2013Nicky Grant
 
Dong Zhang's project
Dong Zhang's projectDong Zhang's project
Dong Zhang's projectDong Zhang
 
An investigation of inference of the generalized extreme value distribution b...
An investigation of inference of the generalized extreme value distribution b...An investigation of inference of the generalized extreme value distribution b...
An investigation of inference of the generalized extreme value distribution b...Alexander Decker
 
MSL 5080, Methods of Analysis for Business Operations 1 .docx
MSL 5080, Methods of Analysis for Business Operations 1 .docxMSL 5080, Methods of Analysis for Business Operations 1 .docx
MSL 5080, Methods of Analysis for Business Operations 1 .docxmadlynplamondon
 
Master of Computer Application (MCA) – Semester 4 MC0079
Master of Computer Application (MCA) – Semester 4  MC0079Master of Computer Application (MCA) – Semester 4  MC0079
Master of Computer Application (MCA) – Semester 4 MC0079Aravind NC
 
Approximating_probability_density_functions_for_the_Collective_Risk_Model
Approximating_probability_density_functions_for_the_Collective_Risk_ModelApproximating_probability_density_functions_for_the_Collective_Risk_Model
Approximating_probability_density_functions_for_the_Collective_Risk_ModelHarini Vaidyanath
 
Mixed Model Analysis for Overdispersion
Mixed Model Analysis for OverdispersionMixed Model Analysis for Overdispersion
Mixed Model Analysis for Overdispersiontheijes
 

Similar to Applications Of Evt In Financial Markets (20)

Prob and statistics models for outlier detection
Prob and statistics models for outlier detectionProb and statistics models for outlier detection
Prob and statistics models for outlier detection
 
Non-Normally Distributed Errors In Regression Diagnostics.docx
Non-Normally Distributed Errors In Regression Diagnostics.docxNon-Normally Distributed Errors In Regression Diagnostics.docx
Non-Normally Distributed Errors In Regression Diagnostics.docx
 
A comparative study of clustering and biclustering of microarray data
A comparative study of clustering and biclustering of microarray dataA comparative study of clustering and biclustering of microarray data
A comparative study of clustering and biclustering of microarray data
 
chap4_Parametric_Methods.ppt
chap4_Parametric_Methods.pptchap4_Parametric_Methods.ppt
chap4_Parametric_Methods.ppt
 
Diagnostic methods for Building the regression model
Diagnostic methods for Building the regression modelDiagnostic methods for Building the regression model
Diagnostic methods for Building the regression model
 
V. pacáková, d. brebera
V. pacáková, d. breberaV. pacáková, d. brebera
V. pacáková, d. brebera
 
Maxillofacial Pathology Detection Using an Extended a Contrario Approach Comb...
Maxillofacial Pathology Detection Using an Extended a Contrario Approach Comb...Maxillofacial Pathology Detection Using an Extended a Contrario Approach Comb...
Maxillofacial Pathology Detection Using an Extended a Contrario Approach Comb...
 
Further investegationonprobabilisticerrorbounds final
Further investegationonprobabilisticerrorbounds finalFurther investegationonprobabilisticerrorbounds final
Further investegationonprobabilisticerrorbounds final
 
Characterization of student’s t distribution with some application to finance
Characterization of student’s t  distribution with some application to financeCharacterization of student’s t  distribution with some application to finance
Characterization of student’s t distribution with some application to finance
 
Probability distribution Function & Decision Trees in machine learning
Probability distribution Function  & Decision Trees in machine learningProbability distribution Function  & Decision Trees in machine learning
Probability distribution Function & Decision Trees in machine learning
 
Estimating ambiguity preferences and perceptions in multiple prior models: Ev...
Estimating ambiguity preferences and perceptions in multiple prior models: Ev...Estimating ambiguity preferences and perceptions in multiple prior models: Ev...
Estimating ambiguity preferences and perceptions in multiple prior models: Ev...
 
Thesis_NickyGrant_2013
Thesis_NickyGrant_2013Thesis_NickyGrant_2013
Thesis_NickyGrant_2013
 
Dong Zhang's project
Dong Zhang's projectDong Zhang's project
Dong Zhang's project
 
An investigation of inference of the generalized extreme value distribution b...
An investigation of inference of the generalized extreme value distribution b...An investigation of inference of the generalized extreme value distribution b...
An investigation of inference of the generalized extreme value distribution b...
 
MSL 5080, Methods of Analysis for Business Operations 1 .docx
MSL 5080, Methods of Analysis for Business Operations 1 .docxMSL 5080, Methods of Analysis for Business Operations 1 .docx
MSL 5080, Methods of Analysis for Business Operations 1 .docx
 
Master of Computer Application (MCA) – Semester 4 MC0079
Master of Computer Application (MCA) – Semester 4  MC0079Master of Computer Application (MCA) – Semester 4  MC0079
Master of Computer Application (MCA) – Semester 4 MC0079
 
Statsci
StatsciStatsci
Statsci
 
Approximating_probability_density_functions_for_the_Collective_Risk_Model
Approximating_probability_density_functions_for_the_Collective_Risk_ModelApproximating_probability_density_functions_for_the_Collective_Risk_Model
Approximating_probability_density_functions_for_the_Collective_Risk_Model
 
Mixed Model Analysis for Overdispersion
Mixed Model Analysis for OverdispersionMixed Model Analysis for Overdispersion
Mixed Model Analysis for Overdispersion
 
report
reportreport
report
 

Applications Of Evt In Financial Markets

  • 1. Abstract Extreme Value Theory (EVT) has emerged as an important statistical discipline for the applied sciences. It is useful because it provides techniques for estimating models that predict events occurring at extremely low probabilities. This paper describes EVT and tools such as quantile plots and mean excess plots used to determine the appropriateness of EVT for modeling given data. EVT techniques are then applied to model daily return of stock of three large companies: IBM, Ford and Nortel. The results show that Generalized Pareto Distribution (GPD) can appropriately model extreme daily returns, particularly extreme daily losses. Finally the parameters of the appropriate GPD are estimated, and Value-at-Risk (VaR) and Expected Shortfall, the two key risk measures used by industry practitioners, are calculated based on the estimated GPD. Keywords: Extreme Value Theory, Generalized Pareto Distribution, Value-at- Risk, Expected Shortfall 1 of 34
  • 2. Introduction, Scope & Purpose EVT has been successfully applied in engineering, biology, meteorology, insurance and a myriad of other applied sciences1. This paper will focus on Applications of EVT in Financial Markets. It has been noted that EVT’s application to extreme risk in financial markets maybe motivated by the problem of daily determination of VaR for losses incurred due to adverse market movements. Risk Managers are interested in describing the tail of a loss distribution and measuring the expected size of a loss that exceeds VaR2. Until recently, most parametric methods used the Normal distribution to estimate VaR. However, under the assumption of normality, the risk of high quantiles is underestimated, especially for the fat-tailed series common in financial data. This paper outlines the theoretical underpinnings of EVT and works through examples illustrating how EVT can be applied to financial data. The first part of this paper introduces classical EVT, models for maxima/minima and threshold models. However, modeling the maxima or minima of financial data is of little value to risk managers. Instead, a threshold model based on the Generalized Pareto Distribution (GPD) is argued to be most suited for risk managers because it can be used to model the tail of a loss distribution3. Thus, the second part of this paper models daily returns price for IBM, Ford and Nortel stocks using the Generalized Pareto Distribution. 1 Coles, Stuart. An Introduction to Statistical Modeling of Extreme Values. 2 McNeil, A. “Extreme Value Theory for Risk Managers”. Pg 1-2 3 Ibid. 2 of 34
  • 3. Theoretical Underpinnings4 Classical EVT and Models The fundamental model of Extreme Value Theory is based on the behavior of Mn where: Mn = max{X1, …, Xn} and Xi are independent identically distributed (iid) random variables. In theory, the distribution of Mn can be easily derived if the distribution of Xi are known because if F(z) is the distribution of the Xi, then FMn(z) = P(Mn ≤ z) = P(X1 ≤ z, …, Xn ≤ z) = P(X1 ≤ z)…P(Xn ≤ z) = [F(z) ]n In practice this is not possible because the distributions of the Xi are not usually known. One possible solution to this problem is to estimate F(z) based on observed values and then to derive FMn(z). However this approach is problematic because any estimation involves errors and small errors in estimating F(z) would lead to large errors in the estimation of FMn(z). Another solution is to accept F(z) as unknown and then to try and find a family of functions that model FMn based only on extreme (maximal) data. The arguments to justify this method are analogous to the justifications underlying the Central Limit Theorem. Pursuing this method further, we consider: Mn* = (Mn – bn)/an where {an > 0} and {bn} are constants Appropriate choices of bn and an stabilize location and scale of Mn* as n ∞. All possible limit distributions for Mn* are given by the Extremal Types Theorem: 4 Adapted from book by Stuart Coles. See references. 3 of 34
  • 4. In the above distribution, b is the location parameter, a is the scale parameter and α is the shape parameter. The type I, type II and type III models above are known as the Gumbel, Frechet, and Weibull distributions respectively. This theorem says that regardless of the distribution of the Xi, if we normalize Mn to Mn*, then the distribution of Mn* is of only 3 possible types. These three types of extreme models have distinct forms of behavior corresponding to different forms of the tail distribution of the Xi. Application of EVT requires choosing one of the three models to estimate parameters. But this raises two important problems. Firstly, how do you know which model type to use? A technique is needed to choose the appropriate model type for given data. Secondly, once the decision of model type has been made, all subsequent inferences will rest on the assumption that the decision of model type was correct and thus will not allow for any uncertainty in that decision. These problems are solved by combing the three model forms into the Generalized Extreme Value Distribution: 4 of 34
  • 5. In this combined model, µ is the location parameter, σ is the scale parameter and ξ is the shape parameter. When ξ > 0, the GEV distribution corresponds to the Frechet distribution. When ξ < 0, the GEV distribution corresponds to the Weibull distribution. The case of ξ = 0 can be interpreted as taking the limit as ξ 0 and this corresponds to the Gumbel distribution. By doing statistical inference on ξ, the two problems associated with choosing model types are solved. The data itself now determines the most appropriate type of tail behavior. Furthermore, uncertainty in estimating ξ corresponds to uncertainty in choosing the correct model type. At this point we stop to consider that our original problem was to model Mn, not Mn*. In practice, the constants an and bn may not be known. However, we have shown that P(Mn* ≤ z) = P((Mn - bn)/ an ≤ z) ≈ G(z). Then for large n, we can write P(Mn≤ z) ≈ G((z - bn)/ an) = G*(z) where G*(z) is also a member of the GEV family of distributions. Since the parameters of the distribution have to be estimated anyways, it is irrelevant that the parameters for G(z) are different than the parameters for G*(z) for a given data set. 5 of 34
  • 6. By the above argument, an approach to modeling extremes of Xi is developed. First all the data is blocked into a sequence of observations of size n (n is large). From each block, we can derive block maxima: Mn 1, …, Mn m where Mn i is the block maxima from the block i of size n. The GEV can now be fitted using Mn 1, …, Mn m as data. Often blocks are chosen according to time periods of 1 year. Block Minima At this point let us note that the GEV distribution also provides asymptotic models for minima. Given data z1,…,zn , we can simply maximize -z1,…,-zn. Inference on GEV distribution: The aforementioned method for implementing the GEV distribution required us to divide the data into equal size blocks and fit to the set of block maxima. However choosing block size is always a trade off between bias and variance. Overly small block sizes lead to bias because approximation by the GEV model is poor. Overly large block sizes generate fewer block maxima and thus lead to large estimation variance. For time series data sets, block sizes of one year are commonly chosen because this usually makes plausible the assumption that block maxima have common distribution. Now we consider Z1 ,…,Zn where Zi are iid block maxima from a GEV distribution whose parameters need estimation. The Zi are independent even if the Xi are not independent (as in the case of most time series). Likelihood-based estimation provides one effective method of estimating these parameters. The log-likelihood for the GEV when ξ ≠ 0 is 6 of 34
  • 7. The log-likelihood for the GEV when ξ = 0 (corresponding to the Gumbel distribution) is: For any given data set, these log likelihood functions can be maximized using numerical methods. The estimators derived from this method can be assumed to be approximately multivariate normal and unbiased. Confidence intervals and other inferences follow from this assumption of normality. Model checking can be done by plotting the empirical distribution function evaluated at zi for ordered block maxima against the model evaluated with the estimates. A good fit will produce a linear graph lying close to the line y = x. Threshold Models In our quest to model extreme events, we may be given an entire time series of daily observations. Better use of this data is made by avoiding blocking. If X1, X2, … are iid, then extreme events can be defined as those Xi that exceed some high threshold u. In modeling extreme events, we are interested in the conditional probability of X-u given X > u. Theory tells us that if block maxima of the data have an approximate GEV distribution, then this conditional probability can be approximated by the Generalized Pareto Distribution. 7 of 34
  • 8. Moreover, the parameters of the GPD (modeling excess over threshold) are uniquely determined by the parameters of the associated GEV model regardless of the block size. This is because the shape parameter ξ is independent of block size. Also β = σ + ξ(u – µ) where σ and µ are from the associated GEV distribution. Changing block size n in the associated model adjusts σ and µ in a self-compensating way so that β remains constant. Modeling Threshold Excesses Naturally the first step in modeling extreme data within the framework of threshold models is to choose an appropriate threshold. Choice of threshold is analogous to the problem of choosing the appropriate block size in the GEV model. If the threshold is set too low, then the data beyond the threshold will deviate significantly from the GPD. On the other hand, if the threshold is set too high, there will not be enough data to estimate the model, and a high variance will result. So we must choose as low a threshold as possible provided that the GPD is still a reasonable approximation for excesses beyond the threshold. One method to determine the threshold is to create the mean excess function plot. Theory tells us that if Y has GPD, then E(Y) = β/(1- ξ). Since the conditional distribution of excesses beyond threshold is approximated by GPD, we know from theory that for a threshold u0: E( X– u0 | X > u0 ) = β(u0)/(1- ξ) where β(u0) is the value of β corresponding to the threshold u0. However, if the excess beyond u0 can be modeled with GPD, then so can excess beyond any other threshold u>u0. It has been shown that for u >u0, 8 of 34
  • 9. E( X– u | X > u ) = (β(u0) + ξu) / (1- ξ) This is linear in u. Therefore we expect that for thresholds beyond which the excesses follow a GPD, the conditional mean will be a linear function. Thus we have the following method to determine the threshold. : Let x1, …, xn be the data to be modeled. 1. Order the data: x(1),…, x(n) 2. For each u in { x(1),…, x(n) } calculate the sample mean of the difference between the x’s and u for all x’s > u. In other words, calculate and plot: 3. Identify the point beyond which this graph is approximately linear and choose that as the threshold for the model. Ensure that there are sufficient points beyond the chosen threshold to make meaningful inferences. Estimating Parameters Once the threshold is chosen, likelihood techniques can be used to estimate parameters for the GPD model while considering only the data that lies beyond the chosen threshold. Let y1,…, yk be the excesses of a threshold u (so yi = xi – u for xi > u). The log likelihood function for the GPD in the case where ξ ≠ 0 is: ℓ(β,ξ) = -kln(β) – (1 + 1/ξ)∑ ln(1 + ξyi/β) provided that (1 + ξyi/β) > 0 for i = 1,…,k. In the case of ξ = 0, the log likelihood function is: 9 of 34
  • 10. ℓ(β) = -k*ln(β) – (1/β)∑ yi These log likelihood functions can be numerically maximized and the maximum likelihood estimate (mle) for β, ξ can be found. Model Checking The models validity can be checked with probably plots, quantile plots and density plots. For a threshold u and threshold excesses y(1),…, y(k), the probability plot (for i = 1,…, k) consists of the pairs {i/(k+1), 1 – (1 + ξy(i)/β)-1/ξ }using the mle for ξ The quantile plot consists of the pairs {H-1(i/(k+1)), y(i)} for i= 1,…, k where H-1(t) = u + β/ξ[t-ξ – 1] using the mle for β and ξ. If the GPD is a good fit, the probability plot and the quantile plot will be approximately linear. Also the density function of the fitted GPD can be compared to a histogram of the threshold excesses. Estimating VaR and Expected Shortfall5 As mentioned in the introduction, a major use of EVT in risk management is to characterize the tail of a loss distribution using VaR and Expected Shortfall. VaR is a high quantile of a distribution of losses and can represent an upper bound for losses that is exceeded only rarely. Expected Shortfall is expected size of a loss that exceeds VaR. 5 McNeil, A. “Extreme Value Theory for Risk Managers”. Pg 2-3. 10 of 34
  • 11. Using historical simulation and maximum likelihood estimates of the parameters of GPD, the following tail estimator has been derived: where Nu is the number of data points that exceed the threshold u and n is the total number of data points. The VaR estimate for a probability q is calculated by inverting the tail estimation of the above formula to give: The expected shortfall is related to VaR by the following formula: where the second term is the mean of the excess distribution over the threshold. In practice, these can be calculated using the ‘riskmeasures’ function of the EVIR package in R. Application of EVT We now turn to three examples that illustrate how to fit the GPD to financial data and produce a model for extremes beyond a threshold. The raw data for these examples are the historical prices of IBM, Ford, and Nortel stocks which were downloaded from: IBM stock: http://finance.yahoo.com/q/hp?s=IBM Ford stock: http://finance.yahoo.com/q/hp?s=F Nortel stock: http://finance.yahoo.com/q/hp?s=NT The data analyzed however are historical daily returns price. The returns price for each day was calculated by the formula: 11 of 34
  • 12. Returns price = (today’s price – yesterday’s price)/yesterday’s price Clearly, the returns price is a measure of daily gain or loss in stock price regardless of the actual stock price. Modeling extremes of returns price is useful because it can help risk managers determine what the maximum gain or more importantly, maximum loss that can be incurred in one day. Historical Daily Returns Prices of IBM The time series for IBM ranged between January 2 1980 and March 26 2004. The first step in analyzing this data is to see if it can be satisfactorily modeled by the Normal distribution. We do this by creating a normal quantile plot and look for linearity: Notice that the data near the endpoints deviates from linearity significantly. This implies that the true distribution of the data is fat tailed and so the extremes are not normally distributed. This provides us with the impetus to model the extremes using EVT. 12 of 34
  • 13. Now we must determine the threshold beyond which we can define the data as “extreme”. To do this, we must first construct a plot of the mean excess function. Then we try to determine a high enough point beyond which the plot looks linear but at the same time provides sufficient points for inference. Furthermore, we will omit the three largest losses because they tend to distort the plot6. The mean excess function for different possible thresholds is: From this plot we can estimate the threshold to be approximately 0.06 because the data seems to kink downward at this point. This represents the threshold for daily gain in stock prices. Now we can fit the GPD to data beyond this threshold by using the gpd function in the EVIR software. We get the following results using likelihood methods of estimation: Total Number of Data Points: 6118 Chosen Threshold: 0.06 Number of Points Exceeding Threshold: 44 6 As mentioned in McNeil, A. & Saladin, T. “The Peaks over Threshold Method for Estimating High Quantiles of Loss Distributions” Departement Mathematik ETH Zentrum. 13 of 34
  • 14. Approximate Percentile at which threshold is located: 99th percentile Parameter Estimate for Shape (ξ): -0.1376 Parameter Estimate for β: 0.0253 Variance-Covariance Matrix: Shape Beta Shape 0.0631 -0.0017 Beta -0.0017 5.406e-05 Now we must do diagnostic checks to see if the model is a good fit. The quantile plot of the residuals is: Since this quantile plot is approximately linear, we conclude that the GPD is a good fit for this data. Thus extreme values (beyond 0.06) can be modeled by: G(x) = 1 – (1 + (-0.1376)x/(0.0253))1/(0.1376) We have just modeled the extremes for daily gain of IBM stock prices. However, in many financial situations, we have greater concern with negative values for daily returns because that implies that a loss is incurred. In order to 14 of 34
  • 15. analyze extreme negative values, we need to multiply the given data by -1 and repeat the procedure outlined above. We will now model the negative daily returns for IBM stock prices. The modified mean excess function is: From this plot we choose can choose 0.05 as a threshold. So -0.05 represents the threshold for daily loss. Now we can fit the GPD to data beyond this threshold by using the gpd function in the EVIR software. We get the following results using likelihood methods of estimation: 15 of 34
  • 16. Total Number of Data Points: 6118 Chosen Threshold: 0.05 Number of Points Exceeding Threshold: 46 Approximate Percentile at which threshold is located: 99th percentile Parameter Estimate for Shape (ξ): 0.4689 Parameter Estimate for β: 0.0128 Variance-Covariance Matrix: Shape Beta Shape 0.0566 -0.0005 Beta -0.0005 1.169e-05 Now we must do diagnostic checks to see if the model is a good fit. The quantile plot of the residuals is: 16 of 34
  • 17. Since this quantile plot is approximately linear, we conclude that the GPD is a good fit for this data. Thus the negative extreme values (beyond -0.025) can be modeled by: G(x) = 1 – (1 + (0.4689)x/(0.0128))-1/(0.4689) In risk management, we are interested in estimates of VaR and Expected Shortfall for different p-values of this model. In statistical language, VaR is simply a quantile estimate7. These are easily found for the above model using the EVIR software: p-value Estimate of VaR Estimate of Expected Shortfall 0.99 0.04658902 0.0676375 0.999 0.09292915 0.1548897 0.9999 0.22934078 0.4117342 0.99999 0.63089623 1.1678084 Historical Daily Returns Prices of Ford Historical Prices of Ford Stocks was downloaded from Yahoo Finance. The time series ranged from January 2 1987 to March 26 2004. The returns price was calculated and forms the data for the present analysis. To see if the data has a fat tail, we plot the normal quantiles for this data: 7 McNeil, A. “Extreme Value Theory for Risk Managers” pg 7. 17 of 34
  • 18. We see that the tail curves slightly away from the straight line, indicating deviation from normality. For confirmation, we also plot the empirical distribution function of the data on the log-log scale. A straight line on the double log scale implies Pareto tail behavior8: 8 EVIR help document. 18 of 34
  • 19. We see that the tail is approximately linear. So we are now justified in fitting the GPD to the tails. As before, we must first find the threshold by plotting the Mean Excess function. Furthermore, we will omit the three largest losses because they tend to distort the plot9: 9 As mentioned in McNeil, A. & Saladin, T. “The Peaks over Threshold Method for Estimating High Quantiles of Loss Distributions” Departement Mathematik ETH Zentrum. 19 of 34
  • 20. We see that the graph is approximately linear beyond 0.06; so we will choose this as our threshold. This represents the threshold for maximum possible gain per day. Now we will fit the GPD for the data beyond this threshold using the gpd function of the EVIR package. We get the following results using likelihood methods of estimation: Total Number of Data Points: 4348 Chosen Threshold: 0.03 Number of Points Exceeding Threshold: 47 Approximate Percentile at which threshold is located: 98th percentile Parameter Estimate for Shape (ξ): 0.4607 Parameter Estimate for β: 0.0158 Variance-Covariance Matrix: Shape Beta Shape 0.03637 -0.0003453 Beta -0.0003453 1.306e-05 20 of 34
  • 21. Now we look at the quantile plot of the residuals to see if the GPD model is a good fit: The quantile plot seems to be approximately linear, indicating that we have found a good fit for this data. So we conclude that negative extreme values (beyond 0.03) can be modeled by: G(x) = 1 – (1 + (0.4607)x/(0.0158))-1/(0.4607) The above model corresponds to daily gain of Ford stock prices. In order to analyze extreme negative values, we need to multiply the given data by -1 and repeat the procedure outlined above. We will now model the negative daily returns for Ford stock prices. The last 3 data points in the mean excess function are omitted as before. The mean excess function is now: 21 of 34
  • 22. From this plot we can estimate the threshold to be approximately 0.05. So -0.05 represents the threshold for daily loss. Now we can fit the GPD to data beyond this threshold by using the GPD function in the EVIR software. We get the following results using likelihood methods of estimation: Total Number of Data Points: 4348 Chosen Threshold: 0.05 Number of Points Exceeding Threshold: 58 Approximate Percentile at which threshold is located: 98th percentile Parameter Estimate for Shape (ξ): 0.2646 Parameter Estimate for β: 0.01145 22 of 34
  • 23. Variance-Covariance Matrix: Shape Beta Shape 0.02022 -1.619e-04 Beta -1.619e-04 4.577e-06 Now we must do diagnostic checks to see if the model is a good fit. The quantile plot of the residuals is: Since this quantile plot is approximately linear, we conclude that the GPD is a good fit for this data. Thus negative extreme values (beyond -0.05) can be modeled by: G(x) = 1 – (1 + (0.2646)x/(0.01145))-1/(0.2646) In risk management, we are interested in estimates of VaR and Expected Shortfall for different p-values of this model. These are easily found for the above model using the EVIR software: 23 of 34
  • 24. p-values Estimate of VaR Estimate of Expected Shortfall 0.99 0.05343 0.0702 0.999 0.09260 0.1235 0.9999 0.1646 0.2214 0.99999 0.2971 0.4015 Historical Daily Returns Prices of Nortel Historical Prices of Nortel stocks were downloaded from Yahoo Finance. The time series ranged from December 16 1991 to March 26 2004. The returns price was calculated and forms the data for the present analysis. To see if the data has a fat tail, we plot the normal quantiles for this data: 24 of 34
  • 25. Notice that the data near the endpoints deviates significantly from linearity. This implies that the true distribution of the data is a fat tailed distribution and so the extremes are not normally distributed. This provides us with the impetus to model the extremes using EVT. To choose the threshold we now consider the plot of the mean excess function: From this plot we estimate the threshold to be approximately 0.105. This represents the threshold for the maximum possible gain everyday. Now we can 25 of 34
  • 26. fit the GPD to data beyond this threshold by using the gpd function in the EVIR software. We get the following results using likelihood methods of estimation: Total Number of Data Points: 3093 Chosen Threshold: 0.105 Number of Points Exceeding Threshold: 40 Approximate Percentile at which threshold is located: 98th percentile Parameter Estimate for Shape (ξ): -0.1379 Parameter Estimate for β: 0.04853 Variance-Covariance Matrix: Shape Beta Shape 0.0329 -0.0017 Beta -0.0017 0.0001349 Now consider the following quantile plot of the residual to verify whether the aforementioned model is a good fit for the data: 26 of 34
  • 27. The quantile plot seems to be approximately linear, indicating that we have found a good fit for this data. Thus we conclude that negative extreme values (beyond 0.105) can be modeled by: G(x) = 1 – (1 + (-0.1379)x/(0.04853))-1/(-0.1379) The above model corresponds to the extremes for daily gain of Nortel stock prices. In order to analyze extreme negative values, we need to multiply the given data by -1 and repeat the procedure outlined above. We will now model 27 of 34
  • 28. the negative daily returns for Nortel stock prices. The modified mean excess function is: From this plot we can estimate the threshold to be approximately 0.07. So -0.07 represents the threshold for daily loss. Now we can fit the GPD to data beyond this threshold by using the gpd function in the EVIR software. We get the following results using likelihood methods of estimation: Total Number of Data Points: 3093 Chosen Threshold: 0.07 Number of Points Exceeding Threshold: 77 28 of 34
  • 29. Approximate Percentile at which threshold is located: 97th percentile Parameter Estimate for Shape (ξ): 0.2601 Parameter Estimate for β: 0.0285 Variance-Covariance Matrix: Shape Beta Shape 0.02658 -6.342e-04 Beta -6.342e-04 3.123e-05 Now we must do diagnostic checks to see if the model is a good fit. The quantile plot of the residuals is: 29 of 34
  • 30. Since this quantile plot is approximately linear, we conclude that the GPD is a good fit for this data. So we conclude that negative extreme values (beyond -0.03) can be modeled by: G(x) = 1 – (1 + (0.2601)x/(0.0285))-1/(0.2601) In risk management, we are interested in estimates of VaR and Expected Shortfall for different p-values of this model. These are also easily found for the above model using the EVIR software: p-values Estimate of VaR Estimate of Expected Shortfall 0.99 0.09933 0.1482 0.999 0.2132 0.3021 0.9999 0.4206 0.5823 0.99999 0.7980 1.092 30 of 34
  • 31. R Software and Code Used to Model Data First of all, the EVIR and EVD packages must be downloaded and installed into the R program in order to utilize functions pertaining to EVT. These can be procured for free from the following website: http://www.maths.lancs.ac.uk/~stephena/software.html The following is a generic version of the specific code used to do model the three cases above. //Imports the EVD and EVIR packages needed for modeling. >library(evd) >library(evir) //Reads the file “data.txt” containing data to be modeled. >data = scan(“data.txt”) //Plots the sample normal quantiles against the theoretical normal quantiles >qqnorm(data) //Adds a line to the normal QQ-plot. >qqline(data, col=2) //Plots empirical distribution of data on a log-log scale >emplot(data, alog = “xy”, labels=TRUE) //Creates the plot of the mean excess function for the data. >meplot(data, omit=3, labels=TRUE) //Fits the GPD for data beyond threshold t, and uses maximum likelihood method to //estimate parameters. >FittedData=gpd(data, threshold = t, method = c(“ml”)) 31 of 34
  • 32. //Displays the details of the GPD fit to the data. >FittedData //Provides 4 different plots to assess the fit of the GPD model. The user can choose the //requisite plot from a menu. >plot.gpd(FittedData, labels=TRUE) //Once data is fitted, calculates estimates of quantiles and expected shortfall for the model //for a given vector of probability levels p. >riskmeasures(FittedData, p) 32 of 34
  • 33. Conclusion EVT is here to stay as a technique for the risk managers toolkit. Whenever the tails of probability distributions are of interest, it is natural to consider applying the theoretically supported techniques of EVT. Methods based around the assumptions of normal distributions are likely to underestimate tail risk. Although not perfect, EVT provides the best available models to predict extreme events. In the second part of the study, it was shown that EVT can be used to successfully model the daily returns of the stock prices. It illustrates how EVT can be used as a day-to-day exploratory risk management tool. 33 of 34
  • 34. References 1. Bensalah, Younes. (November 2000) “Steps in Applying Extreme Value Theory to Finance: A Review” Bank of Canada Working Paper 2000-20. 2. Coles, Stuart. An Introduction to Statistical Modelling of Extreme Values. London: Springer, 2001. 3. Embrechts P., Klüppelberg C., & Mikosch T. Modelling Extremal Events for Insurance and Finance. Heidelberg: Springer-Verlag, 1999. 4. McNeil, A. & Saladin, T. (April 24, 1997), “The Peaks over Threshold Method for Estimating High Quantiles of Loss Distributions” Departement Mathematik ETH Zentrum. 5. McNeil, A. (May 17, 1999), “Extreme Value Theory for Risk Managers” Departement Mathematik ETH Zentrum. 6. Stephenson, A. (2003), “EVD Documentation”. Documentation for Extreme Value Distributions package for R Statistical Program. (http://www.maths.lancs.ac.uk/~stephena/software.html) 7. Stephenson, A. (2003), “EVD Documentation”. Documentation for Extreme Value Distributions package for R Statistical Program. (http://www.maths.lancs.ac.uk/~stephena/software.html) 8. Stephenson, A. (2002), “EVIR”. Documentation for Extreme Value In R package for R Statistical Program. (http://www.maths.lancs.ac.uk/~stephena/software.html) 34 of 34