Skip to content
exuber

Simulation

Simulation of a Blanchard (1979) / Rotermann-Wilfling (2018) bubble process

sim_blan
sim_blan(
  n,
  pi = 0.7,
  sigma = 0.03,
  r = 0.05,
  b0 = 0.1,
  type = c("blanchard", "rotermann_wilfling"),
  delta = 0.984,
  rw_sigma = 0.05,
  seed = NULL
)

Simulates the rational bubble process of Blanchard (1979) or, with type = "rotermann_wilfling", the lognormal-mixture extension of Rotermann & Wilfling (2018).

Arguments

n A positive integer specifying the length of the simulated output series.
pi A positive value in (0, 1) which governs the probability of the bubble continuing to grow.
sigma A positive scalar indicating the standard deviation of the innovations.
r A positive scalar that determines the growth rate of the bubble process.
b0 The initial value of the bubble.
type "blanchard" (default) or "rotermann_wilfling". r is used only by "blanchard", and delta and rw_sigma only by "rotermann_wilfling" (see Details).
delta A scalar in (0, 1), the Rotermann-Wilfling deflation parameter. Only used for type = "rotermann_wilfling".
rw_sigma A positive scalar, the standard deviation (on the log scale) of the Rotermann-Wilfling multiplicative lognormal shock. Only used for type = "rotermann_wilfling".
seed An object specifying if and how the random number generator (rng) should be initialized. It is either NULL or an integer, which is passed to set.seed before the simulation. If you set it, the value is saved as the "seed" attribute of the returned value. The default, NULL, leaves the state of the rng unchanged and returns .Random.seed as the "seed" attribute. Results are reproducible across the parallel and the non-parallel option when you use the same seed.

Value

A numeric vector of length n.

Details

Blanchard's bubble process (type = "blanchard") has two regimes, which occur with probability π\pi and 1−π1-\pi. In the first regime, the bubble grows exponentially, whereas in the second regime, the bubble collapses to a white noise.

With probability π\pi: Bt+1=1+rπBt+ϵt+1B_{t+1} = \frac{1+r}{\pi}B_t+\epsilon_{t+1} With probability 1−π1 - \pi: Bt+1=ϵt+1B_{t+1} = \epsilon_{t+1}

where r is a positive constant and ϵ∼iid(0,σ2)\epsilon \sim iid(0, \sigma^2).

The bubble of Rotermann & Wilfling (2018) (type = "rotermann_wilfling") replaces the "collapse to white noise" regime with a partial, stochastically evolving deflation. The trajectories recur periodically and deflate gradually instead of collapsing abruptly in one period: Bt=Bt−1utδB_t = \frac{B_{t-1}u_t}{\delta} with probability π\pi, or Bt=1−πδ1−πBt−1utB_t = \frac{1-\pi\delta}{1-\pi}B_{t-1}u_t with probability 1−π1-\pi, where ut∼iid LN(−rw_sigma2/2, rw_sigma2)u_t \sim iid\,LN(-rw\_sigma^2/2,\ rw\_sigma^2) (so E[ut]=1E[u_t] = 1). δ∈(0,1)\delta \in (0, 1) ensures that the bubble never collapses to exactly zero and can inflate again.

Examples

These examples are copied from the package's own documentation and are run by R CMD check on every release. The printed output (after #>) and the plots were produced by running them against the current package source.

sim_blan(n = 100, seed = 123) %>%
  autoplot()
Plot from the sim_blan example
sim_blan(n = 250, type = "rotermann_wilfling", delta = 0.984, seed = 123) %>%
  autoplot()
Plot from the sim_blan example

See also

sim_psy1, sim_psy2, sim_evans

References

Blanchard, O. J. (1979). Speculative bubbles, crashes and rational expectations. Economics letters, 3(4), 387-389.

Rotermann, B. & Wilfling, B. (2018). "A new stochastic bubble process: Theoretical properties and empirical tests." Applied Economics Letters, 25(15), 1091-1096. As used for Monte Carlo power analysis in Monschang, V. & Wilfling, B. (2021). "Sup-ADF-style bubble-detection methods under test." Empirical Economics, 61, 145-172.