heterogeneous autoregressive model(HAR)
heterogeneous autoregressive model(HAR)
Dear Sir,
I am trying to estimate a multivariate heterogeneous autoregressive model,that is
Yt=β0+∑_(h={1,5,22})▒〖βhYh,t-1〗+εt,whereYh,t=1/h ∑_(i=0)^(h-1)▒〖Yt-i〗
My question is I don't know how to do it with RATS. It seems that it can not use the code "system".
Please let me know how to do it. Thank you very much!
I am trying to estimate a multivariate heterogeneous autoregressive model,that is
Yt=β0+∑_(h={1,5,22})▒〖βhYh,t-1〗+εt,whereYh,t=1/h ∑_(i=0)^(h-1)▒〖Yt-i〗
My question is I don't know how to do it with RATS. It seems that it can not use the code "system".
Please let me know how to do it. Thank you very much!
Re: heterogeneous autoregressive model(HAR)
Could you post a readable version of the formula? You can attach a PDF or a PNG.
Re: heterogeneous autoregressive model(HAR)
Dear Tom,
Thanks for your reply.
Sorry to comfuse you. The model I would like to do is like the attached PNG.
Best regards
Thanks for your reply.
Sorry to comfuse you. The model I would like to do is like the attached PNG.
Best regards
- Attachments
-
- 2.png (4.32 KiB) Viewed 13481 times
-
- 1.png (5.69 KiB) Viewed 13481 times
Re: heterogeneous autoregressive model(HAR)
Isn't the YH series just data? You can compute that using FILTER with TYPE=LAGGING and WIDTH=H, then use the resulting series at lags 1, 5 and 22.
Re: heterogeneous autoregressive model(HAR)
Dear Tom,
Thanks for your reply.
Actually I would like to use the heterogeneous autoregressive model(HAR) to compute Diebold Spillover Index. As for Diebold model, he use VAR as the base model and can use the following code for estimation. My question is how to rewrite it so that I can estimate the HAR model.
Best Regards
Thanks for your reply.
Actually I would like to use the heterogeneous autoregressive model(HAR) to compute Diebold Spillover Index. As for Diebold model, he use VAR as the base model and can use the following code for estimation. My question is how to rewrite it so that I can estimate the HAR model.
Best Regards
Code: Select all
system(model=volvar)
variables vols
lags 1 2 3 4
det constant
end(system)
*
estimate(noprint)Re: heterogeneous autoregressive model(HAR)
So your equations (which look univariate) are actually supposed to be vector processes?
Re: heterogeneous autoregressive model(HAR)
yes.The model I would like to estimate is a multivariate version of heterogeneous autoregressive model and use it to calculate the Diebold spillover index.
Re: heterogeneous autoregressive model(HAR)
Is it possible to regard the data as panel data and use the command "pregress" to estimate it?
Re: heterogeneous autoregressive model(HAR)
That is definitely not how you would do that. There's nothing about that model that uses any panel data techniques. As you describe that, it seems like a job best handled by ENCODE and UNRAVEL since they're heavily constrained autoregressions.
However, I'm puzzled about what is "heterogeneous" about that model.
However, I'm puzzled about what is "heterogeneous" about that model.
Re: heterogeneous autoregressive model(HAR)
Dear Tom,
Thanks for your reply. I have tried the command "ENCODE" and it seems that this command along with "LINREG" can perfectly handle univariate version of heterogeneous autoregressive model. I tried but failed to extend it to multivariate case.As my final purpose is to calculate the Diebold Spillover Index,this estimation becomes the basic of my idea. Could you please give me some clues about it.
The heterogeneous autoregressive model was first proposed by Corsi, F. (2009) in his paper"A simple approximate long memory model of realized volatility" in Journal of Financial Econometrics 7, 174-196. As Corsi points out, the HAR model can consider different regression components get over different time horizons and thus termed heterogeneous autoregressive model.
Best regards
Thanks for your reply. I have tried the command "ENCODE" and it seems that this command along with "LINREG" can perfectly handle univariate version of heterogeneous autoregressive model. I tried but failed to extend it to multivariate case.As my final purpose is to calculate the Diebold Spillover Index,this estimation becomes the basic of my idea. Could you please give me some clues about it.
The heterogeneous autoregressive model was first proposed by Corsi, F. (2009) in his paper"A simple approximate long memory model of realized volatility" in Journal of Financial Econometrics 7, 174-196. As Corsi points out, the HAR model can consider different regression components get over different time horizons and thus termed heterogeneous autoregressive model.
Best regards
Re: heterogeneous autoregressive model(HAR)
You need a separate ENCODE instruction (using the NOCLEAR option) for each variable and each horizon, so you would end up with 12 constructed variables.
Re: heterogeneous autoregressive model(HAR)
Dear Tom,
Thanks for your reply.
Could you please help me check whether the following code is right for doing the estimation of HAR model. It seems RATS will round 1/5 or 1/22 to 0, so I use 0.2 and 0.04545 instead of 1/5 and 1/22 in the code.
Thanks for your reply.
Could you please help me check whether the following code is right for doing the estimation of HAR model. It seems RATS will round 1/5 or 1/22 to 0, so I use 0.2 and 0.04545 instead of 1/5 and 1/22 in the code.
Code: Select all
clear(all)
open data rv.xls
data(format=xls,org=columns,top=1,left=1) 1 1327 srv frv
set rvu = srv
set rv = frv
declare rect a
dim a(1,5)
compute %do(j,1,%cols(a),a(1,j)=0.2)
declare rect b
dim b(1,22)
compute %do(j,1,%cols(b),b(1,j)=0.04545)
encode(results=rvu_5,noclear) a
# rvu{0 to 4}
encode(results=rv_5,noclear) a
# rv{0 to 4}
encode(results=rvu_22,noclear) b
# rvu{0 to 21}
encode(results=rv_22,noclear) b
# rv{0 to 21}
equation eq_1 rvu
# constant rvu{1} rvu_5{1} rvu_22{1}
equation eq_2 rv
# constant rv{1} rv_5{1} rv_22{1}
group eq eq_1 eq_2
sur(model=eq)
Re: heterogeneous autoregressive model(HAR)
Yes. 1/22 isn't the same as 1.0/22.
If it's a VAR, wouldn't you need to include all the cross terms as well? This looks like it will do what you describe:
linreg(define=eq_1,unravel) rvu
# constant rvu{1} rvu_5{1} rvu_22{1} rv{1} rv_5{1} rv_22{1}
linreg(define=eq_2,unravel) rv
# constant rvu{1} rvu_5{1} rvu_22{1} rv{1} rv_5{1} rv_22{1}
group mymodel eq_1 eq_2
If it's a VAR, wouldn't you need to include all the cross terms as well? This looks like it will do what you describe:
linreg(define=eq_1,unravel) rvu
# constant rvu{1} rvu_5{1} rvu_22{1} rv{1} rv_5{1} rv_22{1}
linreg(define=eq_2,unravel) rv
# constant rvu{1} rvu_5{1} rvu_22{1} rv{1} rv_5{1} rv_22{1}
group mymodel eq_1 eq_2