diff --git a/R/InsuranceParameters.R b/R/InsuranceParameters.R index 2cd20fd88b0c7830084f9add231f37472d2fe64c..4403f768481efe4982c521da57e937bd8acb6e8a 100644 --- a/R/InsuranceParameters.R +++ b/R/InsuranceParameters.R @@ -293,6 +293,8 @@ InsuranceContract.Values = list( #' \item{\code{$premiumFrequencyLoading}}{Loading on the premium for premium #' payment frequencies of more than once a year. Format is #' \code{list("1" = 0.0, "2" = 0.0, "4" = 0.0, "12" = 0.0)}} +#' \item{\code{$alphaRefundPeriod}}{How long the acquisition costs should be +#' (partially) refunded in case of surrender or premium waiver.} #' } #' #' @@ -412,7 +414,8 @@ InsuranceContract.ParameterDefaults = list( partnerRebate = 0, # Partner rabate on premium (including loading and other rebates) if more than one similar contract is concluded extraChargeGrossPremium = 0, # extra charges on gross premium (smoker, leisure activities, BMI too high, etc.) benefitFrequencyLoading = list("1" = 0.0, "2" = 0.0, "4" = 0.0, "12" = 0.0), # TODO: Properly implement this as a function - premiumFrequencyLoading = list("1" = 0.0, "2" = 0.0, "4" = 0.0, "12" = 0.0) # TODO: Properly implement this as a function + premiumFrequencyLoading = list("1" = 0.0, "2" = 0.0, "4" = 0.0, "12" = 0.0), # TODO: Properly implement this as a function + alphaRefundPeriod = 5 # How long acquisition costs should be refunded in case of surrender ), Features = list( # Special cases for the calculations betaGammaInZillmer = FALSE, # Whether beta and gamma-costs should be included in the Zillmer premium calculation diff --git a/R/InsuranceTarif.R b/R/InsuranceTarif.R index 991091f943b9c0b6ef354ce6f5242da8d4519b37..20b31e603977edf139ad1e78991ba2741093ae51 100644 --- a/R/InsuranceTarif.R +++ b/R/InsuranceTarif.R @@ -988,7 +988,7 @@ InsuranceTarif = R6Class( if (params$ContractState$alphaRefunded) { alphaRefund = 0 } else { - r = min(params$ContractData$policyPeriod, 5); + r = min(params$ContractData$policyPeriod, params$Loadings$alphaRefundPeriod); ZillmerSoFar = Reduce("+", values$absCashFlows$Zillmer, accumulate = TRUE); ZillmerTotal = sum(values$absCashFlows$Zillmer); len = length(ZillmerSoFar);