Peak and trough dates

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

mikela
Posts: 14
Joined: Tue Jan 11, 2011 8:24 am

Peak and trough dates

Postby mikela » Tue Jan 11, 2011 8:35 am

Hi everyone,
I am trying to find a procedure to find peaks and troughs dates in a time series with eviews.
It should be something like the Bry and Boschan routine which i found but only in Rats and it would take me quite a bit of time to reproduce in eviews.
Has anyone already dealt with this problem?
Thanks
M.

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Re: Peak and trough dates

Postby javiersan » Tue Jan 11, 2011 9:10 am

I'm not familiar with that paper, but is the following not a solution?

Code: Select all

'With y the original data series 'Finds maxima series max = @recode(y>y(-1) and y>y(+1),y,na) 'Finds minima series min= @recode(y<y(-1) and y<y(+1),y,na)
Regards,

Javier

mikela
Posts: 14
Joined: Tue Jan 11, 2011 8:24 am

Re: Peak and trough dates

Postby mikela » Tue Jan 11, 2011 10:24 am

I think that will do, it was so easy!
thanks a LOT!
m.

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Peak and trough dates

Postby trubador » Wed Jan 12, 2011 12:43 am

Bry-Boschan routine is a non-parametric Business Cycle Dating Algorithm that identifies peaks and troughs. The code above, as noted by javiersan, only finds maxima and minima and therefore should not be considered as a substitute.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests