get_years_until_depleted: Get years until depletion

Description Usage Arguments Value Examples

View source: R/model_portfolio.R

Description

Calculate how many years a portfolio will last until it is fully depleted

Usage

1
2
3
4
5
6
7
get_years_until_depleted(
  total_amount = numeric(),
  annual_amount = numeric(),
  years_waiting,
  constant = 1.01,
  return_rate = 0.05
)

Arguments

total_amount

Total amount in the portfolio. Numeric greater than 0.

annual_amount

Annual amount to be withdrawn from the portfolio. Numeric greater than 0.

years_waiting

Years until the annual amount will start being withdrawn. Numeric greater than or equal to 0.

constant

Optional constant to reduce short-term returns. Default determined from experimentation.

return_rate

Optional long term rate of return. Default determined from experimentation.

Value

positive numeric or Inf

Examples

1
get_years_until_depleted(10000, 1000, 5)

eanway/finance documentation built on Feb. 28, 2021, 4:56 p.m.