build_grouped_irrs: Create rollup of IRR based off of dates

Description Usage Arguments Examples

View source: R/build_grouped_irrs.R

Description

Build IRR for any rollup and date range, including ITD and cash adjusted

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
build_grouped_irrs(
  start_date,
  end_date,
  itd,
  cash_adjusted,
  nav_daily,
  cf_daily,
  pm_fund_info,
  ...
)

Arguments

start_date

is the start date of analysis

end_date

is the cutoff date of analysis

itd

is a boolean that determines whether itd (inception to date) is included

cash_adjusted

is a boolean that determines whether cash is adjusted

nav_daily

is the object of get_pm_nav_daily()

cf_daily

is the object of get_pm_cash_flow_daily()

pm_fund_info

is the object of get_pm_fund_info()

...

aggregation choices from from pm_fund_info (i.e. pm_fund_portfolio, pm_fund_category, pm_fund_id)

.data

is from clean_nav_cf()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Example use case
nav <- get_pm_nav_daily() %>% dplyr::filter(nav != 0)
cf <- get_pm_cash_flow_daily() %>% dplyr::filter(cash_flow != 0)
pm_fund_info <- get_pm_fund_info()
start_date <- "2019-09-30"
end_date <- "2019-12-31"
itd <- FALSE
cash_adjusted <- FALSE
final_data <- build_grouped_irrs(
  start_date = start_date, end_date = end_date, itd = itd,
  cash_adjusted = cash_adjusted, pm_fund_info = pm_fund_info,
  pm_fund_portfolio, pm_fund_category_description
)

AZASRS/AZASRS documentation built on Sept. 30, 2020, 9:26 p.m.