Abstract

Daily data are often generated by nondaily processes: for instance, financial markets are closed on weekends and holidays. Stata’s time-series date schemes ([U] 24.3 Timeseries dates) allow for daily data, but gaps in time series may be problematic. A model that uses lags or differences will lose several observations every time a gap appears, discarding many of the original data points. Analysis of “business-daily” data often proceeds by assuming that Monday follows Friday, and so on. At the same time, we usually want data to be placed on Stata’s time-series calendar so that useful tools such as the tsline graph will work and label data points with readable dates; see [TS] tsline. At a recent Stata Users Group presentation in Boston, David Drukker spoke to this point. His solution: generate two date variables, one containing the actual calendar dates, another numbering successive available observations consecutively. The former variable (caldate )i stsset (see [TS] tsset) when the calendar dates are to be used, whereas the latter (seqdate )i stsset when statistical analyses are to be performed. We download daily data on the 3-month U.S. Treasury bill rate with Drukker’s freduse command (Drukker 2006) and retain the August 2005–present data for analysis. (We can also view the data graphically with tsline.)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.