9
Analysis of Nonstationary Time Series: Monte Carlo simulations on spurious regression Kaiji Motegi * 3 rd Quarter 2019, Kobe University 1 Description In this note, we run Monte Carlo simulations in order to better understand spurious regression. Let ϵ yt xt i.i.d. N (0, 1). Consider four cases of data generating processes (DGPs): Case 1. {y t } follows random walk (RW) y t = y t-1 + ϵ yt and {x t } follows RW x t = x t-1 + ϵ xt . Case 2. {y t } follows RW y t = y t-1 + ϵ yt and {x t } follows random walk with drift (RW-D) x t = 0.2+ x t-1 + ϵ xt . Case 3. {y t } follows RW-D y t =0.1+ y t-1 + ϵ yt and {x t } follows RW x t = x t-1 + ϵ xt . Case 4. {y t } follows RW-D y t =0.1+ y t-1 + ϵ yt and {x t } follows RW-D x t =0.2+ x t-1 + ϵ xt . For each case we draw J = 5000 Monte Carlo samples with sample size n ∈{100, 500, 1000}. For each Monte Carlo sample, we run a regression model y t = α + βx t + u t and compute ordinary least squares (OLS) estimator ˆ β , t-statistic ˆ t β , and R 2 . In Figures 1-4, we draw histograms of ˆ β , ˆ t β , and R 2 over J = 5000 Monte Carlo samples. Some quantities diverge or converge as n →∞, and others neither diverge nor converge. In Figures 5-8, histograms of properly scaled ˆ β , ˆ t β , and R 2 are plotted. * Tenure-track associate professor, Graduate School of Economics, Kobe University. E-mail: [email protected] Website: http://www2.kobe-u.ac.jp/˜motegi/ 1

Analysis of Nonstationary Time Series: Monte Carlo

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Analysis of Nonstationary Time Series: Monte Carlo

Analysis of Nonstationary Time Series:

Monte Carlo simulations on spurious regression

Kaiji Motegi∗

3rd Quarter 2019, Kobe University

1 Description

In this note, we run Monte Carlo simulations in order to better understand spurious regression. Let

ϵyt, ϵxti.i.d.∼ N(0, 1). Consider four cases of data generating processes (DGPs):

Case 1. {yt} follows random walk (RW) yt = yt−1 + ϵyt and {xt} follows RW xt = xt−1 + ϵxt.

Case 2. {yt} follows RW yt = yt−1 + ϵyt and {xt} follows random walk with drift (RW-D) xt =

0.2 + xt−1 + ϵxt.

Case 3. {yt} follows RW-D yt = 0.1 + yt−1 + ϵyt and {xt} follows RW xt = xt−1 + ϵxt.

Case 4. {yt} follows RW-D yt = 0.1 + yt−1 + ϵyt and {xt} follows RW-D xt = 0.2 + xt−1 + ϵxt.

For each case we draw J = 5000 Monte Carlo samples with sample size n ∈ {100, 500, 1000}. For each

Monte Carlo sample, we run a regression model yt = α+ βxt + ut and compute ordinary least squares(OLS) estimator β̂, t-statistic t̂β , and R2.

In Figures 1-4, we draw histograms of β̂, t̂β , and R2 over J = 5000 Monte Carlo samples. Somequantities diverge or converge as n → ∞, and others neither diverge nor converge.

In Figures 5-8, histograms of properly scaled β̂, t̂β , and R2 are plotted.

∗Tenure-track associate professor, Graduate School of Economics, Kobe University.E-mail: [email protected] Website: http://www2.kobe-u.ac.jp/˜motegi/

1

Page 2: Analysis of Nonstationary Time Series: Monte Carlo

Figure 1: Histograms in Case 1 ({yt} is RW and {xt} is RW)

β̂ (n = 100) β̂ (n = 500) β̂ (n = 1000)

t̂β (n = 100) t̂β (n = 500) t̂β (n = 1000)

R2 (n = 100) R2 (n = 500) R2 (n = 1000)

We simulate J = 5000 Monte Carlo samples from random walk yt = yt−1 + ϵyt and random walk xt =

xt−1+ ϵxt, where ϵyt, ϵxti.i.d.∼ N(0, 1). Sample size is n ∈ {100, 500, 1000}. For each Monte Carlo sample,

we run a regression model yt = α + βxt + ut and compute OLS estimator β̂, t-statistic t̂β , and R2. Thisfigure presents histograms of each of those quantities over J = 5000 Monte Carlo samples.

2

Page 3: Analysis of Nonstationary Time Series: Monte Carlo

Figure 2: Histograms in Case 2 ({yt} is RW and {xt} is RW-D)

β̂ (n = 100) β̂ (n = 500) β̂ (n = 1000)

t̂β (n = 100) t̂β (n = 500) t̂β (n = 1000)

R2 (n = 100) R2 (n = 500) R2 (n = 1000)

We simulate J = 5000 Monte Carlo samples from random walk yt = yt−1 + ϵyt and random walk with drift

xt = 0.2 + xt−1 + ϵxt, where ϵyt, ϵxti.i.d.∼ N(0, 1). Sample size is n ∈ {100, 500, 1000}. For each Monte

Carlo sample, we run a regression model yt = α+βxt+ut and compute OLS estimator β̂, t-statistic t̂β , andR2. This figure presents histograms of each of those quantities over J = 5000 Monte Carlo samples.

3

Page 4: Analysis of Nonstationary Time Series: Monte Carlo

Figure 3: Histograms in Case 3 ({yt} is RW-D and {xt} is RW)

β̂ (n = 100) β̂ (n = 500) β̂ (n = 1000)

t̂β (n = 100) t̂β (n = 500) t̂β (n = 1000)

R2 (n = 100) R2 (n = 500) R2 (n = 1000)

We simulate J = 5000 Monte Carlo samples from random walk with drift yt = 0.1+ yt−1+ ϵyt and random

walk xt = xt−1 + ϵxt, where ϵyt, ϵxti.i.d.∼ N(0, 1). Sample size is n ∈ {100, 500, 1000}. For each Monte

Carlo sample, we run a regression model yt = α+βxt+ut and compute OLS estimator β̂, t-statistic t̂β , andR2. This figure presents histograms of each of those quantities over J = 5000 Monte Carlo samples.

4

Page 5: Analysis of Nonstationary Time Series: Monte Carlo

Figure 4: Histograms in Case 4 ({yt} is RW-D and {xt} is RW-D)

β̂ (n = 100) β̂ (n = 500) β̂ (n = 1000)

t̂β (n = 100) t̂β (n = 500) t̂β (n = 1000)

R2 (n = 100) R2 (n = 500) R2 (n = 1000)

We simulate J = 5000 Monte Carlo samples from random walk with drift yt = 0.1+ yt−1+ ϵyt and random

walk with drift xt = 0.2 + xt−1 + ϵxt, where ϵyt, ϵxti.i.d.∼ N(0, 1). Sample size is n ∈ {100, 500, 1000}.

For each Monte Carlo sample, we run a regression model yt = α+ βxt + ut and compute OLS estimator β̂,t-statistic t̂β , and R2. This figure presents histograms of each of those quantities over J = 5000 Monte Carlosamples.

5

Page 6: Analysis of Nonstationary Time Series: Monte Carlo

Figure 5: Histograms of scaled quantities in Case 1 ({yt} is RW and {xt} is RW)

β̂ (n = 100) β̂ (n = 500) β̂ (n = 1000)

n−1/2t̂β (n = 100) n−1/2t̂β (n = 500) n−1/2t̂β (n = 1000)

R2 (n = 100) R2 (n = 500) R2 (n = 1000)

We simulate J = 5000 Monte Carlo samples from random walk yt = yt−1 + ϵyt and random walk xt =

xt−1+ ϵxt, where ϵyt, ϵxti.i.d.∼ N(0, 1). Sample size is n ∈ {100, 500, 1000}. For each Monte Carlo sample,

we run a regression model yt = α + βxt + ut and compute OLS estimator β̂, t-statistic t̂β , and R2. Thisfigure presents histograms of each of those quantities scaled properly over J = 5000 Monte Carlo samples.

6

Page 7: Analysis of Nonstationary Time Series: Monte Carlo

Figure 6: Histograms of scaled quantities in Case 2 ({yt} is RW and {xt} is RW-D)

n1/2β̂ (n = 100) n1/2β̂ (n = 500) n1/2β̂ (n = 1000)

n−1/2t̂β (n = 100) n−1/2t̂β (n = 500) n−1/2t̂β (n = 1000)

R2 (n = 100) R2 (n = 500) R2 (n = 1000)

We simulate J = 5000 Monte Carlo samples from random walk yt = yt−1 + ϵyt and random walk with drift

xt = 0.2 + xt−1 + ϵxt, where ϵyt, ϵxti.i.d.∼ N(0, 1). Sample size is n ∈ {100, 500, 1000}. For each Monte

Carlo sample, we run a regression model yt = α+βxt+ut and compute OLS estimator β̂, t-statistic t̂β , andR2. This figure presents histograms of each of those quantities scaled properly over J = 5000 Monte Carlosamples.

7

Page 8: Analysis of Nonstationary Time Series: Monte Carlo

Figure 7: Histograms of scaled quantities in Case 3 ({yt} is RW-D and {xt} is RW)

n−1/2β̂ (n = 100) n−1/2β̂ (n = 500) n−1/2β̂ (n = 1000)

n−1/2t̂β (n = 100) n−1/2t̂β (n = 500) n−1/2t̂β (n = 1000)

R2 (n = 100) R2 (n = 500) R2 (n = 1000)

We simulate J = 5000 Monte Carlo samples from random walk with drift yt = 0.1+ yt−1+ ϵyt and random

walk xt = xt−1 + ϵxt, where ϵyt, ϵxti.i.d.∼ N(0, 1). Sample size is n ∈ {100, 500, 1000}. For each Monte

Carlo sample, we run a regression model yt = α+βxt+ut and compute OLS estimator β̂, t-statistic t̂β , andR2. This figure presents histograms of each of those quantities scaled properly over J = 5000 Monte Carlosamples.

8

Page 9: Analysis of Nonstationary Time Series: Monte Carlo

Figure 8: Histograms of scaled quantities in Case 4 ({yt} is RW-D and {xt} is RW-D)

n1/2(β̂ − 0.5) (n = 100) n1/2(β̂ − 0.5) (n = 500) n1/2(β̂ − 0.5) (n = 1000)

n−1t̂β (n = 100) n−1t̂β (n = 500) n−1t̂β (n = 1000)

n(1−R2) (n = 100) n(1−R2) (n = 500) n(1−R2) (n = 1000)

We simulate J = 5000 Monte Carlo samples from random walk with drift yt = 0.1+ yt−1+ ϵyt and random

walk with drift xt = 0.2 + xt−1 + ϵxt, where ϵyt, ϵxti.i.d.∼ N(0, 1). Sample size is n ∈ {100, 500, 1000}.

For each Monte Carlo sample, we run a regression model yt = α + βxt + ut and compute OLS estimatorβ̂, t-statistic t̂β , and R2. This figure presents histograms of each of those quantities scaled properly overJ = 5000 Monte Carlo samples.

9