Page 1 of 1

Frequency conversion

Posted: Tue Aug 15, 2017 11:21 pm
by tvonbrasch
Hi

Frequency conversion:

I have a dataseries for NOK/EURO exchange rate looking something like this (see attachment):

7/02/2000 8.058999999999999
8/02/2000 8.071999999999999
9/02/2000 8.0825
10/02/2000 8.0695
11/02/2000 8.0395
12/02/2000
13/02/2000
14/02/2000 8.0795
15/02/2000 8.0685
16/02/2000 8.112500000000001
17/02/2000 8.1565
18/02/2000 8.1455
19/02/2000
20/02/2000

that is, a daily frequency with alot of NA values. When converting to anual frequency, i want to take the average of the non-NA values, i.e., i use the command:

Code: Select all

euro.setconvert a
.

However, I do not want the annual series to show a value for 2017. Correspondingly, I do not want the quarterly series showing a value for 2017:q3.

In general, when using frequency conversion, how can I make it so that a series will show NA in the period (quarter, month, year) belonging to the current date?
Thomas

Re: Frequency conversion

Posted: Wed Aug 16, 2017 1:22 pm
by EViews Matt
Hello,

I don't think you can accomplish what you want with linked data that contains NAs. With non-linked data, it's trivial to overwrite the last observation after the frequency conversion, e.g.:

Code: Select all

euro(@obsrange) = na

Code: Select all

smpl @last @last euro = na

Code: Select all

smpl if @after(@datestr(@now)) euro = na
The last example has the advantage that if the last observation doesn't include the current date, the series won't be modified (if that's a possibility for your data).

Re: Frequency conversion

Posted: Wed Aug 16, 2017 10:30 pm
by tvonbrasch
great, thanks for showing many different ways of doing this!

yes, that is a possibility with the other data I have, so i will go for the last option you provided
Thomas

Re: Frequency conversion

Posted: Wed Oct 18, 2017 1:32 am
by tvonbrasch
Hi

Can you make it so that also linked variables can be converted to another frequency in this manner in a future release? I.e. it should be an option so that linked series show NA if time equals @after(@datestr(@now)) when copied to other frequencies


Thomas