Page 1 of 1

Strange results from basic time series math

Posted: Thu Dec 18, 2014 2:22 pm
by primwallflow
I am trying to generate a series ("lur_test") that shows the percent deviation of a new unemployment projection (hardcoded in the equation) from an older vintage projection (saved in a series called "lur"). I'm filling in the values using the .fill procedure. However, the results aren't what I'm expecting.

For example, for the first date of 2014 Q4, the old projection was 5.95. The new is 5.8. So I expect the result to be ~-0.0252 ((5.8 - 5.95)/5.95). Instead, the below code is giving a result of -0.3067. And even though two projections converge, the below code yields a slightly growing percent gap.

I feel like a complete idiot and that this must be something simple.

Code: Select all

smpl @all series lur_test = 0 lur_test.fill(o="2014Q4") (5.8-lur)/lur, (5.6420-lur)/lur,(5.49-lur)/lur,(5.3568-lur)/lur,(5.25-lur)/lur,(5.1778-lur)/lur,(5.1339-lur)/lur,(5.1105-lur)/lur,(5.1-lur)/lur,(5.0957-lur)/lur,(5.0951-lur)/lur,(5.0969-lur)/lur,(5.1-lur)/lur

Re: Strange results from basic time series math

Posted: Thu Dec 18, 2014 4:14 pm
by EViews Gareth
I'm entirely sure I follow what you're doing, but you can't use .fill like that. .fill can only fill in scalars, not series expressions.