Orphanides & Norden (2002,1999)

If you are seeking RATS code for implementing a particular technique or replicating results from a paper, post your request here. Be sure to include complete citations for any papers or books.
hardmann
Posts: 252
Joined: Sat Feb 26, 2011 9:49 pm

Orphanides & Norden (2002,1999)

Unread post by hardmann »

Dear Tom:

The real time estimation is popular issue. The unreliability of output-gap estimates in real time (Orphanides & Norden,2002) , The Reliability of Output Gap Estimates in Real Time(Orphanides & Norden,1999) use different detrending method and different datasets, get more comparable result. These data sets is from www.philadelphiafed.org.
Could you give the Replication Examples of Orphanides & Norden (2002)

Best regard
Hardmann
hardmann
Posts: 252
Joined: Sat Feb 26, 2011 9:49 pm

Re: Orphanides & Norden (2002,1999)

Unread post by hardmann »

Dear Tom:

I try to replicate paper for Orphanides & van Norden(1999) "The Reliability of Output Gap Estimates in Real Time ". For simplicity, I use annual gdp data and simple UC model, the codes of UC is from mnz_restat_2003.rpf. My gdp data is from 1978 to 2013 with vantage date from 1993 to 2014.

Estimed method is based on Orphanides & van Norden(1999). They state that the Real-Time estimate of the output gap is constructed in two stages. First, we detrend each and every vintage of data available to construct an ensemble of output gap series. Earlier vintage output gap series are shorter than later vintages since the output series on which they are based end earlier. Next, we use these different vintages to construct a new series which consists entirely of the first available estimate of the output gap for each point in time.

Is it right?


BesT Rrgard
Hardmann


Code: Select all

*  I want to replicate file for Orphanides & van Norden(1999)
*  "The Reliability of Output Gap Estimates in Real Time "
*  For simplity, I use annual gdp data and simple UC model.
*  the codes of UC is mnz_restat_2003.rpf.
*  gdp from 1978 to 2013  with vantage date from 1993 to 2014.
*  new data with one year lag

calendar(a) 1978
open data gdp_rt.xls
data(format=xls,org=columns)

* 22 series of vantage from 1993 to 2014.
dec vector[series] v(23)


* First series is date. vantage number from 2 to 23
do i = 2, 23
   set v(i) = 100*log([series]i)

end do i

compute start = 1992 - 1978 - 1

* The Real-Time estimate of the output gap is constructed in two stages.
* First, we detrend each and every vintage of data available to construct
* an ensemble of output gap series. Earlier vintage output gap series are
* shorter than later vintages since the output series on which they are
* based end earlier. Next, we use these different vintages to construct
* a new series which consists entirely of the first availableestimate of
* the output gap for each point in time.(Orphanides & van Norden,1999)


set gap_rt = %na

do i=2,23

   smpl 1978:1 1990:1+i

*  UC decomposition with AR(2) cycle, fixed trend rate.
*  most of codes come form mnz_restat_2003.rpf

  nonlin mu sn ph1 ph2 se
*  compute mu=0.0, sn=0.0,  ph1=0.0, ph2=0.0, se=0.0

  dec frml[rect] af
  dec frml[vect] zf
  dec frml[symm] swf
*
  frml af = ||1.0,0.0,0.0|$
            0.0,ph1,ph2|$
            0.0,1.0,0.0||
  frml zf = ||mu,0.0,0.0||
  frml swf = %diag(||sn^2,se^2||)
*
   compute [vect] c=||1.0,1.0,0.0||
   compute [rect] f=%identity(2)~~%zeros(1,2)
*

* Get initial guess values
*


   clear ly_hp gap_hp

   filter(type=hp) v(i) / ly_hp
   set gap_hp = v(i) - ly_hp

   linreg gap_hp
   # gap_hp{1 2}
   compute ph1=%beta(1),ph2=%beta(2),se=sqrt(%seesq)

   set trend  1978:1 1991:1+i = t

  linreg ly_hp
  # constant trend
  compute mu=%beta(2)
  compute sn=sqrt(.1*%seesq)
*

* compute vantage = 1991+i
*
  dlm(presample=ergodic,a=af,z=zf,sw=swf,c=c,f=f,y=v(i),method=bfgs,type=filter)  1978:1 1990:1+i states0
*
  set gap_uc 1978:1 1990:1+i = states0(t)(2)

*graph(key=below) 1
*# cycle0


compute temp = gap_uc(start+i)
disp start+i  temp

compute gap_rt(start+i) = gap_uc(start+i)

end do i

*graph(key=below) 1
*# gap_rt

print / gap_rt


graph(key=below) 2
# gap_uc  1992:1 2013:1
# gap_rt  1992:1 2013:1



Attachments
gdp_rt.xls
(45.5 KiB) Downloaded 664 times
Post Reply