Title

icss -- Iterated Cumulative Sum of Squares test for changes in the
unconditional variance of a time series (Sansó, Aragó & Carrion-i-Silvestre, 2004)

Syntax

icss varname [if] [in] [, options]

Main
test(string) test statistic: it, k1, k2 (default) or
all

kernel(string) long-run kernel for k2: qs (default) or
bartlett

bwidth(#) fixed bandwidth for k2; omit for automatic
selection

binit(#) initial parameter for automatic bandwidth (default 4)

nodemean do not subtract the sample mean before testing

all run the three tests IT, kappa1 and kappa2

Plot
graph plot the squared series with the detected breaks and
segment variances

gname(name) name of the graph

graphopts(str) any twoway options passed to the graph

The series should be a zero-mean (or mean-removed) stochastic process such
as asset returns or a regression residual. icss works on the sample
defined by tsset when set; otherwise the data are used in dataset order.

Description

icss implements the Iterated Cumulative Sum of Squares (ICSS) algorithm of
Inclán and Tiao (1994) to detect multiple changes in the unconditional
variance of a time series, using the three test statistics studied by Sansó,
Aragó and Carrion-i-Silvestre (2004):

IT - the original Inclán-Tiao statistic. Valid only for
i.i.d. mesokurtic (Gaussian-kurtosis) data; it over-rejects for leptokurtic
series and for conditionally heteroskedastic ((G)ARCH) series.

kappa1 - corrects the statistic for non-mesokurtosis
(excess/deficient kurtosis) but still assumes serial independence.

kappa2 - additionally corrects for persistence in the
conditional variance through a nonparametric long-run fourth-moment estimator
(Bartlett or quadratic-spectral kernel with automatic Newey-West (1994)
bandwidth). This is the statistic the authors recommend for financial data.

For each requested test, icss reports the whole-sample statistic, its 5%
finite-sample critical value (from the paper's response surface), an asymptotic
p-value, and the full set of break dates located by the iterative ICSS
procedure. See help icss methods for the equation-by-equation
derivation and the step-to-equation map.

icss is part of the flexur library of flexible unit-root and
stationarity tests.

Options

Main

test(string) selects the statistic. it = Inclán-Tiao; k1 =
kappa1; k2 = kappa2 (the default and recommended choice);
all reports all three side by side (reproduces the comparison in the
paper's Table 12).

kernel(string) chooses the kernel used to estimate the long-run
fourth moment for k2: qs (quadratic spectral, default) or
bartlett. Ignored for it and k1.

bwidth(#) fixes the bandwidth (lag truncation) for the k2 long-run
estimator. If omitted, the bandwidth is chosen automatically by the Newey-West
(1994) data-dependent rule.

binit(#) sets the initial parameter of the automatic bandwidth rule
(the paper uses 4, the default).

nodemean skips subtraction of the sample mean. By default icss
analyzes e = x - mean(x); use this option when the input is already a
zero-mean series.

all is a synonym for test(all).

Plot

graph draws the squared (de-meaned) series together with a step function
of the ICSS segment variances and vertical lines at the detected break dates, in
the style of Figure 1 of Sansó et al. (2004).

gname(name) assigns a name to the graph (with replace).

graphopts(string) passes any additional twoway options to the graph.

Examples

Load a return series and test with the recommended kappa2 statistic:

. tsset date

. icss ret, test(k2)

Compare all three statistics (as in Table 12 of the paper):

. icss ret, test(all)

Bartlett kernel with a fixed bandwidth of 6 and a break plot:

. icss ret, test(k2) kernel(bartlett) bwidth(6) graph

A quick simulated check (one true break at t=250):

. set obs 500

. gen t = _n

. tsset t

. gen double y = rnormal()*cond(t<=250,1,2)

. icss y, test(k2) graph

A full self-test harness ships with the package:

. do icss_example.do

Stored results

icss is rclass. It stores (values shown are for the last test in
the list; per-test copies carry the suffix _0=IT, _1=kappa1,
_2=kappa2):

Scalars

r(T) number of usable observations

r(nbreaks) number of detected changes in variance

r(stat_#) whole-sample statistic

r(cv5_#) 5% response-surface critical value

r(pval_#) asymptotic p-value

r(nbreaks_#) number of breaks for test #

Macros

r(cmd) icss

r(tests) list of tests run

r(kernel) kernel used

Matrices

r(breaks) positions of the detected breaks

r(segs) per-segment from, to, variance, sd

Interpreting the output

Whole-sample statistic vs 5% critical value - a value above the
critical value rejects the null of a constant unconditional variance over the
whole sample. The p-value is computed from the asymptotic sup|Brownian
bridge| distribution common to the three statistics.

Detected changes in variance - the ICSS algorithm partitions the
sample; each row is a break with its observation number, its calendar date (when
tsset is in effect) and the standard deviation of the segment that follows
it.

Reading across tests - if it (and often k1) flag many
breaks while k2 flags few or none, the extra breaks are most likely
spurious, driven by fat tails and/or volatility clustering rather than by
genuine level shifts in variance. This is the central message of Sansó et al.
(2004): prefer k2 for financial series.

Remarks and practical guidance

o Feed icss a mean-zero series: asset returns, or residuals from
a mean/trend regression. Prices or trending levels violate the constant-mean
assumption.

o Break detection uses the 5% finite-sample critical value throughout, as
in the original GAUSS code; the reported p-value is for the whole-sample test
only.

o For strongly persistent (near-IGARCH) processes all three tests can
diverge and detect spurious breaks; in that case model the conditional variance
directly (e.g. arch) instead of treating the volatility as piecewise
constant.

o A minimum of about 15 observations is required; break locations are
approximate to within a few observations, as is inherent to the ICSS search.

References

Inclán, C., and G. C. Tiao. 1994. Use of cumulative sums of squares for
retrospective detection of changes of variance. Journal of the American
Statistical Association 89: 913-923.

Newey, W. K., and K. D. West. 1994. Automatic lag selection in covariance
matrix estimation. Review of Economic Studies 61: 631-653.

Sansó, A., V. Aragó, and J. L. Carrion-i-Silvestre. 2004. Testing for
changes in the unconditional variance of financial time series. Revista de
Economía Financiera 4: 32-53.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane

Faithful Stata port of the GAUSS routines icss.src / variance.src
by A. Sansó, V. Aragó and J. L. Carrion-i-Silvestre. Part of the
flexur library.