Dear friends,
Now I have a time series contains daily stock price data from 2000/1/1 to 2020/12/31, what I want is to create 240 monthly subsamples(for example, use the daily data of 2000m01 to create the first monthly subsample, use the daily data of 2000m02 to create the second monthly subsample and so on).
I know the command of creating subsamples is "smpl" but I don't know how to create these subsamples in batch because I'm very new to Eviews programming, if anyone can help me, I will be greatly grateful(I'm using E10).
Thank you in advance!
(P.S. Because of the time difference, I may not reply immediately, please forgive me.)
How to create subsamples by date in batch?
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to create subsamples by date in batch?
Code: Select all
for !i=1 to 240
smpl 2000m1+!i-1 2000m1+!i-1
next
Follow us on Twitter @IHSEViews
Re: How to create subsamples by date in batch?
Thank you, sir. You've really helped me a lot and I'll try.
Re: How to create subsamples by date in batch?
EViews Gareth wrote:Code: Select all
for !i=1 to 240
smpl 2000m1+!i-1 2000m1+!i-1
next
Sorry to disturb you again, I also want to know how to generate a corresponding series after generating subsamples? For example, after generating 240 stock price subsamples, 240 new stock price series are also generated. Thank you again for your help!
-
- EViews Developer
- Posts: 563
- Joined: Thu Apr 25, 2013 7:48 pm
Re: How to create subsamples by date in batch?
Hello,
You can include a series statement in the for loop to create the series, but the details will depend on how you want to name and optionally initialize the series (???).
You can include a series statement in the for loop to create the series, but the details will depend on how you want to name and optionally initialize the series (???).
Code: Select all
for !i=1 to 240
smpl 2000m1+!i-1 2000m1+!i-1
series ??? = ???
next
Re: How to create subsamples by date in batch?
EViews Matt wrote:Hello,
You can include a series statement in the for loop to create the series, but the details will depend on how you want to name and optionally initialize the series (???).Code: Select all
for !i=1 to 240
smpl 2000m1+!i-1 2000m1+!i-1
series ??? = ???
next
Thank for your answer very much, Matt. I have created corresponding series in another way, which you might have seen in my another post(doing it my way creates new problems, and you've helped me again).
Who is online
Users browsing this forum: No registered users and 45 guests