Last Data Point of the Year
Posted: Mon Oct 25, 2010 3:51 pm
Hello All.
I'm trying to create a simple year-to-date (ytd) % change calculation i.e. genr seriesXytd = seriesX/seriesX(-ytd)
how can I reliably obtain a value for the "ytd" variable?
i've tried creating a scalar value a al
smpl 31/12/2009 25/10/2010
fetch(d=database) seriesX
scalar ytd = @obs(seriesX)
but unfortunately because i use many series (whose last data point may or may not be today's date) one scalar value use for all ytd calculations is incorrect
Many thanks in advance for any help
Wes
I'm trying to create a simple year-to-date (ytd) % change calculation i.e. genr seriesXytd = seriesX/seriesX(-ytd)
how can I reliably obtain a value for the "ytd" variable?
i've tried creating a scalar value a al
smpl 31/12/2009 25/10/2010
fetch(d=database) seriesX
scalar ytd = @obs(seriesX)
but unfortunately because i use many series (whose last data point may or may not be today's date) one scalar value use for all ytd calculations is incorrect
Many thanks in advance for any help
Wes