compute Hill's estimate

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

gka
Posts: 8
Joined: Sat Oct 31, 2015 6:26 pm

compute Hill's estimate

Postby gka » Sat Oct 31, 2015 6:34 pm

Hello guys do you know how I compute Hill's estimate?

The routine bellow does not work and I can not find why...

Code: Select all

' compute Hill's estimate subroutine local hill(scalar hill, series x, scalar m) ' get indices stom(x, xvec) vector xranks= @ranks(xvec) vector m vector xtemp ' get first m observations of sorted data vector(m)=xtemp xtemp = 0 for !i=1 to m xtemp(xranks(!i)) = xvec(!i) next ' find m-th point !xm = xtemp(m) ' find mean of first m-1 points !xsum = @sum(xtemp) - !xm !mean = !xsum / (m - 1) ' compute hill hill = !mean - !xm endsub

gka
Posts: 8
Joined: Sat Oct 31, 2015 6:26 pm

Re: compute Hill's estimate

Postby gka » Sun Nov 01, 2015 9:57 pm

Nobody?

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: compute Hill's estimate

Postby EViews Glenn » Mon Nov 02, 2015 10:49 am

What are you trying to do?

gka
Posts: 8
Joined: Sat Oct 31, 2015 6:26 pm

Re: compute Hill's estimate

Postby gka » Mon Nov 02, 2015 2:00 pm

wach the link below:
http://www.utstat.utoronto.ca/keith/pap ... sthill.pdf (see Introduction 1), Hille estimator, in finance, modeling the
tails of the distribution of returns is important in the evaluation of risk (Embrechts et al.,1997; Brooks et al., 2005).. I find the routine in phoroum but does not work, I want to estimate the hill parametr with eviews because if I estimate it, in another software i must rewrite the total routine again.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: compute Hill's estimate

Postby EViews Glenn » Mon Nov 02, 2015 6:06 pm

Normally don't read papers for the purposes of answering forum questions, but it looked like it would be easy so I took a quick look. I only glanced at the first bit, but if I'm understanding correctly, something like

Code: Select all

!k = 30 series rnks = @ranks(cons, "d") smpl if rnks = !k+1 scalar scale = @mean(cons) smpl if rnks <= !k scalar alpha = 1 / @mean(@log(cons)-log(scale))
should do the trick for k=30.

First line ranks all of the observations in the series (in my case CONS) in descending order.
Next two lines compute the value of the series for the !k+1 rank.
Last two lines restrict sample to the first k descending order statistics, and compute the mean of the log of the scaled data.

Note that as with many things in EViews, you are far better trying to do things using series generation which allows you to avoid loops.

Hope this answers the question.

gka
Posts: 8
Joined: Sat Oct 31, 2015 6:26 pm

Re: compute Hill's estimate

Postby gka » Tue Nov 03, 2015 6:42 am

Thanks, I will try and I will tell you the results...

Lixir
Posts: 2
Joined: Sun Dec 13, 2015 5:29 am
Contact:

Re: compute Hill's estimate

Postby Lixir » Sun Dec 13, 2015 5:35 am



Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests