sbvar_icss

Purpose

Identifies structural breaks in variance using the Iterated Cumulative Sums of Squares (ICSS) algorithm for of Inclan and Tiao (JASA, 1994).

Format

{ change_point, nbreaks } = sbvar_icss(e[, test, bwl, varm])
Parameters:
  • e (Tx1 vector) – Zero mean stochastic process to be analysed.

  • test (Scalar) – Optional, the test to be conducted:

  • bwl (Scalar) – Optional, bandwidth for spectral window. Default = round(4 * (T/100)^(2/9)).

  • varm (Scalar) –

    Optional, long-run consistent variance estimation method. Default = 1.

    1

    iid

    2

    Bartlett

    3

    Quadratic Spectral (QS)

    4

    SPC with Bartlett (Sul, Phillips & Choi, 2005)

    5

    SPC with QS

    6

    Kurozumi with Bartlett

    7

    Kurozumi with QS

Returns:
  • change_point (Vector) – The change points (the first and the last element denotes the first and the last time periods of the time series).

  • nbreaks (Scalar) – The number of change points.

Examples

library tspdlib;

// Load S&P data
FRED_API_KEY = "7a756a099f64c52f4657b4accc942137";
x = packr(fred_load("SP500"));

// Compute returns
ret_sp500 = (x[2:rows(x), "SP500"] - x[1:rows(x)-1, "SP500"])./x[1:rows(x)-1, "SP500"];

// Demean the returns
e = ret_sp500 - meanc(ret_sp500);

// Run ICSS test
{ cp, nbre } = sbvar_icss(x[2:rows(x), "date"]~e);

Source

sbvar_icss.src