R/insurance.R

# insurance should at least take the remaining capital as a parameter

#' insurance is reevaluated on the remaining capital
insRemCapital <- function(iniCapital, remCapital, rate) {
  return(remCapital * rate)
}

#' insurance is computed only on the initial capital
insIniCapital <- function(iniCapital, remCapital, rate) {
  return(iniCapital * rate)
}
vkubicki/rfinance documentation built on May 14, 2019, 7:22 p.m.