Page 1 of 1

Peak and trough dates

Posted: Tue Jan 11, 2011 8:35 am
by mikela
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.

Re: Peak and trough dates

Posted: Tue Jan 11, 2011 9:10 am
by javiersan
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

Re: Peak and trough dates

Posted: Tue Jan 11, 2011 10:24 am
by mikela
I think that will do, it was so easy!
thanks a LOT!
m.

Re: Peak and trough dates

Posted: Wed Jan 12, 2011 12:43 am
by trubador
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.