Writing the current month of the last observation in graphs

For questions regarding programming in the EViews programming language.

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

econanalyst
Posts: 2
Joined: Tue Jan 15, 2013 3:44 am

Writing the current month of the last observation in graphs

Postby econanalyst » Tue Jan 15, 2013 4:09 am

Dear all,

I am quite new with EViews programming language and I have a problems in writing the current MONTH of the last non missing value in a series in its graph. I have tried the following code:

string last= @otod(@ilast(X)) comment: This reads the date of the last non missing value in X

!current month=@otod(@ilast(X)) comment: I know this is not working and I understand what is the problem, I cannot figure out how to solve it.

graph_{%i}.addtext cu. mo.: !cu_month comment: this is the final step. This part of the code is working fine by reading the date from an excel sheet and setting !cu_month=datepart(@elem(Y,V), "mm")
where Y is the series that contains the current excel date.

Take into account that all this goes in a relative big code that is producing around 2000 graphs.
Suggestions?

Thanks for you help!

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

Re: Writing the current month of the last observation in gra

Postby EViews Gareth » Tue Jan 15, 2013 8:48 am

Something like:

Code: Select all

%text = "cu. mo.: " + @datestr(@dateval(@otod(@ilast(x))), "MM") graph_{%i}.addtext {%text}

econanalyst
Posts: 2
Joined: Tue Jan 15, 2013 3:44 am

Re: Writing the current month of the last observation in gra

Postby econanalyst » Wed Jan 16, 2013 12:42 am

Thanks a lot!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests