Skip to content
Snippets Groups Projects
Commit 4130a780 authored by Kainhofer Reinhold's avatar Kainhofer Reinhold
Browse files

Fix endowment example (surrender value function)

parent 5126bda5
No related branches found
No related tags found
No related merge requests found
......@@ -26,9 +26,10 @@ 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, start), 1 - 0.1 * (1 - (0:n)/n));
sf = c(rep(0, params$ContractData$blockStart), 1 - 0.1 * (1 - (0:n)/n));
surrenderReserve * sf
}
......@@ -54,16 +55,18 @@ Tarif.Bsp = InsuranceTarif$new(
surrenderValueCalculation = surrender.Bsp
);
#
# contract.Bsp.DynStart = InsuranceContract$new(
# Tarif.Bsp,
# age = 45, policyPeriod = 5, premiumPeriod = 5,
# premiumFrequency = 12,
# sumInsured = 100000,
# contractClosing = as.Date("2030-07-01")
# );
# exportInsuranceContractExample(contract.Bsp.DynStart, t = 5, basename = "Endowment_Dynamic_From0_Baseline");
# showVmGlgExamples(contract.Bsp.Dyn, t = 10)
if (false) {
contract.Bsp.DynStart = InsuranceContract$new(
Tarif.Bsp,
age = 45, policyPeriod = 5, premiumPeriod = 5,
premiumFrequency = 12,
sumInsured = 100000,
contractClosing = as.Date("2030-07-01")
);
exportInsuranceContract.xlsx(contract.Bsp.DynStart, t = 5, basename = "Endowment_Dynamic_From0_Baseline");
# exportInsuranceContractExample(contract.Bsp.DynStart, t = 5, basename = "Endowment_Dynamic_From0_Baseline");
# showVmGlgExamples(contract.Bsp.Dyn, t = 10)
}
contract.Bsp.DynStart$Values$cashFlowsBasic
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment