From 98204c70085779372c2b3568bca0173251abc8b0 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer <reinhold@kainhofer.com> Date: Mon, 29 Aug 2022 03:25:32 +0200 Subject: [PATCH] Implement alpha costs that are applied only during commission periods -) Add commissionPeriod parameter -) Add CommissionPeriod cost duration dimension (i.e. add one value to the corresponding dimension of the costs array) -) Add alphaCostsCommission parameter to indicate how alpha costs over the commission period are to be understood: actual / linear / presentvalue -) Add adjustPresentValues(Costs) hook functions to allow modifying present values -) Add benefitParameter parameter to pass contract-/tariff-specific information to custom functions --- DESCRIPTION | 2 +- R/InsuranceContract.R | 19 +++++++---- R/InsuranceParameters.R | 36 ++++++++++++++++---- R/InsuranceTarif.R | 38 ++++++++++++++++++---- man/InsuranceContract.ParameterDefaults.Rd | 15 +++++++++ man/InsuranceContract.Rd | 2 +- man/InsuranceTarif.Rd | 10 +++--- man/initializeCosts.Rd | 3 +- 8 files changed, 100 insertions(+), 25 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 40d7420..1d9d6c8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,7 +34,7 @@ Imports: pander, tidyr License: GPL (>= 2) -RoxygenNote: 7.1.1 +RoxygenNote: 7.1.2 Collate: 'HelperFunctions.R' 'InsuranceParameters.R' diff --git a/R/InsuranceContract.R b/R/InsuranceContract.R index 43da58d..c97d976 100644 --- a/R/InsuranceContract.R +++ b/R/InsuranceContract.R @@ -595,7 +595,7 @@ InsuranceContract = R6Class( # Shall we re-calculate PV or preserve the old ones??? pv = private$calculatePresentValues() - pvCost = private$calculatePresentValuesCosts() + pvCost = private$calculatePresentValuesCosts(presentValues = pv) oldPV = self$Values$presentValues if (preservePastPV) { # Preserve past present values, i.e. the PV represents the PV @@ -977,16 +977,16 @@ InsuranceContract = R6Class( # At least 1 year premium period! self$Parameters$ContractData$premiumPeriod = max(self$Parameters$ContractData$premiumPeriod, 1); + self$Parameters$Loadings$commissionPeriod = valueOrFunction( + self$Parameters$Loadings$commissionPeriod, + params = self$Parameters, values = self$Values); + + # Evaluate deferral period, i.e. if a function is used, calculate its numeric value from the other parameters self$Parameters$ContractData$deferralPeriod = valueOrFunction( self$Parameters$ContractData$deferralPeriod, params = self$Parameters, values = self$Values); - #### # - # COSTS PARAMETERS: can be a function => evaluate it to get the real costs - #### # - self$Parameters$Costs = private$evaluateCosts() - #### # # AGES for multiple joint lives: #### # @@ -1029,6 +1029,13 @@ InsuranceContract = R6Class( self$Parameters$ActuarialBases$mortalityTable, params = self$Parameters, values = self$Values) + #### # + # COSTS PARAMETERS: can be a function => evaluate it to get the real costs + # This needs to be last, as the costs can depend on present values + # => mortality table is needed + #### # + self$Parameters$Costs = private$evaluateCosts() + invisible(self) }, diff --git a/R/InsuranceParameters.R b/R/InsuranceParameters.R index 1696f23..99ce13d 100644 --- a/R/InsuranceParameters.R +++ b/R/InsuranceParameters.R @@ -43,7 +43,7 @@ setCost = function(costs, type, basis = "SumInsured", frequency = "PolicyPeriod" #' \describe{ #' \item{CostType:}{alpha, Zillmer, beta, gamma, gamma_nopremiums, unitcosts} #' \item{Basis:}{SumInsured, SumPremiums, GrossPremium, NetPremium, Constant} -#' \item{Period:}{once, PremiumPeriod, PremiumFree, PolicyPeriod} +#' \item{Period:}{once, PremiumPeriod, PremiumFree, PolicyPeriod, CommissionPeriod} #' } #' This cost structure can then be modified for non-standard costs using the [setCost()] function. #' The main purpose of this structure is to be passed to [InsuranceContract] or @@ -90,12 +90,12 @@ setCost = function(costs, type, basis = "SumInsured", frequency = "PolicyPeriod" #' #' #' @export -initializeCosts = function(costs, alpha, Zillmer, beta, gamma, gamma.paidUp, gamma.premiumfree, gamma.contract, gamma.afterdeath, gamma.fullcontract, unitcosts, unitcosts.PolicyPeriod) { +initializeCosts = function(costs, alpha, Zillmer, alpha.commission, beta, gamma, gamma.paidUp, gamma.premiumfree, gamma.contract, gamma.afterdeath, gamma.fullcontract, unitcosts, unitcosts.PolicyPeriod) { if (missing(costs)) { dimnm = list( type = c("alpha", "Zillmer", "beta", "gamma", "gamma_nopremiums", "unitcosts"), basis = c("SumInsured", "SumPremiums", "GrossPremium", "NetPremium", "Constant", "Reserve"), - frequency = c("once", "PremiumPeriod", "PremiumFree", "PolicyPeriod", "AfterDeath", "FullContract") + frequency = c("once", "PremiumPeriod", "PremiumFree", "PolicyPeriod", "AfterDeath", "FullContract", "CommissionPeriod") ); costs = array( 0, @@ -104,7 +104,11 @@ initializeCosts = function(costs, alpha, Zillmer, beta, gamma, gamma.paidUp, gam ); } if (!missing(alpha)) { - costs = setCost(costs, "alpha", "SumPremiums", "once", alpha) + costs = setCost(costs, "alpha", "SumPremiums", "once", alpha) + } + if (!missing(alpha.commission)) { + costs = setCost(costs, "alpha", "SumPremiums", "CommissionPeriod", alpha.commission) + costs = setCost(costs, "Zillmer", "SumPremiums", "CommissionPeriod", alpha.commission) } if (!missing(Zillmer)) { costs = setCost(costs, "Zillmer","SumPremiums", "once", Zillmer) @@ -328,6 +332,11 @@ InsuranceContract.Values = list( #' \item{\code{$deathBenefit}}{The yearly relative death benefit (relative #' to the initial sum insured); Can be set to a \code{function(len, #' params, values)}, e.g. \code{deathBenefit = deathBenefit.linearDecreasing}} +#' \item{\code{$benefitParameter}}{(optional) Tariff-specific parameter to +#' indicate special benefit conditions (e.g. for non-constant benefits +#' the initial starting value, or a minimum benefit, etc.). This +#' parameter is not used automatically, but needs to be processed +#' by a custom \code{$deathBenefit} function.} #' #' \item{\code{$costWaiver}}{The fraction of the costs that are waived (only #' those cost components that are defined to be waivable, i.e. by @@ -440,6 +449,10 @@ InsuranceContract.Values = list( #' \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.} +#' \item{\code{$commissionPeriod}}{Period, over which the acquisition costs +#' are charged to the contract (if not fully up-front or over the +#' whole contract period). This has only an effect for cost definitions +#' with duration "CommissionPeriod". Default is 5 years.} #' } #' #' @@ -469,6 +482,10 @@ InsuranceContract.Values = list( #' gross premium calculation or added after gross premiums. (default: FALSE)} #' \item{\code{$absPremiumRefund}}{Constant death benefit (typically premium #' refund of a previous contract), relative to the sum insured.} +#' \item{\code{$alphaCostsCommission}}{Whether alpha costs over the commision +#' period are given as their actual yearly value ("actual"), or +#' whether the given value is the sum ("sum") or the present value +#' ("presentvalue") over the whole commission period.} #' } #' #' ## Elements of sublist \code{InsuranceContract.ParameterDefault$ProfitParticipation} @@ -512,6 +529,8 @@ InsuranceContract.Values = list( #' \item{\code{$adjustCashFlowsCosts}}{Function with signature \code{function(x, params, values, ...)} to adjust the costs cash flows after their setup.} #' \item{\code{$adjustCosts}}{Function with signature \code{function(costs, params, values, ...)} to adjust the tariff costs after their setup (e.g. contract-specific conditions/waivers, etc.).} #' \item{\code{$adjustMinCosts}}{Function with signature \code{function(minCosts, costs, params, values, ...)} to adjust the tariff minimum (unwaivable) costs after their setup (e.g. contract-specific conditions/waivers, etc.).} +#' \item{\code{$adjustPresentValues}}{Adjust the present value vectors that are later used to derive premiums and reserves. \code{function(presentValues, params, values)}} +#' \item{\code{$adjustPresentValuesCosts}}{Adjust the present value cost vectors used to derive premiums and reserves. \code{function(presentValuesCosts, params, values)}} #' \item{\code{$adjustPremiumCoefficients}}{Function with signature \code{function(coeff, type, premiums, params, values, premiumCalculationTime)} to adjust the coefficients for premium calculation after their default setup. Use cases are e.g. term-fix tariffs where the Zillmer premium term contains the administration cost over the whole contract, but not other gamma- or beta-costs.} #' \item{\code{$adjustPVForReserves}}{Adjust the absolute present value vectors used to derive reserves (e.g. when a sum rebate is subtracted from the gamma-cost reserves without influencing the premium calculation). \code{function(absPV, params, values)}} #' \item{\code{$premiumRebateCalculation}}{Calculate the actual premium rebate from the rebate rate (e.g. when the premium rate is given as a yearly cost reduction applied to a single-premium contract). \code{function(premiumRebateRate, params = params, values = values)}} @@ -549,6 +568,7 @@ InsuranceContract.ParameterDefaults = list( premiumIncrease = 1, # The yearly growth factor of the premium, i.e. 1.05 means +5% increase each year; a Vector describes the premiums for all years annuityIncrease = 1, # The yearly growth factor of the annuity payments, i.e. 1.05 means +5% incrase each year; a vector describes the annuity unit payments for all years deathBenefit = 1, # The yearly relative death benefit (relative to the initial sum insured); Can be fixed, e.g. 0.5 for 50% death cover, or set to a function(len, params, values) like deathBenefit = deathBenefit.linearDecreasing + benefitParameter = NULL, # Tariff-Specific additional parameter to define custom benefits (e.g. a minimum death benefit quota, an initial ) costWaiver = 0, # The cost waiver (up to minCosts, 0=no cost waiver, 1=full cost waiver down to minCosts) attributes = list() # List of additional attributes with custom meaning (not standardized, but can be used by any tariff to implement custom behavior for certain contracts or slices) @@ -588,7 +608,8 @@ InsuranceContract.ParameterDefaults = list( extraChargeGrossPremium = 0, # extra charges on gross premium (smoker, leisure activities, BMI too high, etc.) benefitFrequencyLoading = NULL, # TODO: Properly implement this as a function premiumFrequencyLoading = NULL, # TODO: Properly implement this as a function - alphaRefundPeriod = 5 # How long acquisition costs should be refunded in case of surrender + alphaRefundPeriod = 5, # How long acquisition costs should be refunded in case of surrender + commissionPeriod = 5 ), Features = list( # Special cases for the calculations betaGammaInZillmer = FALSE, # Whether beta and gamma-costs should be included in the Zillmer premium calculation @@ -596,7 +617,8 @@ InsuranceContract.ParameterDefaults = list( useUnearnedPremiums = isRegularPremiumContract, # Whether unearned premiums should be calculated in the balance sheet reserves. Otherwise, a premium paid at the beginning of the period is added to the reserve for balance-sheet purposes. surrenderIncludesCostsReserves = TRUE, # Whether (administration) cost reserves are paid out on surrender (i.e. included in the surrender value before surrender penalties are applied) unitcostsInGross = FALSE, - absPremiumRefund = 0 # Constant death benefit (irrespective of the type of contract), typically a premium refund for a previous contract + absPremiumRefund = 0, # Constant death benefit (irrespective of the type of contract), typically a premium refund for a previous contract + alphaCostsCommission = "actual" # Whether alpha costs over the commision period are given as their actual yearly value ("actual"), or whether the given value is the sum ("sum") or the present value ("presentvalue") over the whole commission period ), ProfitParticipation = list( @@ -628,6 +650,8 @@ InsuranceContract.ParameterDefaults = list( adjustCashFlowsCosts = NULL, adjustCosts = NULL, adjustMinCosts = NULL, + adjustPresentValues = NULL, # function(presentValues, params, values) + adjustPresentValuesCosts = NULL, # function(presentValuesCosts, params, values) adjustPremiumCoefficients = NULL, # function(coeff, type = type, premiums = premiums, params = params, values = values, premiumCalculationTime = premiumCalculationTime) adjustPVForReserves = NULL, # function(absPresentValues, params, values) premiumRebateCalculation = NULL # function(premiumRebateRate, params = params, values = values) diff --git a/R/InsuranceTarif.R b/R/InsuranceTarif.R index 8b60d14..51b78a4 100644 --- a/R/InsuranceTarif.R +++ b/R/InsuranceTarif.R @@ -372,9 +372,9 @@ InsuranceTarif = R6Class( browser(); } costs = valueOrFunction(params$Costs, params = params, values = NULL) - costs = applyHook(params$Hooks$adjustCosts, costs, params = params, values = NULL); + costs = applyHook(params$Hooks$adjustCosts, costs, params = params, values = NULL); baseCost = valueOrFunction(params$minCosts, params = params, values = NULL, costs = costs) - baseCost = applyHook(params$Hooks$adjustMinCosts, baseCost, costs = costs, params = params, values = NULL); + baseCost = applyHook(params$Hooks$adjustMinCosts, baseCost, costs = costs, params = params, values = NULL); if (!is.null(baseCost)) { costWaiver = valueOrFunction(params$ContractData$costWaiver, params = params, values = NULL, costs = costs, minCosts = baseCost) if (is.numeric(costWaiver)) { @@ -642,6 +642,31 @@ InsuranceTarif = R6Class( cf[i,,,"after.death"] = params$Costs[,,"AfterDeath"] } + # Costs charged only for a specific time (i.e. acquisition costs / commissions) + # There are several conventions to scale alpha costs over the commision period: + # a) alpha cost once (i.e. not distributed), not scaled + # b) uniformly over the period (i.e. sum of k equal commisions is given as cost) + # c) by present value (i.e. present value of k equal commission is given as cost) + if (params$Features$alphaCostsCommission == "sum") { + params$Costs[,,"CommissionPeriod"] = params$Costs[,,"CommissionPeriod"] / params$Loadings$commissionPeriod + } else if (params$Features$alphaCostsCommission == "presentvalue") { + # Use yearly constant premiums in advance, irrespective of the actual + # contract. This is a simplification, but the actual present values + # are calculated later, so for now we just assume standard parameters! + len = params$Loadings$commissionPeriod; + q = self$getTransitionProbabilities(params); + px = pad0(c(1,q$p), len); # by defualt, premiums are in advance, so first payment has 100% probability + v = 1/(1 + params$ActuarialBases$i)^((1:len)-1) + params$Costs[,,"CommissionPeriod"] = params$Costs[,,"CommissionPeriod"] / sum(cumprod(px)*v) + } else if (params$Features$alphaCostsCommission == "actual") { + # NOP, nothing to do + } else { + warning("unrecognized value given for commissionPeriod: ",params$Features$alphaCostsCommission ) + } + for (i in 1:params$Loadings$commissionPeriod) { + cf[i,,,"survival"] = cf[i,,,"survival"] + params$Costs[,,"CommissionPeriod"]; + } + # After premiums are waived, use the gamma_nopremiums instead of gamma: if (params$ContractState$premiumWaiver) { cf[,"gamma",,"survival"] = cf[,"gamma_nopremiums",,"survival"]; @@ -658,7 +683,7 @@ InsuranceTarif = R6Class( #' (cash flows already calculated and stored in the \code{cashFlows} data.frame) #' @details Not to be called directly, but implicitly by the [InsuranceContract] object. #' @param cashFlows data.frame of cash flows calculated by a call to \href{#method-getCashFlows}{\code{InsuranceTarif$getCashFlows()}} - presentValueCashFlows = function(cashFlows, params, values) { + presentValueCashFlows = function(params, values) { if (getOption('LIC.debug.presentValueCashFlows', FALSE)) { browser(); } @@ -716,14 +741,15 @@ InsuranceTarif = R6Class( ); rownames(pv) <- pad0(rownames(qq), values$int$l); - pv + applyHook(hook = params$Hooks$adjustPresentValues, val = pv, params = params, values = values) }, #' @description Calculates the present values of the cost cash flows of the #' contract (cost cash flows alreay calculated by \href{#method-getCashFlowsCosts}{\code{InsuranceTarif$getCashFlowsCosts()}} #' and stored in the \code{values} list #' @details Not to be called directly, but implicitly by the [InsuranceContract] object. - presentValueCashFlowsCosts = function(params, values) { + #' @param presentValues The present values of the insurance claims (without costs) + presentValueCashFlowsCosts = function(params, values, presentValues) { if (getOption('LIC.debug.presentValueCashFlowsCosts', FALSE)) { browser(); } @@ -733,7 +759,7 @@ InsuranceTarif = R6Class( px = pad0(q$p, len); v = 1/(1 + params$ActuarialBases$i) pvc = calculatePVCosts(px, qx, values$cashFlowsCosts, v = v); - pvc + applyHook(hook = params$Hooks$adjustPresentValuesCosts, val = pvc, params = params, values = values, presentValues = presentValues) }, #' @description Calculate the cash flows in monetary terms of the insurance contract diff --git a/man/InsuranceContract.ParameterDefaults.Rd b/man/InsuranceContract.ParameterDefaults.Rd index 6060c66..81d6b00 100644 --- a/man/InsuranceContract.ParameterDefaults.Rd +++ b/man/InsuranceContract.ParameterDefaults.Rd @@ -104,6 +104,11 @@ describes the annuity unit payments for all years} \item{\code{$deathBenefit}}{The yearly relative death benefit (relative to the initial sum insured); Can be set to a \code{function(len, params, values)}, e.g. \code{deathBenefit = deathBenefit.linearDecreasing}} +\item{\code{$benefitParameter}}{(optional) Tariff-specific parameter to +indicate special benefit conditions (e.g. for non-constant benefits +the initial starting value, or a minimum benefit, etc.). This +parameter is not used automatically, but needs to be processed +by a custom \code{$deathBenefit} function.} \item{\code{$costWaiver}}{The fraction of the costs that are waived (only those cost components that are defined to be waivable, i.e. by @@ -219,6 +224,10 @@ 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.} +\item{\code{$commissionPeriod}}{Period, over which the acquisition costs +are charged to the contract (if not fully up-front or over the +whole contract period). This has only an effect for cost definitions +with duration "CommissionPeriod". Default is 5 years.} } } @@ -248,6 +257,10 @@ surrender value before surrender penalties are applied)} gross premium calculation or added after gross premiums. (default: FALSE)} \item{\code{$absPremiumRefund}}{Constant death benefit (typically premium refund of a previous contract), relative to the sum insured.} +\item{\code{$alphaCostsCommission}}{Whether alpha costs over the commision +period are given as their actual yearly value ("actual"), or +whether the given value is the sum ("sum") or the present value +("presentvalue") over the whole commission period.} } } @@ -293,6 +306,8 @@ participation rates are defined at the level of profit classes.} \item{\code{$adjustCashFlowsCosts}}{Function with signature \code{function(x, params, values, ...)} to adjust the costs cash flows after their setup.} \item{\code{$adjustCosts}}{Function with signature \code{function(costs, params, values, ...)} to adjust the tariff costs after their setup (e.g. contract-specific conditions/waivers, etc.).} \item{\code{$adjustMinCosts}}{Function with signature \code{function(minCosts, costs, params, values, ...)} to adjust the tariff minimum (unwaivable) costs after their setup (e.g. contract-specific conditions/waivers, etc.).} +\item{\code{$adjustPresentValues}}{Adjust the present value vectors that are later used to derive premiums and reserves. \code{function(presentValues, params, values)}} +\item{\code{$adjustPresentValuesCosts}}{Adjust the present value cost vectors used to derive premiums and reserves. \code{function(presentValuesCosts, params, values)}} \item{\code{$adjustPremiumCoefficients}}{Function with signature \code{function(coeff, type, premiums, params, values, premiumCalculationTime)} to adjust the coefficients for premium calculation after their default setup. Use cases are e.g. term-fix tariffs where the Zillmer premium term contains the administration cost over the whole contract, but not other gamma- or beta-costs.} \item{\code{$adjustPVForReserves}}{Adjust the absolute present value vectors used to derive reserves (e.g. when a sum rebate is subtracted from the gamma-cost reserves without influencing the premium calculation). \code{function(absPV, params, values)}} \item{\code{$premiumRebateCalculation}}{Calculate the actual premium rebate from the rebate rate (e.g. when the premium rate is given as a yearly cost reduction applied to a single-premium contract). \code{function(premiumRebateRate, params = params, values = values)}} diff --git a/man/InsuranceContract.Rd b/man/InsuranceContract.Rd index aeb37c4..d29dca6 100644 --- a/man/InsuranceContract.Rd +++ b/man/InsuranceContract.Rd @@ -458,7 +458,7 @@ Add a child contract block (e.g. a dynamic increase or a rider) to an insurance id = NULL, block = NULL, t = block$Values$int$blockStart, - comment = comment, + comment = paste0("Additional block at time t=", t), ... )}\if{html}{\out{</div>}} } diff --git a/man/InsuranceTarif.Rd b/man/InsuranceTarif.Rd index 07f8179..c00267b 100644 --- a/man/InsuranceTarif.Rd +++ b/man/InsuranceTarif.Rd @@ -616,20 +616,20 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object Returns the present values of the cash flows of the contract (cash flows already calculated and stored in the \code{cashFlows} data.frame) \subsection{Usage}{ -\if{html}{\out{<div class="r">}}\preformatted{InsuranceTarif$presentValueCashFlows(cashFlows, params, values)}\if{html}{\out{</div>}} +\if{html}{\out{<div class="r">}}\preformatted{InsuranceTarif$presentValueCashFlows(params, values)}\if{html}{\out{</div>}} } \subsection{Arguments}{ \if{html}{\out{<div class="arguments">}} \describe{ -\item{\code{cashFlows}}{data.frame of cash flows calculated by a call to \href{#method-getCashFlows}{\code{InsuranceTarif$getCashFlows()}}} - \item{\code{params}}{Contract-specific, full set of parameters of the contract (merged parameters of the defaults, the tariff, the profit participation scheme and the contract)} \item{\code{values}}{Contract values calculated so far (in the \code{contract$Values} list) then this method is called by the contract object} + +\item{\code{cashFlows}}{data.frame of cash flows calculated by a call to \href{#method-getCashFlows}{\code{InsuranceTarif$getCashFlows()}}} } \if{html}{\out{</div>}} } @@ -646,7 +646,7 @@ Calculates the present values of the cost cash flows of the contract (cost cash flows alreay calculated by \href{#method-getCashFlowsCosts}{\code{InsuranceTarif$getCashFlowsCosts()}} and stored in the \code{values} list \subsection{Usage}{ -\if{html}{\out{<div class="r">}}\preformatted{InsuranceTarif$presentValueCashFlowsCosts(params, values)}\if{html}{\out{</div>}} +\if{html}{\out{<div class="r">}}\preformatted{InsuranceTarif$presentValueCashFlowsCosts(params, values, presentValues)}\if{html}{\out{</div>}} } \subsection{Arguments}{ @@ -658,6 +658,8 @@ scheme and the contract)} \item{\code{values}}{Contract values calculated so far (in the \code{contract$Values} list) then this method is called by the contract object} + +\item{\code{presentValues}}{The present values of the insurance claims (without costs)} } \if{html}{\out{</div>}} } diff --git a/man/initializeCosts.Rd b/man/initializeCosts.Rd index 0c3bed6..3e9b403 100644 --- a/man/initializeCosts.Rd +++ b/man/initializeCosts.Rd @@ -8,6 +8,7 @@ initializeCosts( costs, alpha, Zillmer, + alpha.commission, beta, gamma, gamma.paidUp, @@ -50,7 +51,7 @@ Initialize a cost matrix with dimensions: {CostType, Basis, Period}, where: \describe{ \item{CostType:}{alpha, Zillmer, beta, gamma, gamma_nopremiums, unitcosts} \item{Basis:}{SumInsured, SumPremiums, GrossPremium, NetPremium, Constant} -\item{Period:}{once, PremiumPeriod, PremiumFree, PolicyPeriod} +\item{Period:}{once, PremiumPeriod, PremiumFree, PolicyPeriod, CommissionPeriod} } This cost structure can then be modified for non-standard costs using the \code{\link[=setCost]{setCost()}} function. The main purpose of this structure is to be passed to \link{InsuranceContract} or -- GitLab