timeToRuin.scenario: Calculates scenarios of future value of annuity payments (fv)...

View source: R/timeToRuin.scenario.R

timeToRuin.scenarioR Documentation

Calculates scenarios of future value of annuity payments (fv) with stochastic returns

Description

Calculates scenarios of future value of annuity payments (fv) with stochastic returns

Usage

timeToRuin.scenario(
  spending = 100,
  nper = 10,
  mu = 0,
  sigma = 0,
  wealth = 1000,
  nScenarios = 1,
  returnScenarios = FALSE,
  quantiles = c(0, 0.25, 0.5, 0.75, 1),
  seed = NULL
)

Arguments

spending

The annual spending. Must be given as negative number.

nper

The planing horizon.

mu

The expected interest real return per period. Default is zero. Must be entered as decimal

sigma

Volatility of expected interest real return per period. Default is zero. Must be entered as decimal

wealth

The wealth at retirement. Must be entered as a positive number

nScenarios

The total number of scenarios to be made. Default is one scenario

returnScenarios

Should the scenarios be returned

quantiles

Quantile scenarios to be returned. Should be a numeric vector of probabilities with values in [0,1]

seed

Integer vector, containing the random number generator (RNG) state for random number generation in R

Examples

timeToRuin.scenario(spending=100,nper=10,mu=0.01,sigma=0.01,wealth=1000,nScenarios=1000, returnScenarios = FALSE,quantiles=c(0,0.25,0.5,0.75,1), seed =NULL)

eaoestergaard/UNPIE documentation built on Aug. 23, 2022, 2:28 a.m.