diff --git a/R/InsuranceContract.R b/R/InsuranceContract.R index f45fe1f33e1fc62d0104fde394160b1fd3a4e65d..7be8a9d6af8ac7be04f398fd0f1ef904e35b0bdf 100644 --- a/R/InsuranceContract.R +++ b/R/InsuranceContract.R @@ -41,8 +41,8 @@ InsuranceContract = R6Class( #### The code: - initialize = function(tarif, parent = NULL, calculate = "all", ...) { - private$initParams = c(list(tarif = tarif, parent = parent, calculate = calculate), list(...)) + initialize = function(tarif, parent = NULL, calculate = "all", profitid = "default", ...) { + private$initParams = c(list(tarif = tarif, parent = parent, calculate = calculate, profitid = profitid), list(...)) self$tarif = tarif; self$parent = parent; @@ -67,11 +67,13 @@ InsuranceContract = R6Class( self$Parameters$ProfitParticipation = fallbackFields( self$Parameters$ProfitParticipation, ppScheme$Parameters); + self$Parameters$ProfitParticipation$scenarios[[profitid]] = list() } private$consolidateContractData(tarif = tarif, ...); self$calculateContract(calculate = calculate); + invisible(self) }, @@ -252,7 +254,7 @@ InsuranceContract = R6Class( self$Values$basicData = mergeValues(starting = self$Values$basicData, ending = private$getBasicDataTimeseries(), t = valuesFrom); if (calculate == "premiumcomposition") return(invisible(self)); - private$profitParticipation(); + private$profitParticipation(calculateFrom = valuesFrom); if (calculate == "profitparticipation") return(invisible(self)); self$addHistorySnapshot( @@ -414,7 +416,26 @@ InsuranceContract = R6Class( # Calculate one profit scenario and store it in the contract (e.g. to be exported to Excel), this function can be chained! addProfitScenario = function(id, ...) { - self$Values$profitScenarios[id] = self$profitScenario(...) + .args = as.list(match.call()[-1]) + self$Parameters$ProfitParticipation$scenarios[[id]] = list(...) + if (length(self$blocks) > 0) { + vals = NULL + for (b in self$blocks) { + # TODO: shift the profit rates by b$Parameters$ContractData$blockStart + do.call(b$addProfitScenario, .args) + vals = sumPaddedArrays(arr1 = vals, arr2 = b$Values$profitScenarios[[id]], pad2 = b$Parameters$ContractData$blockStart) + # TODO: consolidate reserves after profit! + } + # Consolidate all child blocks + self$Values$profitScenarios[[id]] = vals + } else { + # profitParticipation will assign the values to Values$profitScenarios[[id]] and Values$reservesAfterProfit[[id]] + # private$profitParticipation(id = id, ...) + pp = private$calculateProfitParticipation(...) + self$Values$profitScenarios[[id]] = pp + self$Values$reservesAfterProfit[[id]] = private$calculateReservesAfterProfit(profitScenario = pp, ...) + } + invisible(self) }, @@ -580,18 +601,34 @@ InsuranceContract = R6Class( }, profitParticipation = function(...) { - self$Values$profitParticipation = private$calculateProfitParticipation(...); - self$Values$reservesAfterProfit = private$calculateReservesAfterProfit(...); + scens = self$Parameters$ProfitParticipation$scenarios + lapply(seq_along(scens), function(x) { + nm = names(scens)[x] + scn = NULL + if (!is.null(self$Values$profitScenarios) && length(self$Values$profitScenarios) >= x) { + scn = self$Values$profitScenarios[[x]] + } + pp = do.call(private$calculateProfitParticipation, c(list(profitScenario = scn, ...), scens[x])) + res = do.call(private$calculateReservesAfterProfit, c(list(profitScenario = pp, ...), scens[x])) + if (nm != "" && !is.null(nm)) { + self$Values$profitScenarios[[nm]] = pp + self$Values$reservesAfterProfit[[nm]] = res + } else { + self$Values$profitScenarios[[x]] = pp + self$Values$reservesAfterProfit[[x]] = res + } + }) # For convenience, return the profit participation table: - self$Values$profitParticipation + # (self$Values$reservesAfterProfit was also changed, but is not returned!) + self$Values$profitScenarios }, calculateProfitParticipation = function(...) { self$tarif$calculateProfitParticipation(params = self$Parameters, values = self$Values, ...); }, - calculateReservesAfterProfit = function(...) { - self$tarif$reservesAfterProfit(params = self$Parameters, values = self$Values, ...); + calculateReservesAfterProfit = function(profitScenario, ...) { + self$tarif$reservesAfterProfit(profitScenario = profitScenario, params = self$Parameters, values = self$Values, ...); }, diff --git a/R/InsuranceParameters.R b/R/InsuranceParameters.R index 3a525c2bcba37656e4bd06a3570a8010d78bf212..55538b8ab2d28bc337eb797573e37dc9297c5929 100644 --- a/R/InsuranceParameters.R +++ b/R/InsuranceParameters.R @@ -169,7 +169,9 @@ InsuranceContract.ParameterDefaults = list( profitParticipationScheme = NULL, # Gewinnbeteiligungssystem (object of class Profit Participation) profitComponents = c("interest", "risk", "expense", "sum", "terminal"), profitClass = NULL, - profitRates = NULL # General, company-wide profit rates, key columns are year and profitClass + profitRates = NULL, # General, company-wide profit rates, key columns are year and profitClass + + scenarios = list() # profit participation scenarios (list of overridden parameters for each scenario) ), Hooks = list( diff --git a/R/InsuranceTarif.R b/R/InsuranceTarif.R index 7818e70f583c0d143f115a4dace79e3a89eed4a1..a780aa6fab4e4cf7cf7a7f940afd8deea4001b1f 100644 --- a/R/InsuranceTarif.R +++ b/R/InsuranceTarif.R @@ -811,14 +811,14 @@ InsuranceTarif = R6Class( res }, - calculateProfitParticipation = function(params, values, ...) { + calculateProfitParticipation = function(params, ...) { ppScheme = params$ProfitParticipation$profitParticipationScheme; if (!is.null(ppScheme)) { - ppScheme$getProfitParticipation(params = params, values = values, ...) + ppScheme$getProfitParticipation(params = params, ...) } }, - reservesAfterProfit = function(params, values, ...) { + reservesAfterProfit = function(profitScenario, params, values, ...) { # TODO }, diff --git a/R/ProfitParticipation.R b/R/ProfitParticipation.R index ba501ac009ee9aeeba1cbcc6e991a8ad09516432..1aca6982c8f9401ac5f43d7ed63c52f88562c552 100644 --- a/R/ProfitParticipation.R +++ b/R/ProfitParticipation.R @@ -25,6 +25,9 @@ ProfitParticipation = R6Class( name = "Name des Gewinnplans", Parameters = InsuranceContract.ParameterStructure$ProfitParticipation, + ########################################################################m# + # Function blocks (modular) to determine bases, rates and calculation #### + ########################################################################m# Functions = list( #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -60,7 +63,7 @@ ProfitParticipation = R6Class( calculateSumProfit = PP.calculate.RateOnBase, calculateTerminalBonus = PP.calculate.RateOnBase, - getTerminalBonusReserves = function(profits, rates, terminalBonus, terminalBonusAccount, params, values) { + getTerminalBonusReserve = function(profits, rates, terminalBonus, terminalBonusAccount, params, values) { n = length(terminalBonusAccount) terminalBonusAccount * 1/(1.07) ^ ((n - 1):0) }, @@ -114,9 +117,9 @@ ProfitParticipation = R6Class( }, - ############################################################################ - # Advance Profit Participation - ############################################################################ + ##########################################################################m# + # Advance Profit Participation #### + ##########################################################################m# getAdvanceProfitParticipation = function(params, values, ...) { "@function getAdvanceProfitParticipation" @@ -133,14 +136,14 @@ ProfitParticipation = R6Class( }, - ############################################################################ - # Traditional Profit participation: - # - Interest profit - # - Risk profit - # - Expense profit - # - Sum profit - # - Terminal bonus - ############################################################################ + ##########################################################################m# + # Traditional Profit participation: #### + # - Interest profit ##m# + # - Risk profit ##m# + # - Expense profit ##m# + # - Sum profit ##m# + # - Terminal bonus ##m# + ##########################################################################m# setupRates = function(params, values, ...) { @@ -237,7 +240,7 @@ ProfitParticipation = R6Class( - getProfitParticipation = function(params, values, ...) { + getProfitParticipation = function(calculateFrom = 0, profitScenario = NULL, params, values, ...) { waiting = valueOrFunction(params$ProfitParticipation$waitingPeriod, params = params, values = values); if (is.numeric(waiting) && waiting > 0) { waitingFactor = c(rep(0, waiting + 1), rep(1, params$ContractData$policyPeriod - waiting)); @@ -292,9 +295,16 @@ ProfitParticipation = R6Class( totalProfit = c(0) ); + # Use only newly calculated values starting at 'calculateFrom', but use old values up to that moment (might be a contract change with a completely different profit participation system before!) + res = mergeValues(starting = profitScenario[,colnames(res)], ending = res, t = calculateFrom); + # res = self$Functions$calculateInterestOnProfit(base = sumBase, rate = sumRate, waiting = waitingFactor, rates = rates, params = params, values = values); - prev = 0; - for (i in 1:nrow(res)) { + if (calculateFrom > 0 && !is.null(profitScenario)) { + prev = profitScenario[calculateFrom - 1, "totalProfit"] + } else { + prev = 0; + } + for (i in (calculateFrom + 1):nrow(res)) { res[i,"interestOnProfit"] = res[i,"interestOnProfitRate"] * prev; res[i,"totalProfitAssignment"] = res[i, "componentsProfit"] + res[i,"interestOnProfit"]; res[i,"totalProfit"] = prev + res[i,"totalProfitAssignment"]; @@ -306,33 +316,64 @@ ProfitParticipation = R6Class( #### => TODO: Pass the current profit calculation inside the values!) terminalBase = self$Functions$getTerminalBonusBase(res, rates = rates, params = params, values = values); terminalRate = self$Functions$getTerminalBonusRate(res, rates = rates, params = params, values = values); - terminalBonus = self$Functions$calculateTerminalBonus(res, base = terminalBase, rate = terminalRate, waiting = waitingFactor, rates = rates, params = params, values = values); # TODO: Add the AF(v) factor! - terminalBonusAccount = cumsum(terminalBonus); # TODO: Generalize! Not every scheme uses a cumulative account! - terminalBonusReserves = self$Functions$getTerminalBonusReserves(res, rates = rates, terminalBonus, terminalBonusAccount, params = params, values = values) + terminalBonus = self$Functions$calculateTerminalBonus(res, base = terminalBase, rate = terminalRate, calculateFrom = calculateFrom, waiting = waitingFactor, rates = rates, params = params, values = values); # TODO: Add the AF(v) factor! + res1 = cbind( + terminalBase, + terminalRate, + terminalBonus + ) + res1 = mergeValues(starting = profitScenario[,colnames(res1)], ending = res1, t = calculateFrom) + if (calculateFrom == 0) { + terminalBonusAccount = cumsum(terminalBonus); # TODO: Generalize! Not every scheme uses a cumulative account! + } else { + past = profitScenario[1:calculateFrom, "terminalBonusAccount"] + # Preserve values up to calculateFrom, start from the last known value at calculateFrom-1 and sum all further contributions: + terminalBonusAccount = c(head(past, -1), cumsum(c(tail(past,1), tail(terminalBonus, -calculateFrom)))) + } + terminalBonusReserve = self$Functions$getTerminalBonusReserve(res, rates = rates, terminalBonus, terminalBonusAccount, params = params, values = values) + res2 = cbind(terminalBonusAccount, terminalBonusReserve) res = cbind( res, # Terminal Bonus values - terminalBase = c(terminalBase), - terminalBonusRate = c(terminalRate), - terminalBonus = c(terminalBonus), - terminalBonusAccount = c(terminalBonusAccount), - terminalBonusReserve = c(terminalBonusReserves) + res1, + mergeValues(starting = profitScenario[,colnames(res2)], ending = res2, t = calculateFrom) ) #### NEW Terminal bonus fund (part of regular profits, but not paid out on surrender, reserved as part of the free RfB) #### TBFBase = self$Functions$getTerminalBonusFundBase(res, rates = rates, params = params, values = values); TBFRate = self$Functions$getTerminalBonusFundRate(res, rates = rates, params = params, values = values); - TBFBonus = self$Functions$calculateTerminalBonusFund(res, base = TBFBase, rate = TBFRate, waiting = waitingFactor, rates = rates, params = params, values = values); - regularBonus = res[,"totalProfitAssignment"] - TBFBonus + TBFBonusAssignment = self$Functions$calculateTerminalBonusFund(res, base = TBFBase, rate = TBFRate, calculateFrom = calculateFrom, waiting = waitingFactor, rates = rates, params = params, values = values); + regularBonusAssignment = res[,"totalProfitAssignment"] - TBFBonusAssignment + res1 = cbind( + TBFBase, + TBFRate, + TBFBonusAssignment, + regularBonusAssignment + ) + res1 = mergeValues(starting = profitScenario[,colnames(res1)], ending = res1, t = calculateFrom) + + # Calcula TBF and regular bonus as cumulative usm of the assignments starting at t=calculateFrom plus the previous value! + if (calculateFrom == 0) { + TBF = cumsum(TBFBonusAssignment) + regularBonus = cumsum(regularBonusAssignment) + } else { + past = profitScenario[1:calculateFrom, "TBF"] + # Preserve values up to calculateFrom, start from the last known value at calculateFrom-1 and sum all further contributions: + TBF = c(head(past, -1), cumsum(c(tail(past,1), tail(TBFBonusAssignment, -calculateFrom)))) + past = profitScenario[1:calculateFrom, "regularBonus"] + regularBonus = c(head(past, -1), cumsum(c(tail(past,1), tail(regularBonusAssignment, -calculateFrom)))) + } + res2 = cbind( + TBF, + regularBonus + ) + res2 = mergeValues(starting = profitScenario[,colnames(res2)], ending = res2, t = calculateFrom) + res = cbind( res, - TBFBase = c(TBFBase), - TBFRate = c(TBFRate), - TBFAssignment = c(TBFBonus), - regularBonusAssignment = regularBonus, - TBF = cumsum(TBFBonus), - regularBonus = cumsum(regularBonus) + res1, + res2 ) @@ -347,22 +388,28 @@ ProfitParticipation = R6Class( premiumWaiverAccrued = self$Functions$calculatePremiumWaiverBenefitAccrued(res, rates = rates, params = params, values = values); premiumWaiverTerminalBonus = self$Functions$calculatePremiumWaiverBenefitTerminal(res, rates = rates, params = params, values = values); - res = cbind( - res, + res1 = cbind( + survival = survival, - survival = survival, + deathAccrued = deathAccrued, + deathTerminalBonus = deathTerminalBonus, + death = deathAccrued + deathTerminalBonus, - deathAccrued = deathAccrued, - deathTerminalBonus = deathTerminalBonus, - death = deathAccrued + deathTerminalBonus, + surrenderAccrued = surrenderAccrued, + surrenderTerminalBonus = surrenderTerminalBonus, + surrender = surrenderAccrued + surrenderTerminalBonus, + + premiumWaiverAccrued = premiumWaiverAccrued, + premiumWaiverTerminalBonus = premiumWaiverTerminalBonus, + premiumWaiver = premiumWaiverAccrued + premiumWaiverTerminalBonus + ) + # Preserve values up to time t=calculateFrom of the old scenario values + res1 = mergeValues(starting = profitScenario[,colnames(res1)], ending = res1, t = calculateFrom) - surrenderAccrued = surrenderAccrued, - surrenderTerminalBonus = surrenderTerminalBonus, - surrender = surrenderAccrued + surrenderTerminalBonus, - premiumWaiverAccrued = premiumWaiverAccrued, - premiumWaiverTerminalBonus = premiumWaiverTerminalBonus, - premiumWaiver = premiumWaiverAccrued + premiumWaiverTerminalBonus + res = cbind( + res, + res1 ); # Clean the huge dataframe by removing columns that refer to profit diff --git a/R/ProfitParticipation_Functions.R b/R/ProfitParticipation_Functions.R index ce407d695bc44085e812d11db9e0268d6c6914f0..26d692a779972a8150f55100cb34230c19eeb9ca 100644 --- a/R/ProfitParticipation_Functions.R +++ b/R/ProfitParticipation_Functions.R @@ -174,7 +174,7 @@ PP.rate.interestProfit2 = function(rates, ...) { # TODO -getTerminalBonusReserves = function(profits, rates, terminalBonus, terminalBonusAccount, params, values, ...) { +getTerminalBonusReserve = function(profits, rates, terminalBonus, terminalBonusAccount, params, values, ...) { n = length(terminalBonusAccount) terminalBonusAccount * 1/(1.07) ^ ((n - 1):0) }; diff --git a/R/exportInsuranceContract_xlsx.R b/R/exportInsuranceContract_xlsx.R index 3dc1e9822d2499cae57eadfe383b105ed967a26d..7fc20c65f76ca603728b55693159e6f15ce6c036 100644 --- a/R/exportInsuranceContract_xlsx.R +++ b/R/exportInsuranceContract_xlsx.R @@ -473,7 +473,6 @@ exportReserveTable = function(wb, sheet, contract, ccol = 1, crow = 1, styles = exportProfitParticipationTable = function(wb, sheet, contract, ccol = 1, crow = 1, styles = c(), seprows = 5, freeze = TRUE) { id = contract$Parameters$ContractData$id nrrow = contract$Values$int$l - blockid.row = crow crow = crow + 2 @@ -481,60 +480,70 @@ exportProfitParticipationTable = function(wb, sheet, contract, ccol = 1, crow = freezePane(wb, sheet, firstActiveRow = crow + 2, firstActiveCol = ccol + 2) } qp = contract$Values$transitionProbabilities[1:contract$Values$int$l,]; # extract the probabilities once, will be needed in - cl = ccol - cl = cl + writeAgeQTable(wb, sheet, probs = qp, crow = crow, ccol = cl, styles = styles); - ccol.table = cl - 1; - cl = cl + writeValuesTable(wb, sheet, as.data.frame(setInsuranceValuesLabels(contract$Values$profitParticipation)), - crow = crow, ccol = cl, tableName = tableName("ProfitParticipation_", id), styles = styles, - # caption = "Gewinnbeteiligung", + for (s in names(contract$Values$profitScenarios)) { + cl = ccol + sc = contract$Values$profitScenarios[[s]] + writeData(wb = wb, sheet = sheet, x = s, startRow = crow, startCol = ccol) + addStyle(wb = wb, sheet = sheet, rows = crow, cols = ccol, style = styles$scenarioID, stack = TRUE) + cl = cl + writeAgeQTable(wb, sheet, probs = qp, crow = crow, ccol = cl, styles = styles); + ccol.table = cl - 1; + cl = cl + writeValuesTable(wb, sheet, as.data.frame(setInsuranceValuesLabels(sc)), + crow = crow, ccol = cl, # tableName = tableName("ProfitParticipation_", id, "_", s), + styles = styles, + # caption = s, valueStyle = styles$currency0) + 1; - cnames = colnames(contract$Values$profitParticipation); - # Make sure "terminalBonusRate" is NOT matched! Need to use a negative lookahead.. - baseCols = grep("^(?!terminal).*Base$", cnames, perl = TRUE); - rateCols = grep("^(?!terminal).*(Interest|Rate)$", cnames, perl = TRUE); - profitCols = grep(".*Profit$", cnames); - terminalBonusCols = grep("^terminal.*", cnames); - deathCols = grep("^death.*", cnames); - surrenderCols = grep("^surrender.*", cnames); - premiumWaiverCols = grep("^premiumWaiver.*", cnames); + cnames = colnames(sc); + # Make sure "terminalBonusRate" is NOT matched! Need to use a negative lookahead.. + baseCols = grep("^(?!terminal|TBF).*Base$", cnames, perl = TRUE); + rateCols = grep("^(?!terminal|TBF).*(Interest|Rate)$", cnames, perl = TRUE); + profitCols = grep(".*Profit$", cnames); + terminalBonusCols = grep("^terminal.*", cnames); + TBFCols = grep("^TBF.*", cnames); + deathCols = grep("^death.*", cnames); + surrenderCols = grep("^surrender.*", cnames); + premiumWaiverCols = grep("^premiumWaiver.*", cnames); - endrow = (crow + 1 + nrrow) + endrow = (crow + 1 + nrrow) - # Rates are displayed in %: - addStyle(wb, sheet, style = styles$rate, rows = (crow + 2):endrow, cols = rateCols + ccol.table, gridExpand = TRUE, stack = TRUE); + # Rates are displayed in %: + addStyle(wb, sheet, style = styles$rate, rows = (crow + 2):endrow, cols = rateCols + ccol.table, gridExpand = TRUE, stack = TRUE); - # Add table headers for the various sections: - if (length(baseCols) > 0) { - writeTableCaption(wb, sheet, "Basisgrößen", rows = crow, cols = baseCols + ccol.table, style = styles$header); - } - if (length(rateCols) > 0) { - writeTableCaption(wb, sheet, "Gewinnbeteiligungssätze", rows = crow, cols = rateCols + ccol.table, style = styles$header); - } - if (length(profitCols) > 0) { - writeTableCaption(wb, sheet, "GB Zuweisungen", rows = crow, cols = profitCols + ccol.table, style = styles$header); - } - if (length(terminalBonusCols) > 0) { - writeTableCaption(wb, sheet, "Schlussgewinn", rows = crow, cols = terminalBonusCols + ccol.table, style = styles$header); - } - if (length(deathCols) > 0) { - writeTableCaption(wb, sheet, "Todesfallleistung", rows = crow, cols = deathCols + ccol.table, style = styles$header); - } - if (length(surrenderCols) > 0) { - writeTableCaption(wb, sheet, "Rückkauf", rows = crow, cols = surrenderCols + ccol.table, style = styles$header); - } - if (length(premiumWaiverCols) > 0) { - writeTableCaption(wb, sheet, "Prämienfreistellung", rows = crow, cols = premiumWaiverCols + ccol.table, style = styles$header); - } + # Add table headers for the various sections: + if (length(baseCols) > 0) { + writeTableCaption(wb, sheet, "Basisgr��en", rows = crow, cols = baseCols + ccol.table, style = styles$header); + } + if (length(rateCols) > 0) { + writeTableCaption(wb, sheet, "Gewinnbeteiligungss�tze", rows = crow, cols = rateCols + ccol.table, style = styles$header); + } + if (length(profitCols) > 0) { + writeTableCaption(wb, sheet, "GB Zuweisungen", rows = crow, cols = profitCols + ccol.table, style = styles$header); + } + if (length(terminalBonusCols) > 0) { + writeTableCaption(wb, sheet, "Schlussgewinn", rows = crow, cols = terminalBonusCols + ccol.table, style = styles$header); + } + if (length(TBFCols) > 0) { + writeTableCaption(wb, sheet, "Schlussgewinnfonds", rows = crow, cols = TBFCols + ccol.table, style = styles$header); + } + if (length(deathCols) > 0) { + writeTableCaption(wb, sheet, "Todesfallleistung", rows = crow, cols = deathCols + ccol.table, style = styles$header); + } + if (length(surrenderCols) > 0) { + writeTableCaption(wb, sheet, "R�ckkauf", rows = crow, cols = surrenderCols + ccol.table, style = styles$header); + } + if (length(premiumWaiverCols) > 0) { + writeTableCaption(wb, sheet, "Pr�mienfreistellung", rows = crow, cols = premiumWaiverCols + ccol.table, style = styles$header); + } - exportBlockID(wb, sheet, id = id, rows = blockid.row, cols = ccol:cl, styles = styles) - crow = endrow + seprows + exportBlockID(wb, sheet, id = id, rows = blockid.row, cols = ccol:cl, styles = styles) + crow = endrow + seprows + } for (b in contract$blocks) { crow = exportProfitParticipationTable( wb = wb, sheet = sheet, contract = b, - ccol = ccol, crow = crow, styles = styles, seprows = seprows, freeze = FALSE) + ccol = ccol, crow = crow + seprows, styles = styles, seprows = seprows, freeze = FALSE) } crow } @@ -785,6 +794,7 @@ exportInsuranceContract.xlsx = function(contract, filename) { ############################################### # styles = list( blockID = createStyle(border = "Bottom", borderColour = "#ab6310", fgFill = "#d0d0d0", halign = "left", textDecoration = "bold", fontSize = 14), + scenarioID = createStyle(halign = "left", textDecoration = "bold", fontSize = 14), header = createStyle(border = "TopBottomLeftRight", borderColour = "#DA9694", borderStyle = "medium", fgFill = "#C0504D", fontColour = "#FFFFFF", halign = "center", valign = "center", textDecoration = "bold"), diff --git a/inst/Beispiele/Example_Endowment.R b/inst/Beispiele/Example_Endowment.R index 2de12a6cfbbabe042d1180e8e9a308d909518dc9..576d93c5290e6362880fc7c4c3df6713035371f3 100644 --- a/inst/Beispiele/Example_Endowment.R +++ b/inst/Beispiele/Example_Endowment.R @@ -26,7 +26,6 @@ costs.Bsp.Stueckkosten = function (params, values) { min(50, 10 + 0.05*val surrender.Bsp = function(surrenderReserve, params, values) { -# browser() n = params$ContractData$policyPeriod - params$ContractData$blockStart; # Rückkaufsabschlag linear fallend von 10 auf 0%: sf = c(rep(0, params$ContractData$blockStart), 1 - 0.1 * (1 - (0:n)/n)); diff --git a/man/InsuranceContract.Values.Rd b/man/InsuranceContract.Values.Rd index 27bb25c7a7b638f8512fae6d328fa05211bd8df0..c137be06254049c0d2d2239551400b0e654d59bf 100644 --- a/man/InsuranceContract.Values.Rd +++ b/man/InsuranceContract.Values.Rd @@ -4,7 +4,7 @@ \name{InsuranceContract.Values} \alias{InsuranceContract.Values} \title{Data structure (filled only with NULL) for insurance contract class member values.} -\format{An object of class \code{list} of length 15.} +\format{An object of class \code{list} of length 16.} \usage{ InsuranceContract.Values }