Hi,
I have extended the coverage of my Alfred-related functions to perform
an adjustment for the quite frequently occurring baseperiod changes (in
the case of index numbers which have arbitrary starting values).
These adjustments are only necessary when mixing data with different
publication dates, like for example considering the first published
release of each obs. The adjustments (must) assume that the recorded
change of the respective publication for the new base period is entirely
due to the rescaling, not due to further "substantive" revisions. This
is an identifying assumption which should be relatively harmless,
because when the base change happens in real time, the new base periods
are a couple of years ago already.
Also, I have drastically changed the interface, using a bundle now to
store and pass around the re-used meta parameters. So a typical usage
now looks like this:
<hansl>
include Alfred_realtime_functions_28aug13.inp
# required meta information:
bundle bAlf = null
bAlf.fpath = "(a)workdir\temp.csv" # platform-specific pathsep
bAlf.vname = vname # e.g. "INDPRO"
# some examples:
series @vname_latest = getAlf_ithPub(bAlf,0)
series @vname_19830302 = getAlfVintage(bAlf,"1983-03-02")
series @vname_after3 = getAlf_nthPer(bAlf,3)
# Base revision information from the INDPRO readme file from Alfred:
bAlf.brevdates = "1943-09-22 1953-12-01 1960-01-15 1963-11-15 \ 1971-08-16 \
1985-07-18 1990-04-17 1997-01-27 2002-12-05 2005-11-07 2010-06-25"
bAlf.brevperiods = "1935/1939 1947/1949 1957 1957/1959 1967 1977 \
1987 1992 1997 2002 2007"
## now adjust extracted series to the base changes:
addAlfBrevfactors(&bAlf) # must be called before the next lines
series pubdates_after2 = 0 # requ'd for adjustment
# (to be passed in pointer form)
series @vname_after2 = getAlf_nthPer(bAlf,2,&pubdates_after2)
series @vname_after2adj = \
getAlfBrevAdj(bAlf,@vname_after2,pubdates_after2)
# same for after-3-periods series...
series pubdates_after3 = NA
series @vname_after3 = getAlf_nthPer(bAlf,3,&pubdates_after3)
series @vname_after3adj = \
getAlfBrevAdj(bAlf,@vname_after3,pubdates_after3)
# ... to calculate a revision (log-) diff:
series @vname_relrev23 = log(@vname_after3adj/@vname_after2adj)
</hansl>
Reminder: This still applies to a preprocessed csv file, not directly
from Alfred as-is.
Other useful stuff for the future:
- Adjusting series like real GDP for changes of base periods, where
however the new base values are not constants like 1 or 100, but are
themselves functions of the data.
- Adjusting series for structural definition shifts at certain times,
when the shifts can be reasonably assumed as additive.
Cheers,
sven
Show replies by date