Description Usage Arguments Details Value Author(s) Examples
Shows the portfolio performance of buying one or more bonds
1 | buy_bonds(investment_vector, withdrawal_vector, coupon, tax_rate)
|
investment_vector |
a vector of annual investments |
withdrawal_vector |
a vector of annual withdrawals |
coupon |
the interest rate |
tax_rate |
the investor's average tax rate charged on interest payments |
What happens to the portfolio if each investment is spent on buying a bond that yields a rate of 'coupon' discounted by 'tax_rate'
data.frame with summary statistics for each window
George Fisher
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
investment_vector <- seq(1,30)*10
withdrawal_vector <- c(investment_vector[1:10] * 0.15,
investment_vector[11:20] * 0.35,
investment_vector[21:30] * runif(10, min=0.01, max=0.90))
coupon <- 0.0261 # 30-year rate in May 2016
tax_rate <- 0.14 # Mitt Romney's average rate
bond_df <- buy_bonds <- function(investment_vector,
withdrawal_vector,
coupon,
tax_rate)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.