Commit b6a4fdec authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Contract: Switch order of value calculation (premium composition before balance sheet reserves)

For the balance sheet reserves we might need the net/gamma/Zillmer premium components (for single-premium contracts no unearned premiums are reported, but the premium is included in the reserve!), so we need to calculate it before.
parent e42bf1b7
......@@ -618,7 +618,6 @@ InsuranceContract = R6Class(
if (calculate == "absvalues") return(invisible(self));
self$Values$reserves = mergeValues(starting = self$Values$reserves, ending = private$calculateReserves(), t = valuesFrom);
self$Values$reservesBalanceSheet = mergeValues(starting = self$Values$reservesBalanceSheet,ending = private$calculateReservesBalanceSheet(), t = valuesFrom);
if (calculate == "reserves") return(invisible(self));
self$Values$premiumComposition = mergeValues(starting = self$Values$premiumComposition, ending = private$premiumAnalysis(), t = valuesFrom);
self$Values$premiumCompositionSums = mergeValues(starting = self$Values$premiumCompositionSums, ending = private$premiumCompositionSums(), t = valuesFrom);
......@@ -626,6 +625,9 @@ InsuranceContract = R6Class(
self$Values$basicData = mergeValues(starting = self$Values$basicData, ending = private$getBasicDataTimeseries(), t = valuesFrom);
if (calculate == "premiumcomposition") return(invisible(self));
self$Values$reservesBalanceSheet = mergeValues(starting = self$Values$reservesBalanceSheet,ending = private$calculateReservesBalanceSheet(), t = valuesFrom);
if (calculate == "reservesbalancesheet") return(invisible(self));
private$profitParticipation(calculateFrom = valuesFrom);
if (calculate == "profitparticipation") return(invisible(self));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment