sim_psy2 {exuber} | R Documentation |
Simulation of a two-bubble process
Description
The following data generating process is similar to sim_psy1
, with the difference that
there are two episodes of mildly explosive dynamics.
Usage
sim_psy2(
n,
te1 = 0.2 * n,
tf1 = 0.2 * n + te1,
te2 = 0.6 * n,
tf2 = 0.1 * n + te2,
c = 1,
alpha = 0.6,
sigma = 6.79,
seed = NULL
)
Arguments
n |
A positive integer specifying the length of the simulated output series. |
te1 |
A scalar in (0, n) specifying the observation in which the first bubble originates. |
tf1 |
A scalar in (te1, n) specifying the observation in which the first bubble collapses. |
te2 |
A scalar in (tf1, n) specifying the observation in which the second bubble originates. |
tf2 |
A scalar in (te2, n) specifying the observation in which the second 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. |
seed |
An object specifying if and how the random number generator (rng)
should be initialized. Either NULL or an integer will be used in a call to
|
Details
The two-bubble data generating process is given by (see also sim_psy1
):
where the autoregressive coefficient is:
with ,
,
,
,
,
,
,
,
where
is the last observation of the sample.
The observations
and
are the origination and termination dates of the first bubble;
and
are the origination and termination dates of the second bubble.
After the collapse of the first bubble,
resumes a martingale path until time
, and a second episode of exuberance begins at
.
Exuberance lasts lasts until
at which point the process collapses to a value of
. The process then continues on a martingale path until the end of the
sample period
. The duration of the first bubble is assumed to be longer than
that of the second bubble, i.e.
.
For further details you can refer to Phillips et al., (2015) p. 1055.
Value
A numeric vector of length n
.
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
Examples
# 100 periods with bubble origination dates 20/60 and termination dates 40/70
sim_psy2(n = 100, seed = 123) %>%
autoplot()
# 200 periods with bubble origination dates 40/120 and termination dates 80/140
sim_psy2(n = 200, seed = 123) %>%
autoplot()