how do I retireve last date in current sample

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

NurfatimaD
Posts: 20
Joined: Wed May 23, 2012 10:04 pm
Location: Almaty, Kazakhstan

how do I retireve last date in current sample

Postby NurfatimaD » Fri Mar 29, 2013 4:13 am

Good day!

I am trying to rub a back testing for the follwing equation:

Code: Select all

equation cpi.ls log(cpic000/cpic000(-12)) log(mb30(-16)/mb30(-28)) log(lbwnm0000(-9)/lbwnm0000(-21)) log(p_faofoodi(-3)/p_faofoodi(-15)) log(mb30(-6)/mb30(-18))*log(lbwnm0000(-3)/lbwnm0000(-15))*log(p_faofoodi(-3)/p_faofoodi(-15))*log(p_brent/p_brent(-12))*log(cr_stock_total(-24)/cr_stock_total(-36)) log(p_kztusd/p_kztusd(-12)) c
the sample should increase from @first 2009:1 to @first @last. to do this i use the following code:

Code: Select all

%sampstart = "2008m12" 'start period of the back testing for !i=1 to 50 step 1 'repeat the analysis ending 97 periods ahead smpl @first {%sampstart}+!i
but now I need Eviews to retrieve the end date of the sample each time it iterates. Any thouhghts how to do this?

Thank you!

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

Re: how do I retireve last date in current sample

Postby EViews Gareth » Fri Mar 29, 2013 6:21 am

Something like:

Code: Select all

=@otod(@dtoo(%sampstart)+!i)

NurfatimaD
Posts: 20
Joined: Wed May 23, 2012 10:04 pm
Location: Almaty, Kazakhstan

Re: how do I retireve last date in current sample

Postby NurfatimaD » Mon Apr 01, 2013 3:00 am

Something like:

Code: Select all

=@otod(@dtoo(%sampstart)+!i)
Thanks a lot! It really worked! :D


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests