Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

exuber (version 0.2.1)

sim_dgp1: Simulation of a single-bubble process

Description

The following function generates a time series which switches from a martingale to a mildly explosive process and then back to a martingale.

Usage

sim_dgp1(n, te = 0.4 * n, tf = 0.15 * n + te, c = 1, alpha = 0.6,
  sigma = 6.79)

Arguments

n

A strictly positive integer specifying the length of the simulated output series.

te

A scalar in (0, tf) specifying the observation in which the bubble originates.

tf

A scalar in (te, n) specifying the observation in which the bubble collapses.

c

A positive scalar determining the autoregressive coefficient in the explosive regime.

alpha

A positive scalar in (0, 1) determining the value of the expansion rate in the autoregressive coefficient.

sigma

A positive scalar indicating the standard deviation of the innovations.

Value

A numeric vector of length n.

Details

The data generating process is described by the following equation: Xt=Xt11{t<τe}+δTXt11{τetτf}+(k=τf+1tϵk+Xτf)1{t>τf}+ϵt1{tτf}

where the autoregressive coefficient δT is given by:

δT=1+cTa

with c>0, α(0,1), ϵiid(0,σ2) and Xτf=Xτe+X. During the pre- and post- bubble periods, N0=[1,τe), X is a pure random walk process. During the bubble expansion period B=[τe,τf] is a mildly explosive process with expansion rate given by the autoregressive coefficient δT, and continues its martingale path for the subsequent period N1=(τf,τ].

For further details the user can refer to Phillips et al. (2015) p. 1054.

References

Phillips, P. C. B., Shi, S., & Yu, J. (2015). Testing for Multiple Bubbles: Historical Episodes of Exuberance and Collapse in the S&P 500. International Economic Review, 5 6(4), 1043-1078.

See Also

sim_dgp2, sim_blan, sim_evans

Examples

Run this code
# NOT RUN {
# 100 periods with bubble origination date 40 and termination date 55
sim_dgp1(n = 100)

# 200 periods with bubble origination date 80 and termination date 110
sim_dgp1(n = 200)

# 200 periods with bubble origination date 100 and termination date 150
sim_dgp1(n = 200, te = 100, tf = 150)
# }

Run the code above in your browser using DataLab