Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rolling window for VAR

    Hi
    I estimate a structural vector autoregression, imposing long-term restrictions, and estimate the structural shocks below.

    My question is how I can adjust my code to produce the structural shocks in a rolling fashion, (1) using a fixed window of say 40 observations, and (2) using recursive i.e., increasing windows with an initial window if 40 obs.

    Code:
    matrix c=(.,0\.,.)
    svar Y X, lags(1/4) lreq(c)  
    *Get structural shocks
    matrix B=e(B)
    predict e1, res eq(Y)
    predict e2, res eq(X)
    mkmat e1 e2, matrix(e)
    matrix eta=(inv(B)*e')'
    svmat eta
    Hope someone can help

  • #2
    This has been for a while now so I thought to bring it up.
    I think any code that may allow us to estimate vector autoregressions using rolling windows will be a very good step.

    I look forward to hearing from you

    Comment


    • #3

      ssc install asreg

      Comment


      • #4
        Thanks, but I am not sure how -asreg- can be used to estimate rolling vector autoregression. I think it is only capable of estimating linear regressions and not structural vector autoregresions.

        I hope someone can advise more.

        Comment


        • #5
          Originally posted by Lisa Wilson View Post
          Thanks, but I am not sure how -asreg- can be used to estimate rolling vector autoregression. I think it is only capable of estimating linear regressions and not structural vector autoregresions.

          I hope someone can advise more.
          I'm looking for a similar. Did you find anything?

          Comment

          Working...
          X