On Fri, 23 May 2014, Sven Schreiber wrote:
Am 23.05.2014 01:01, schrieb Allin Cottrell:
>
> As a general comment, I'd say it's pretty uncommon to have to do
> this sort of thing: almost all 5-day daily data does not include
> weekends stuffed with NAs. So while gretl should be able to deal
> with it, I don't think we have to go to great lengths to make it a
> unitary ("one stop shopping") operation.
As I said I don't have that much experience with daily data, but this
came from the Bundesbank website, not a very obscure source. Don't know
whether it's common or not, though.
The 5-day data I've seen to date hasn't contained blank weekends, but then
I haven't really worked with daily data much so maybe my comment was not
well informed.
Anyway, there are a couple of new things in CVS that should be helpful.
1) If the current dataset is 7-day or 6-day daily and you apply a
restriction via "smpl", we check to see whether the restricted dataset is
still "OK" as 6- or 5-day data. If so, we re-establish its time-series
credentials.
2) I've added something Jack suggested: a --permanent option to "smpl",
which substitutes the restricted dataset for the original. This will need
some testing. Right now it's not available in the context of just moving
the sample end-points: it's valid only in association with the options
--restrict, --dummy, --no-missing or --random.
Along with the generalization of weekday() this means that you can discard
empty weekends to get a 5-day dataset in two lines of hansl.
<hansl>
open <seven-day-data>
series wd = weekday($obsmajor,$obsminor,$obsmicro)
smpl wd >= 1 && wd <= 5 --restrict --permanent
</hansl>
Allin