HILLGEV Procedure |
@HILLGEV estimates the tail index of a distribution using Hill's(1975) method.
@HillGEV( options ) series start end
Parameters
|
series |
series to analyze |
|
start, end |
range of series to use. By default, the defined range of series. |
Options
TAIL=[LEFT]/RIGHT
Selects which tail to analyze.
ORDER/[NOORDER]
Use ORDER if the series is not already sorted (in increasing order). If you're doing the estimates for more than one span, it's a good idea to sort (a copy of) the series first.
SPAN=number of extreme observations used [10% of number of data points]
SMPL=standard SMPL option [not used]
Variables Defined
|
%%HILL |
estimate of the tail index (REAL) |
|
%%HILLSE |
estimate of the standard error for %%HILL (REAL) |
Example
This shows calculation of the tail index (for each tail) using the 190 most extreme values. (The full example analyzes different values for SPAN). This is from one of the Tsay textbook examples.
*
* Tsay, Analysis of Financial Time Series, 3rd edition
* Example 7.5.3 from pp 348-353
*
open data d-ibmln98.dat
data(format=free,org=columns) 1 9190 ibmlog
*
mvstats(min=mins,max=maxs,span=21) ibmlog
sample(smpl=%clock(t,21)==21) mins / mincomp
sample(smpl=%clock(t,21)==21) maxs / maxcomp
spgraph(footer="Figure 7.3 Maximum and minimum daily log returns (subperiod=21 days)",vfields=2)
graph(header="(a) Monthly maximum log returns")
# maxcomp
graph(header="(b) Monthly minimum log returns")
# mincomp
spgraph(done)
*
* Create a sorted version of ibmlog. (Most of the time computing Hill's
* estimate is spent sorting the data set).
*
set sorted = ibmlog
order sorted
*
report(action=define)
report(atrow=1,atcol=1,fillby=cols) "q" "Maximum" "Minimum"
report(atrow=1,atcol=2,tocol=3,span,align=center) "190"
@HillGEV(span=190,tail=right) sorted
report(atrow=2,atcol=2) %%hill %%hillse
@HillGEV(span=190,tail=left) sorted
report(atrow=3,atcol=2) %%hill %%hillse
Copyright © 2026 Thomas A. Doan