Learn R Programming

fundManageR (version 0.5.0110)

calculate_irr_periods: Caclulate an Interal Rate of Return given a vectors of dates and cash flows.

Description

Caclulate an Interal Rate of Return given a vectors of dates and cash flows.

Usage

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
A vector of dates
cash_flows
A vector of cash flows
date_format
Date formate
scale_to_100
Scale to 100
return_percentage
Return percentages
return_df
Return a data frame

Examples

Run this code
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)

Run the code above in your browser using DataLab