Learn R Programming

fundManageR (version 0.5.0110)

calculate_cash_flows_returns: Calculate returns for a given set of cash flows

Description

Calculate returns for a given set of cash flows

Usage

calculate_cash_flows_returns(dates = c("2016-09-01", "2017-08-31", "2018-08-31", "2019-08-31", "2020-08-31", "2021-08-31", "2022-08-31", "2023-08-31"), cash_flows = c(-4151601, 119499.036215643, 257186.036215643, 447646.036215643, 200652.036215643, 510409.036215643, 193.036215643166, 8788626.76409155), working_capital = 125000, remove_cumulative_cols = T, distribution_frequency = "annually", date_format = "%Y-%m-%d", scale_to_100 = F, return_percentage = F, return_df = T, return_message = T)

Arguments

dates
vector of dates
cash_flows
Vector of cash flows
working_capital
Amount of working capital, minimum cash
remove_cumulative_cols
Remove summary columns
distribution_frequency
When is the cash distributed
date_format
Format of the date inputs
scale_to_100
Scale numbers to 100
return_percentage
Return percentages
return_df
return data frame
return_message
return message
include_final_day
Include the final day in calculation

Examples

Run this code
calculate_cash_flows_returns(dates = c( "2016-09-01", "2017-08-31", "2018-08-31", "2019-08-31", "2020-08-31", "2021-08-31", "2022-08-31", "2023-08-31" ),
cash_flows = c( -4151601, 119499.036215643, 257186.036215643, 447646.036215643, 200652.036215643, 510409.036215643, 193.036215643166, 8788626.7640915 ),
working_capital = 125000, remove_cumulative_cols = T, distribution_frequency = 'annually', date_format = '%Y-%m-%d', scale_to_100 = F, return_percentage = F, return_df = T, return_message = T
)

Run the code above in your browser using DataLab