Most established techniques that search for structural breaks in time series may not be able to identify slight changes in the process, especially when looking for frequency changes. The problem is that many of the techniques assume very smooth local spectra and tend to produce overly smooth estimates. The problem of over-smoothing tends to produce spectral estimates that miss slight frequency changes because frequencies that are close together will be lumped into one frequency. The goal of this work is to develop techniques that concentrate on detecting slight frequency changes by requiring a high degree of resolution in the frequency domain.
1 Introduction
Many time series are realizations of nonstationary random processes, hence estimating their time varying spectra may provide insight into the physical processes that give rise to these time series. For example, EEG time series are typically nonstationary, and estimating the time varying spectra based on the EEG of epilepsy patients may lead to methods capable of predicting seizure onset; e.g., see
[2]. Similarly, analyzing the time varying spectrum of the Southern Oscillation Index (SOI) may further our knowledge of the frequency of the El Niño Southern Oscillation (ENSO) phenomenon and its impact on global climate; e.g., see
[3].
Most established techniques that search for structural breaks in time series, however, may not be able to identify slight frequency changes at the resolution of interest. Of course, the resolution depends on the particular application. The problem is that many of the techniques assume very smooth local spectra and tend to produce overly smooth estimates. The problem of assuming very smooth spectra produces spectral estimates that may miss slight frequency changes because frequencies that are close together will be lumped into one frequency; see Sect. 5 for further details. The goal of this work is to develop techniques that concentrate on detecting slight frequency changes by requiring a high degree of resolution in the frequency domain.
The basic assumptions here are that, conditional on the location and number of segments, the time series is piecewise stationary with each piece having a spectral density. A detailed description of the model is given in Sect. 2. In addition to representing time series that have regime changes, the model can be used to approximate slowly varying processes; e.g., see
[1], which uses dyadic segmentation to find the approximate location of breakpoints. The approach taken in
[8] was to fit piecewise AR models using minimum description length and a genetic algorithm for solving the difficult optimization problem.
[13] proposed nonparametric estimators based on dyadic segmentation and smooth local exponential functions.
[15] estimated the log of the local spectrum using a Bayesian mixture of splines. The basic idea of this approach is to first partition the data into small sections. It is then assumed that the log spectral density of the evolutionary process in any given partition is a mixture of individual log spectra. A mixture of smoothing splines model with time varying mixing weights is used to estimate the evolutionary log spectrum. Later,
[16] improved on the technique of
[15] by adaptively selecting breakpoints.
For background, note that spectral analysis has to do with partitioning the variance of a stationary time series, , into components of oscillation indexed by frequency , and measured in cycles per unit of time, for . Given a time series sample, , that has been centered by its sample mean, the sample spectral density (or periodogram) is defined in terms of frequency :
(1)
The periodogram is essentially the squared-correlation of the data with sines and cosines that oscillate at frequency .
The spectral density, , of a stationary time series can be defined as the limit () of , provided that the limit exists; details can be found in
[17, Chap. 4]. It is worthwhile to note that , , and
(2)
where . Thus, the spectral density can be thought of as the variance density of a time series relative to frequency of oscillation. That is, for positive frequencies between 0 and 1/2, the proportion of the variance that can be attributed to oscillations in the data at frequency is roughly . If the time series is white noise, that is, is independent of time t, and for all , then . The designation white originates from the analogy with white light and indicates that all possible periodic oscillations are present with equal strength.
2 Model and Existing Methods
Let a time series consist of an unknown number of segments, m, and let be the unknown location of the end of the jth segment, , with and . Then conditional on m and , we assume that the process is piecewise stationary. That is,
(3)
where for , the processes have spectral density that may depend on parameters , and if and 0 otherwise.
Consider a realization from process (3), where the number and locations of the stationary segments is unknown. Let be the number of observations in the jth segment. We assume that each is large enough for the local Whittle likelihood (see
[20]) to provide a good approximation to the likelihood. Given a partition of the time series , the jth segment consists of the observations , , with underlying spectral densities and periodograms , evaluated at frequencies , . For a given partition , the approximate likelihood of the time series is given by
(4)
Note that in setting up the model, most items depend on the number of regimes, m. For ease, that dependence is understood and dropped from the notation.
2.1 AdaptSpec
The frequency domain approach used in
[16] is a Bayesian method that incorporates (4) with a linear smoothing spline prior on the for . In addition, a uniform prior is placed on the breakpoints, for where is the number of available locations for split point , as is the prior on the number of segments, for and M is some large but fixed number. The approach uses reversible jump Markov chain Monte Carlo (RJ-MCMC) methods to evaluate the posteriors. The technique is available in an R package called BayesSpec.
2.2 AutoParm
Although this method, which is described in
[8], is a time domain approach, the authors argue that AR models are dense in the space of bounded spectral densities (e.g., see
[17, Sect. 4.5]) and can thus be used as a frequency domain approach. In this case, each time series is piecewise stationary with AR behavior in each segment, . Then, Minimum Description Length (MDL) as described in
[14] is used to find the best combination of the number of segments, m, the breakpoints (or segment sizes ), and the orders/estimates of the piecewise AR processes. The idea is to minimize the Code Length (CL) necessary to store the data (i.e., the amount of memory required to encode the data), which leads to a BIC-type criterion to find the model that minimizes
(5)
where and maximized value of the usual Gaussian AR() likelihood for segment ,
(6)
where is the segment’s constant mean value, is the corresponding vector of ones, and is the usual AR variance-covariance matrix corresponding to . Because of the Markov structure of AR models, the likelihood has a simple form; see
[6, Prob. 8.7] for details. Fitting the model has to be done via numerical optimization, which is accomplished via a genetic algorithm (a derivative free smart search for minimization based on evolutionary biology concepts). Basic information on genetic algorithms may be obtained from the Mathworks site
[11].
2.3 The Problem Is Resolution
The problem with the aforementioned techniques is that they tend to over-smooth the spectral density estimate so that small frequency shifts cannot be detected. Resolution problems were thoroughly discussed in the literature in the latter half of the twentieth century. Some details of the history of the problem as well as a simulation example are given in Sect. 5. For our analysis, we focus on El Niño–Southern Oscillation (ENSO). The Southern Oscillation Index (SOI) measures changes in air pressure related to sea surface temperatures in the central Pacific Ocean. The central Pacific warms every three to seven years due to the El Niño effect, which has been blamed for various global extreme weather events. It has become taken as fact that sometime after 1980, the frequency of the El Niño–La Niña (or ENSO) cycle has increased with the global warming; e.g., see
[19].
Monthly values of the SOI are displayed in Fig. 1 for years 1866–2017
[7]; additionally, the data have been filtered to exhibit the ENSO cycle. Also shown in Fig. 1 are the AutoParm results (vertical dashed line) and AdaptSpec results (vertical solid line) when applied to the SOI series. AutoParm prefers a breakpoint around 1920, whereas AdaptSpec is indicating there are no breakpoints because . However, assuming that there is one structural break, the posterior distribution of the breakpoints (with a vertical line at the mean) is displayed in the figure.
Figure 2 shows the estimated spectra for each segment for the AutoParm and AdaptSpec techniques. The vertical lines show the 3–7 year cycle known ENSO cycle (see https://www.weather.gov/mhx/ensowhat for more details). Both methods indicate that in the second segment, the ENSO cycle is much more broad, including both slower and faster frequencies than the usual ENSO cycle. One thing that is clear from both methods is that the estimated spectra are too smooth (broad) to reveal if there has been a decisive frequency shift in the ENSO cycle.
3 AutoSpec—Parametric
Since the interest is in spectra, an obvious extension of AutoParm is to replace the Gaussian AR likelihood in MDL with Whittle likelihood. That is, in (6), replace with the Whittle likelihood (4) but with
(7)
where is the AR polynomial of order given by.
for . The basic idea is use peridograms as the data in a move from the time domain to the frequency domain. Another similar method would be to use the Bloomfield EXP model
[5],
However, EXP yields spectral estimates that are very similar to the AR spectra, so these are not displayed. Using the AR form in (7) yields an interesting and different result, which is shown in Fig. 3. The method finds three segments, but no break near 1980. The AR spectral estimates are shown in Figure 3, and because they are so smooth, it is not easy to interpret the results. However, we used nonparametric spectral estimates (see
[17, Sect. 4]) on the three chosen segments and those estimates are displayed in Fig. 4. Here we note that segments two and three show an increased frequency around the 2.5 year cycle, and segment three shows an additional slower frequency, which may be interpreted as the existence of longer El Niño/La Niña cycles.
4 AutoSpecNP—Nonparametric
Because of the success of the nonparametric approach in the previous section, the natural next step would be to develop a fully nonparametric technique. To this end, consider a triangular kernel (Bartlett window), with such that , with the bandwidth b chosen by MDL to smooth the periodogram of the fully tapered data and then used the Whittle likelihood for the given spectral estimate. That is, to nonparametrically evaluate the likelihood (4) in each segment , use
(8)
where the are chosen by MDL (similar to AR orders in AutoParm). Here, represents the periodogram of the fully cosine tapered data in segment j for .
For example, if represents the data in a segment, then they are preprocessed as where is the cosine bell taper favored by
[4],
where and n is the number of observations in that segment. In this case, the periodogram is of the preprocessed data, . Figure 5 shows an example of the Bartlett window with ; the corresponding spectral window (see
[17, Sect. 4]) of the Bartlett kernel is not very good unless the data are tapered. The spectral window corresponding to the Bartlett kernel with tapering is also displayed in Figure 5.
Figure 6 shows the results of the fully nonparametric method. The figure displays the SOI series along with the estimated breakpoints. The fully nonparametric method finds a breakpoint near 1980 as has been suggested by climatologists, initially in
[18]. Although the differences in each segment are subtle, this method has enough resolution to distinguish between minor frequency shifts. We may interpret the findings as follows. From 1866 to 1905, the ENSO cycle was a 3–7 year cycle. After that, there appears to be a shift to a higher ENSO cycle of about 2.5 years in addition to the usual 3–7 year cycle. Finally, after 1980, there appears to be a slower cycle introduced into the system. That is, after 1980, the ENSO cycle included a much slower cycle that indicates that El Niño events tend to be longer, but not faster than 2.5 years.
5 Spectral Resolution and a Simulation
As previously stated, the problem of resolution was discussed in the literature in the latter half of the twentieth century; e.g.,
[9, 10]. The basic rule of thumb is that the achievable frequency resolution, should be approximately the reciprocal of the observational time interval, of the data, Two signals can be as close as apart before there is significant overlap in the transform and the separate peaks are no longer distinguishable.
For example, we generated a time series of length 2000 where
(9)
, , and for are independent i.i.d. standard normals. The difference between the two halves of the data is that is a modulated version of . Modulation is a common occurrence in many signal processing applications, e.g., EEG (see
[12]). In addition, note that
so that is distinguishable by twin peaks in the frequency domain.
Figure 7 shows a realization of with the changepoint marked. The figure also displays the breakpoint identified by AutoSpecNP. We note, however, that AutoSpec and AutoParm do not identify any breakpoints.
Figure 8 shows the results of running AutoSpecNP described in Sect. 4 on the data . As seen from the figure, the procedure is able to distinguish between the two processes (with a breakpoint at ). The method works because the procedure allows very limited to no smoothing of the periodogram. In addition to showing the spectral estimates of each segment, the figure also displays the estimate (8) with on the entire realization of . This figure helps in realizing why the method works.