Date of last observation

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

miorinnovo
Posts: 123
Joined: Sun Mar 01, 2015 5:01 pm

Date of last observation

Postby miorinnovo » Mon Jun 15, 2015 11:51 am

I can't seem to figure out how to change the workfile range to the date of the last observation of a series. For example,
pagestruct(end=@now)

But instead of @now which gives todays date, I want the date of the last observation of a series "xyz"

Any ideas?

Thanks

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11851
Joined: Tue Sep 16, 2008 5:38 pm

Re: Date of last observation

Postby EViews Gareth » Mon Jun 15, 2015 5:04 pm

Code: Select all

%end = xyz.@last
pagestruct(end={%end})
Follow us on Twitter @IHSEViews

miorinnovo
Posts: 123
Joined: Sun Mar 01, 2015 5:01 pm

Re: Date of last observation

Postby miorinnovo » Mon Jun 15, 2015 7:33 pm

Thanks Gareth!

geoanstats
Posts: 1
Joined: Wed Oct 03, 2018 8:58 am

Re: Date of last observation

Postby geoanstats » Wed Oct 03, 2018 9:04 am

How could I create a "start" date using a similar method by referencing the date 24 months prior to the last observation - for creating a sample instead of pagestruct?

EViews Matt
EViews Developer
Posts: 292
Joined: Thu Apr 25, 2013 7:48 pm

Re: Date of last observation

Postby EViews Matt » Wed Oct 03, 2018 9:17 am

Code: Select all

%end = xyz.@last
%start = @datestr(@dateadd(@dateval(%end), -24, "M"))
smpl {%start} {%end}


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 11 guests