Is it possible conduct a rolling BDS on data in EViews? I have tried a few different loops but it doesn't seem to be working.
Any suggestions?
Thanks
Rolling BDS test
Moderators: EViews Gareth, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13294
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rolling BDS test
Sure it is.
Code: Select all
create u 1000
series y=@nrnd
!window = 50
!step = 20
for !i=1 to 100 step !step
smpl @first+!i-1 @first+!i+!window-1
y.bdstest(o=vec!i)
next
Follow us on Twitter @IHSEViews
Re: Rolling BDS test
Hi Gareth,
Thanks for your reply. However the code seems to not work.
When I input the line "for !i=1 to 100 step !step", an error message appears saying 'flow of control statement executed from the command list".
And then after I input the next line I get "error in sample !I is not defined".
Can you help with this or tell me what the issue is?
Many thanks
Andrew
Thanks for your reply. However the code seems to not work.
When I input the line "for !i=1 to 100 step !step", an error message appears saying 'flow of control statement executed from the command list".
And then after I input the next line I get "error in sample !I is not defined".
Can you help with this or tell me what the issue is?
Many thanks
Andrew
Re: Rolling BDS test
Hi
I just used Gareth's program (copied from the post and pasted not retyped) and it worked fine.
I use EV8
I just used Gareth's program (copied from the post and pasted not retyped) and it worked fine.
I use EV8
Re: Rolling BDS test
Hi Terry,
I have done the same but I still get an error message. I also use EV8. I have named the series 'y'. Does it matter how many observations there are? I am also using a clean Eviews file.
I am missing something really stupid.
Thanks
Andrew
I have done the same but I still get an error message. I also use EV8. I have named the series 'y'. Does it matter how many observations there are? I am also using a clean Eviews file.
I am missing something really stupid.
Thanks
Andrew
Re: Rolling BDS test
Why did you rename the series? It's already called y or did you type 'y' instead of y?
Re: Rolling BDS test
What i meant was that I have named my series y, and then copied and pasted the code and I get the error message "flow of control statement executed from the command line".
Re: Rolling BDS test
Thanks guys, I have got it to work.
One more question: I have over 10,000 observations and want a window size of 500 that rolls 10 observations at a time, thus the number of outputs will be quite large. Is there anyway to have the outputs put in a matrix one after another?
Thanks again,
Andrew
One more question: I have over 10,000 observations and want a window size of 500 that rolls 10 observations at a time, thus the number of outputs will be quite large. Is there anyway to have the outputs put in a matrix one after another?
Thanks again,
Andrew
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13294
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rolling BDS test
You can use the colplace function to put the column of results into a matrix.
Follow us on Twitter @IHSEViews
Re: Rolling BDS test
Thanks for your reply Gareth.
So far I have the following code for a 5079 observation sample running the BDS test for a 500 observation window rolling forward 20 observations at a time;
create u 5079
series y=@nrnd
!window = 500
!step = 20
for !i=1 to 5079 step !step
smpl @first+!i-1 @first+!i+!window-1
y.bdstest(o=vec!i)
next
I have tried to input the colplace function but it doesn't seem to work. Can you help with this?
Also, is it possible for the rolling bds test to provide the p-values/z-statistics as well? What do you need to input?
Thanks again and I look forward to your reply.
So far I have the following code for a 5079 observation sample running the BDS test for a 500 observation window rolling forward 20 observations at a time;
create u 5079
series y=@nrnd
!window = 500
!step = 20
for !i=1 to 5079 step !step
smpl @first+!i-1 @first+!i+!window-1
y.bdstest(o=vec!i)
next
I have tried to input the colplace function but it doesn't seem to work. Can you help with this?
Also, is it possible for the rolling bds test to provide the p-values/z-statistics as well? What do you need to input?
Thanks again and I look forward to your reply.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13294
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rolling BDS test
How did you use colplace?
Have you looked up the .bdstest procedure in the object reference?
Have you looked up the .bdstest procedure in the object reference?
Follow us on Twitter @IHSEViews
Re: Rolling BDS test
I use the following code and it works great! However when I include in the bracket e=2, I get a zero output each time. Is there anyway of storing the bootrapped p-values, or the ordinary p-values? (I can't see an option for this in the object reference).
create u 5079
series y=@nrnd
!window = 500
!step = 20
for !i=1 to 5079 step !step
smpl @first+!i-1 @first+!i+!window-1
y.bdstest(o=vec!i, b=1000, d=10, m=s)
next
Also I am confused about how to use colplace - can you help?
create u 5079
series y=@nrnd
!window = 500
!step = 20
for !i=1 to 5079 step !step
smpl @first+!i-1 @first+!i+!window-1
y.bdstest(o=vec!i, b=1000, d=10, m=s)
next
Also I am confused about how to use colplace - can you help?
Return to “Suggestions and Requests”
Who is online
Users browsing this forum: No registered users and 6 guests