Description Usage Arguments Value Examples
View source: R/model_portfolio.R
Calculate how many years a portfolio will last until it is fully depleted
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
)
|
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. |
positive numeric or Inf
1 | get_years_until_depleted(10000, 1000, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.