sim_div: Simulation of dividends

Description Usage Arguments Details Value References Examples

View source: R/sim.R

Description

Simulate (log) dividends from a random walk with drift.

Usage

1
2
3
4
5
6
7
8
9
sim_div(
  n,
  mu,
  sigma,
  r = 0.05,
  log = FALSE,
  output = c("pf", "d"),
  seed = NULL
)

Arguments

n

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

mu

A scalar indicating the drift.

sigma

A positive scalar indicating the standard deviation of the innovations.

r

A positive value indicating the discount factor.

log

Logical. If true dividends follow a lognormal distribution.

output

A character string giving the fundamental price("pf") or dividend series("d"). Default is ‘pf’.

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 set.seed before simulation. If set, the value is saved as "seed" attribute of the returned value. The default, NULL, will not change rng state, and return .Random.seed as the "seed" attribute. Results are different between the parallel and non-parallel option, even if they have the same seed.

Details

If log is set to FALSE (default value) dividends follow:

d[t] = μ + d[t-1] + ε[t],

where ε - N(0, σ^2). The default parameters are μ = 0.0373, σ^2 = 0.1574 and d[0] = 1.3 (the initial value of the dividend sequence). The above equation can be solved to yield the fundamental price:

F[t] = μ * (1 + r)/r^2 + d[t]/r.

If log is set to TRUE then dividends follow a lognormal distribution or log(dividends) follow:

ln(d[t]) = μ + ln(d[t-1]) + ε[t],

where ε - N(0, σ^2). Default parameters are μ = 0.013, σ^2 = 0.16. The fundamental price in this case is:

F[t] = (1 + g)/(r -g) * d[t],

where 1 + g = exp(μ + σ^2/2). All default parameter values are those suggested by West (1988).

Value

A numeric vector of length n.

References

West, K. D. (1988). Dividend innovations and stock price volatility. Econometrica: Journal of the Econometric Society, p. 37-61.

Examples

1
2
3
4
5
6
7
# Price is the sum of the bubble and fundamental components
# 20 is the scaling factor
pf <- sim_div(100, r = 0.05, output = "pf", seed = 123)
pb <- sim_evans(100, r = 0.05, seed = 123)
p <- pf + 20 * pb

autoplot(p)

kvasilopoulos/exuber documentation built on Aug. 8, 2020, 7:52 a.m.