Python implementation of the Hill Estimator and its corresponding Hill Plot within a specified zoomed window, avaliable in the following jypitor notebook
hill_estimator.ipynb
Given the sorted order statistics of a sample, the Hill estimator is defined by
where k is the number of upper order statistics in the sample used for the estimation and n is the number of observed sample values. With increasing k the Hill estimator is stabilizing, and the question is which k gives a reasonable estimation of . One might say that a good approximation of lies within a region where the Hill plot is stable.
For more information about the Hill Estimator, and in general about heavy-tailed time series analysis, I recommend taking a look at this PhD Thesis [1].
- Step 1: Open
hill_estimator.ipynb
. - Step 2: Load time series data, here S&P 500 Stock Index data, and split into gains and losses.
- Step 3: Run code from
utils/functions.py
and plot the Hill plot within some specified zoomed window range.
Get access to some time series data, apply the algorithm for the Hill estimator, and try out different zoomed windows and see what fit the data the best. Cheers!
[1] Xiaolei Xie. Analysis of Heavy-Tailed Time Series. PhD Thesis, School of the Faculty of Science, University of Copenhagen (2017). Link