Page 1 of 1

how do I retireve last date in current sample

Posted: Fri Mar 29, 2013 4:13 am
by NurfatimaD
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!

Re: how do I retireve last date in current sample

Posted: Fri Mar 29, 2013 6:21 am
by EViews Gareth
Something like:

Code: Select all

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

Re: how do I retireve last date in current sample

Posted: Mon Apr 01, 2013 3:00 am
by NurfatimaD
Something like:

Code: Select all

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