Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

how can I simulate/generate two non-stationary time series (with unit root) so that they can be also cointegrated (using R or Matlab).

Thanks in advance.

share|improve this question
See quant.stackexchange.com/a/1038 – user508 Aug 10 '14 at 19:18
up vote 0 down vote accepted

Two cointegrated series contain a single unit root. Each series can be formulated as the sum of a common unit root plus a stationary component. Most textbooks covering cointegration will cover such formulations - see Hamilton's (1994) discussion of Phillips' "triangular representation" of a cointegrated vector, for example.

Simulating is likely to be easy (depending on other features you may need, of course). For example, simulate one non-stationary series, and construct a second series as the sum of the first and a stationary variable. Viola! Cointegrated.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.