*! version 1.0.0 30jan2026

Title

makicoint -- Maki (2012) cointegration test with multiple structural breaks

Syntax

makicoint
depvar indepvars
[if] [in],
maxbreaks(#)
[options]

Required
maxbreaks(#) maximum number of structural breaks (1-5)

Optional
model(#) model specification (0-3); default is model(2)

trimming(#) trimming parameter; default is trimming(0.10)

maxlags(#) maximum lags for ADF test; default is maxlags(12)

lagmethod(method) lag selection method; default is lagmethod(tsig)

You must tsset your data before using makicoint; see tsset.

depvar and indepvars may contain time-series operators; see tsvarlist.

Description

makicoint performs the Maki (2012) cointegration test with multiple structural breaks.
The test allows for an unknown number of breaks in the cointegrating relationship,
where the number of breaks is assumed to be less than or equal to a maximum number
specified by the user.

The null hypothesis is no cointegration, and the alternative hypothesis is
cointegration with up to m structural breaks, where m is specified
by the maxbreaks() option.

The test statistic is the minimum ADF t-statistic obtained by searching over all
possible break dates. The test is based on the methodology proposed by
Bai and Perron (1998) for detecting structural breaks and the unit root test
developed by Kapetanios (2005).

This test is particularly useful when:

(i) The number of structural breaks is unknown a priori.

(ii) The cointegrating relationship may have more than two breaks,
in which case the Gregory and Hansen (1996) test (one break) or the
Hatemi-J (2008) test (two breaks) would be misspecified.

(iii) The data exhibit persistent Markov switching behavior.

Options

Required

maxbreaks(#) specifies the maximum number of structural breaks to allow
in the cointegrating regression. Valid values are integers from 1 to 5.
Critical values are available only for up to 5 breaks.

Optional

model(#) specifies the model for structural breaks. The default is
model(2) (regime shift).

model(0): Level shift - breaks affect only the intercept.

model(1): Level shift with trend - includes a deterministic trend, breaks affect only the intercept.

model(2): Regime shift - breaks affect both the intercept and the slope coefficients.

model(3): Regime shift with trend - includes a trend, breaks affect intercept, trend, and slope coefficients.

trimming(#) specifies the trimming parameter, which determines the minimum
fraction of observations required at each end of the sample and between breaks.
Valid values are between 0 (exclusive) and 0.5 (exclusive). The default is
trimming(0.10), meaning at least 10% of observations are required in each
regime.

maxlags(#) specifies the maximum number of lags to consider in the ADF
regression. The default is maxlags(12).

lagmethod(method) specifies the method for selecting the number of lags
in the ADF test. Valid options are:

tsig: t-significance criterion - starts from maxlags and removes
lags until the last lag is significant at the 10% level. This is the default
and matches the original GAUSS code.

fixed: uses exactly maxlags lags.

aic: selects lags that minimize the Akaike Information Criterion.

bic: selects lags that minimize the Bayesian Information Criterion.

Models

The four models correspond to different specifications of structural change
in the cointegrating relationship:

Model 0 - Level Shift:

y_t = mu + sum(mu_i * D_it) + beta' * x_t + u_t

Model 1 - Level Shift with Trend:

y_t = mu + sum(mu_i * D_it) + gamma * t + beta' * x_t + u_t

Model 2 - Regime Shift:

y_t = mu + sum(mu_i * D_it) + beta' * x_t + sum(beta_i' * x_t * D_it) + u_t

Model 3 - Regime Shift with Trend:

y_t = mu + sum(mu_i * D_it) + gamma * t + sum(gamma_i * t * D_it) + beta' * x_t + sum(beta_i' * x_t * D_it) + u_t

where D_it = 1 if t > TB_i and 0 otherwise, and TB_i denotes the break date.

Examples

Setup: Load time series data and declare it as time series

. webuse lutkepohl, clear

. tsset qtr

Basic usage with 2 maximum breaks using regime shift model

. makicoint consumption investment income, maxbreaks(2)

Test with 3 maximum breaks and level shift model

. makicoint consumption investment, maxbreaks(3) model(0)

Test with custom trimming and lag selection

. makicoint consumption investment income, maxbreaks(2) trimming(0.15) lagmethod(aic) maxlags(8)

Full model with trend and regime shifts

. makicoint consumption investment income, maxbreaks(3) model(3)

Store results for later use

. makicoint consumption investment, maxbreaks(2)

. display "Test statistic: " r(test_stat)

. display "First break at observation: " r(bp1)

Stored results

makicoint stores the following in r():

Scalars

r(test_stat) test statistic (minimum ADF t-statistic)

r(cv1) 1% critical value

r(cv5) 5% critical value

r(cv10) 10% critical value

r(nobs) number of observations

r(maxbreaks) maximum number of breaks

r(model) model number (0-3)

r(trimming) trimming parameter

r(lags) number of lags used in ADF test

r(reject) 1 if null rejected at 10% level, 0 otherwise

r(bp1) observation number of first break

r(bp2) observation number of second break

r(bp3) observation number of third break

r(bp4) observation number of fourth break

r(bp5) observation number of fifth break

r(bpdate1) date/time value of first break

r(bpdate2) date/time value of second break

r(bpdate3) date/time value of third break

r(bpdate4) date/time value of fourth break

r(bpdate5) date/time value of fifth break

r(bpfrac1) fraction of sample at first break

r(bpfrac2) fraction of sample at second break

r(bpfrac3) fraction of sample at third break

r(bpfrac4) fraction of sample at fourth break

r(bpfrac5) fraction of sample at fifth break

Macros

r(depvar) name of dependent variable

r(indepvars) names of independent variables

r(model_name) name of model used

r(lagmethod) lag selection method used

References

Maki, D. (2012). Tests for cointegration allowing for an unknown number of
breaks. Economic Modelling, 29, 2011-2015.
https://doi.org/10.1016/j.econmod.2012.04.022

Bai, J. and P. Perron (1998). Estimating and testing linear models with
multiple structural changes. Econometrica, 66, 47-78.

Gregory, A.W. and B.E. Hansen (1996). Residual-based tests for cointegration
in models with regime shifts. Journal of Econometrics, 70, 99-126.

Hatemi-J, A. (2008). Tests for cointegration with two unknown regime shifts
with an application to financial market integration.
Empirical Economics, 35, 497-505.

Kapetanios, G. (2005). Unit-root testing against the alternative hypothesis
of up to m structural breaks. Journal of Time Series Analysis, 26, 123-133.

Author

Dr. Merwan Roudane

Independent Researcher

Email: merwanroudane920@gmail.com

This command is based on the original GAUSS code by Daiki Maki, received from
the author and later included in the TSPDLIB GAUSS package by Saban Nazlioglu
and modified by Jason Jones (Aptech Systems).

Please cite as:

Roudane, M. (2026). makicoint: Stata module to perform Maki cointegration test
with multiple structural breaks. Statistical Software Components, Boston College
Department of Economics.

Also see

Online: ghansen, zandrews, dfuller, egranger,
vecrank