This function returns a data frame that produces the internal rate of return for specified dates and cash flows

calculate_irr_periods(
  dates = c("2016-06-01", "2017-05-31", "2018-05-31", "2019-05-31", "2020-05-31",
    "2021-05-31", "2022-05-31", "2023-05-31", "2024-05-31", "2025-05-31", "2026-05-31"),
  cash_flows = c(3000, -478.515738547242, -478.515738547242, -478.515738547242,
    -478.515738547242, -478.515738547242, -478.515738547242, -478.515738547242,
    -478.515738547242, -478.515738547242, -478.515738547278),
  date_format = "%Y-%m-%d",
  scale_to_100 = F,
  return_percentage = F,
  return_df = T,
  return_wide = T,
  return_message = T
)

Arguments

dates

vector of dates, year-month-date format

cash_flows

vector of cash flows

date_format

date format

scale_to_100

TRUE scale to 100

return_percentage

TRUE return percentages

return_df

TRUE returns a data frame

return_message

TRUE return a message after data import

Value

tibble

See also

Examples

calculate_irr_periods(dates = c("2016-06-01","2017-05-31", "2018-05-31", "2019-05-31", "2020-05-31", "2021-05-31",
"2022-05-31", "2023-05-31", "2024-05-31", "2025-05-31", "2026-05-31"), cash_flows = c( -3000, 478.515738547242, 478.515738547242, 478.515738547242, 478.515738547242,
478.515738547242, 478.515738547242, 478.515738547242, 478.515738547242, 478.515738547242, 478.515738547278 ), date_format = '%Y-%m-%d', scale_to_100 = FALSE,
return_percentage = FALSE, return_df = TRUE, return_wide = TRUE, return_message = TRUE)