Page 1 of 1

Series relative to fixed month

Posted: Wed Nov 01, 2017 6:08 am
by tvonbrasch
Hi

I have monthly data and I want to crreat a series that is a ratio of a variable relative to the value of the variable in december the year before, i.e.,

Code: Select all

y_mar_2017 = x_mar_2017 / x_dec_2016
y_feb_2017 = x_feb_2017 / x_dec_2016
y_jan_2017 = x_jan_2017 / x_dec_2016
y_dec_2016 = x_dec_2016 / x_dec_2015
y_nov_2016 = x_nov_2016 / x_dec_2015
....



what is the best way to create such a y-series?
Thomas

Re: Series relative to fixed month

Posted: Wed Nov 01, 2017 7:47 am
by EViews Gareth

Code: Select all

x/@lastsby(x, @year)

Re: Series relative to fixed month

Posted: Wed Nov 01, 2017 8:40 am
by tvonbrasch
excellent, thanks
Thomas