Long Run Restrictions Via Sign Restrictions

Questions and discussions on Vector Autoregressions
macro_man
Posts: 24
Joined: Fri Apr 10, 2009 1:53 pm

Long Run Restrictions Via Sign Restrictions

Unread post by macro_man »

Here is a paper that effectively imposes something like a BQ long-run restriction by imposing sign restrictions such that the sign restriction on a shock is set close to 0 at a long-horizon. How would one modify the Uhlig example code to do this? Thanks in advance.

http://www.crei.cat/activities/crei_sem ... shioji.pdf
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Long Run Restrictions Via Sign Restrictions

Unread post by TomDoan »

The following would replace the UhligAccept function to test for near-zeros at certain horizons.

Code: Select all

*
* UhligAcceptLR(q,steps,constrained) returns a 1 (accept) or 0 (reject)
* for the weight vector <<q>> (applied to the impulse responses in the
* global RECT[SERIES] impulses). <<steps>> is the list of responses
* constrained. <<constrained>>  is a VECT[INTEGER] with the variable
* positions being constrained. To check for near-zeros for the first
* variable at steps 80, 100 and 120, use
*
* UhligAcceptLR(q,||80,100,120||,||1||)
*
function UhligAcceptLR q steps constrained
type integer   UhligAcceptLR
type vector    q
type vect[int] steps
type vect[int] constrained
*
local integer      i k
local vector       ik
local real         value
dec   rect[series] impulses
*
dofor k = steps
   compute ik=%xt(impulses,k)*q
   do i=1,%rows(constrained)
      compute value=ik(constrained(i))
      if value>.01.or.value<-.01 {
         compute UhligAcceptLR=0
         return
     }
   end do i
end do k
compute UhligAcceptLR=1
end
Post Reply