On Thu, 8 Nov 2007, John C Frain wrote:
I imported some daily daily data into gretl using the ods importer.
Dates were in column one and variable names in row 1. It recognised
my data as a daily time series with 5 days per week and had the
correct start date. Excellent!!
So far, so good.
However I found a small problem (or at least it did not do
exactly what i wanted). The first few rows of the ods file were
Date Alpha Beta Gamma Delta
1991-12-30 1.6490 -0.0307 0.5301 -0.0587
1991-12-31 1.6497 -0.0303 0.5303 -0.0588
1992-01-02 1.6510 -0.0273 0.5304 -0.0583
1992-01-03 1.6517 -0.0260 0.5305 -0.0581
1992-01-06 1.6517 -0.0258 0.5305 -0.0582
1992-01-07 1.6515 -0.0245 0.5301 -0.0576
The first of these is a Monday. Note that Wednesday 1992-01-01
was missing from my data set as this is a bank holiday. Gretl
however inserted a 1 January date and allocated the data from 2
January to 1 January. I assume that gretl decides correctly
that the series is daily, 5 days per week, and starts on
1991-12-30. It then sets up a list of dates with 5 days per
week and allocates the data to those dates without reference to
the dates on the ods file.
Yes, that's what happened, though in fact it was not what was
intended. Fixed in CVS and snapshot.
Would it be possible for a future version of the ods importer to
check that the dates correspond. If they did not perhaps it
could write NAs in the gretl file against the missing date and
then check the next date.
The importer should now respect the date labels, provided they're
consistent. It would be possible to insert NAs, but I think in
most cases that's not what one wants. With NAs, you can't do
anything autoregressive. And with daily market data where the NAs
(if inserted) represent non-trading days it's probably legitimate
to treat the data as if there's nothing missing.
Suppose the markets didn't trade on a certain Thursday. Do we say
that Friday's y(-1) is NA, or that it is Wednesday's observation
on y? I suspect most of the time you'd want the latter (and would
be annoyed if gretl stuck in NAs that weren't there in the
original file).
Allin.