RainbowStats™ · Series commands
SERIES_BETWEEN
Select observations within an inclusive date window.
Syntax
Sample=SERIES_BETWEEN(seriesOrList,start,end)Runnable example
Growth=LOGDIFF(INDPRO)
Sample=SERIES_BETWEEN(Growth,19750101,20191231)
EXTRACT(Sample,"summary")Dates and boundaries
Pass real calendar dates as numeric YYYYMMDD values, for example 19750101 and 20191231. The arguments are converted to dates, then delegated to the series date-window implementation. For a DataList, the same window is applied separately to each member.
Both endpoints are inclusive in live monthly checks. FRED observations dated January 1 and February 1 were both retained by 19750101,19750201. EIA observations dated January 31 and February 28 were both retained by 19750131,19750228.
Bounds refer to observation timestamps, not whole named months. An end date of December 1 can exclude an EIA observation dated December 31. To select the full January 1975 through December 2019 interval regardless of month-start or month-end labels, use 19750101,20191231 and verify the returned dates and counts.
Transform before clipping when prior history is needed
Growth=LOGDIFF(INDPRO)
Sample=SERIES_BETWEEN(Growth,19750101,20191231)This lets January 1975 growth use December 1974. By contrast, calculating LOGDIFF only after cutting the input levels at January 1975 removes the preceding comparison observation and can lose the first requested change. The same principle applies to differences, lags and other backward-looking transformations.
Regression and time-series models can still lose observations to their own lag requirements. A requested date window is not a guarantee of the final estimation start date.
Return and limitations
A series input returns a series; a DataList returns a DataList in member order. This command only selects dates. It does not align different series, convert their frequency, remove internal gaps or fill missing values. Use the appropriate preparation commands separately and inspect the result.
Alias: BETWEEN.