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

V0.0.4, Fix CRAN warnings, fix docs, fix spurious imports warnings,

parent 98204c70
Branches
Tags
No related merge requests found
Showing
with 238 additions and 229 deletions
Package: LifeInsuranceContracts
Type: Package
Version: 0.0.3
Date: 2021-08-24
Version: 0.0.4
Date: 2022-09-10
Title: Framework for Traditional Life Insurance Contracts
Description: R6 classes to model traditional life insurance
contracts like annuities, whole life insurances or endowments. Such life
......@@ -30,11 +30,12 @@ Imports:
stringr,
methods,
rlang,
rmarkdown,
kableExtra,
pander,
tidyr
License: GPL (>= 2)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.0
Collate:
'HelperFunctions.R'
'InsuranceParameters.R'
......@@ -49,7 +50,6 @@ Collate:
'exportInsuranceContractExample.R'
Suggests:
knitr,
rmarkdown,
magrittr,
tibble,
testthat
......
......@@ -91,18 +91,25 @@ exportClasses(TariffTypeSingleEnum)
import(MortalityTables)
import(R6)
import(dplyr)
import(lubridate)
import(openxlsx)
import(scales)
import(stringr)
import(tidyr)
importFrom(abind,abind)
importFrom(kableExtra,kable)
importFrom(lubridate,"year<-")
importFrom(lubridate,days)
importFrom(lubridate,interval)
importFrom(lubridate,month)
importFrom(lubridate,time_length)
importFrom(lubridate,year)
importFrom(lubridate,years)
importFrom(methods,is)
importFrom(methods,new)
importFrom(objectProperties,setSingleEnum)
importFrom(pander,pander)
importFrom(rlang,.data)
importFrom(rmarkdown,render)
importFrom(utils,head)
importFrom(utils,tail)
......@@ -2,11 +2,13 @@
#' @importFrom objectProperties setSingleEnum
#' @importFrom utils head tail
#' @importFrom methods new
#' @importFrom lubridate time_length interval
NULL
#' Enum to describe when a benefit or premium payment is due (in advance or in arrears)
#'
#' @details Currently, only two values are allowed;
#' \itemize{
#' \item "in advance"
......@@ -17,6 +19,7 @@ NULL
PaymentTimeEnum = objectProperties::setSingleEnum("PaymentTime", levels = c("in advance", "in arrears"));
#' Enum to describe possible sexes in an insurance contract or tariff.
#'
#' @details
#' Currently, the only possible values are:
#' * "unisex"
......@@ -27,6 +30,7 @@ PaymentTimeEnum = objectProperties::setSingleEnum("PaymentTime", levels = c("in
SexEnum = objectProperties::setSingleEnum("Sex", levels = c("unisex", "male", "female"));
#' Enum to define how much of a contract needs to be calculated automatically.
#'
#' @details
#' When an [InsuranceContract] object is created, all time series are immediately
#' calculated. However, sometimes, one only needs part of the values, so it
......@@ -63,6 +67,7 @@ CalculationEnum = objectProperties::setSingleEnum("Calculation",
#' Enum to define the different components of profit participation.
#'
#' @details
#' Profit participation schemes typically consist of different components,
#' which are calculated independently. Typical components are interest profit
......@@ -208,8 +213,9 @@ age.yearDifference = function(params, values) {
}
#' Defines a frequency charge (surcharge for monthly/quarterly/semiannual) premium payments #'
#' Tariffs are typically calculated with yearly premium installments. When
#' Defines a frequency charge (surcharge for monthly/quarterly/semiannual) premium payments
#'
#' @description Tariffs are typically calculated with yearly premium installments. When
#' premiums are paid more often then one a year (in advance), the insurance
#' receives part of the premium later (or not at all in case of death), so a
#' surcharge for premium payment frequencies higher than yearly is applied to
......@@ -458,6 +464,7 @@ pad0 = function(v, l, value = 0, start = 0) {
}
#' Set all entries of the given vector to 0 up until index 'start'
#'
#' @param v the vector to modify
#' @param start how many leading elements to zero out
#'
......@@ -586,7 +593,9 @@ applyHook = function(hook, val, ...) {
#' Overwrite all existing fields in the first argument with
#' Overwrite all existing fields with default values given
#'
#' @description Overwrite all existing fields in the first argument with
#' values given in valuelist. Members of valuelist that are not yet in
#' fields are ignored. This allows a huge valuelist to be used to fill
#' fields in multiple lists with given structure.
......@@ -601,7 +610,10 @@ fillFields = function(fields, valuelist) {
fields
}
#' Replace all missing values in fields (either missing or NA) with
#' Replace missing values in ields by default fallback values
#'
#' @description Replace all missing values in fields (either missing or NA) with
#' their corresponding values from fallback. Members in fallback that are missing
#' in fields are inserted
#' @param fields existing list
......
......@@ -2,6 +2,11 @@
#'
#' @import MortalityTables
#' @import R6
#' @import lubridate
# Prevent spurious imports warnings in CRAN checks:
#' @importFrom kableExtra kable
#' @importFrom pander pander
#' @importFrom rmarkdown render
NULL
......
......@@ -230,7 +230,10 @@ InsuranceContract.Values = list(
);
# InsuranceContract.ParameterDefaults #######################################
#' Default parameters for the InsuranceContract class. A new contract will be
#
#' Default parameters for the InsuranceContract class.
#'
#' A new contract will be
#' pre-filled with these values, and values passed in the constructor (or with
#' other setter functions) will override these values.
#'
......@@ -672,7 +675,7 @@ InsuranceContract.ParameterStructure$Loadings["benefitFrequencyLoading"] = list(
InsuranceContract.ParameterStructure$Loadings["premiumFrequencyLoading"] = list(NULL)
#' InsuranceContract.ParametersFill
#' Initialize the insurance contract parameters from passed arguments
#'
#' Initialize the insurance contract parameters from the passed
#' arguments. Arguments not given are left unchanged. If no existing parameter
......@@ -701,7 +704,7 @@ InsuranceContract.ParametersFill = function(params = InsuranceContract.Parameter
params
}
#' InsuranceContract.ParametersFallback
#' Use fallback values for missing contract parameters
#'
#' Provide default values for the insurance contract parameters if any of the
#' parameters is not explicitly set.
......
......@@ -7,7 +7,8 @@
NULL
#' An enum specifying the main characteristics of the tarif.
#' Possible values are:
#'
#' @description Possible values are:
#' \describe{
#' \item{annuity}{Whole life or term annuity (periodic survival benefits)
#' with flexible payouts (constand, increasing, decreasing, arbitrary,
......
......@@ -59,7 +59,8 @@ exportInsuranceContractExample = function(contract, prf = 10, outdir = ".", base
if (!missing(extraname) && !is.null(extraname)) {
basename = paste(basename, "_", extraname, sep = "")
}
basename = paste(basename, "_RZ", sprintf("%.2f", contract$Parameters$ActuarialBases$i), "_x", contract$Parameters$ContractData$age, "_YoB", year(params$ContractData$birthDate), "_LZ", contract$Parameters$ContractData$policyPeriod, "_PrZ", contract$Parameters$ContractData$premiumPeriod, "_VS", contract$Parameters$ContractData$sumInsured, sep = "" )
params = contract$Parameters
basename = paste(basename, "_RZ", sprintf("%.2f", params$ActuarialBases$i), "_x", params$ContractData$age, "_YoB", year(params$ContractData$birthDate), "_LZ", params$ContractData$policyPeriod, "_PrZ", params$ContractData$premiumPeriod, "_VS", params$ContractData$sumInsured, sep = "" )
}
filename = paste(basename, ".xlsx", sep = "");
......
......@@ -2,6 +2,7 @@
#'
#' @import MortalityTables
#' @import scales
#' @importFrom methods is
NULL
# Internal helper function to calculate all values => will be used by
......@@ -185,8 +186,8 @@ showVmGlgExamples = function(contract, prf = 10, t = 10, t_prf = 12, file = "",
#' @param t Time for which to check all values (except premium-free values)
#' @param prf Time of premium waiver (premium-free)
#' @param t_prf Time for which to check all values after the premium waiver
#' @param net, Zillmer, gross, written, savings, risk, ZillmerRes, ZillmerRes.prf, VwKostenRes, VwKostenRes.prf, Bilanzreserve, Praemienuebertrag, Rueckkaufsreserve, Rueckkaufswert, Abschlusskostenruecktrag, Rueckkaufswert.prf, VS.prf Values as printed out by showVmGlgExamples
#' @param tolerance If non-NULL, will ignore small floating point differences. It uses same algorithm as all.equal()
#' @param net,Zillmer,gross,written,savings,risk,ZillmerRes,ZillmerRes.prf,VwKostenRes,VwKostenRes.prf,Bilanzreserve,Praemienuebertrag,Rueckkaufsreserve,Rueckkaufswert,Abschlusskostenruecktrag,Rueckkaufswert.prf,VS.prf Values as printed out by showVmGlgExamples
#' @param absTolerance If non-NULL, will ignore small floating point differences. It uses same algorithm as all.equal()
#' @param ... Further parameters for generating the contract for a tariff object
#'
#' @examples
......
......@@ -3,9 +3,7 @@
\docType{data}
\name{InsuranceContract.ParameterDefaults}
\alias{InsuranceContract.ParameterDefaults}
\title{Default parameters for the InsuranceContract class. A new contract will be
pre-filled with these values, and values passed in the constructor (or with
other setter functions) will override these values.}
\title{Default parameters for the InsuranceContract class.}
\format{
The parameter list is a list of lists with the following structure:
......@@ -318,7 +316,7 @@ participation rates are defined at the level of profit classes.}
InsuranceContract.ParameterDefaults
}
\description{
Default parameters for the InsuranceContract class. A new contract will be
A new contract will be
pre-filled with these values, and values passed in the constructor (or with
other setter functions) will override these values.
}
......
......@@ -2,7 +2,7 @@
% Please edit documentation in R/InsuranceParameters.R
\name{InsuranceContract.ParametersFallback}
\alias{InsuranceContract.ParametersFallback}
\title{InsuranceContract.ParametersFallback}
\title{Use fallback values for missing contract parameters}
\usage{
InsuranceContract.ParametersFallback(params, fallback, ppParameters = TRUE)
}
......
......@@ -2,7 +2,7 @@
% Please edit documentation in R/InsuranceParameters.R
\name{InsuranceContract.ParametersFill}
\alias{InsuranceContract.ParametersFill}
\title{InsuranceContract.ParametersFill}
\title{Initialize the insurance contract parameters from passed arguments}
\usage{
InsuranceContract.ParametersFill(
params = InsuranceContract.ParameterStructure,
......
......@@ -201,20 +201,24 @@ This method adds a new contract block describing a dynamic
or sum increase (increasing the sum insured at a later time
$t$ than contract inception). This increase is modelled by a
separate \link{InsuranceContract} object with the sum difference
as its own \code{sumInsured}.\preformatted{ By default, all parameters are taken from the main contract,
as its own \code{sumInsured}.
\if{html}{\out{<div class="sourceCode">}}\preformatted{ By default, all parameters are taken from the main contract,
with the maturity adjusted to match the original contract's
maturity.
The main contract holds all child blocks, controls their
valueation and aggregates all children's values to the
total values of the overall contract.
}
}\if{html}{\out{</div>}}
This method calculates all contract values (potentially
starting from and preserving all values before a later time
\code{valuesFrom}). This function is not meant to be called
directly, but internally, whenever a contract is created or
modified.\preformatted{ There is, hoever, a legitimate case to call this function
modified.
\if{html}{\out{<div class="sourceCode">}}\preformatted{ There is, hoever, a legitimate case to call this function
when a contract was initially created with a value of
\code{calculate} other than "all", so not all values of the
contract were calculated. When one later needs more values
......@@ -223,13 +227,15 @@ modified.\preformatted{ There is, hoever, a legitimate case to call this fun
and reapplied again afterwards. So even in this case it is
probably easier to create the contract object from scratch
again.
}
}\if{html}{\out{</div>}}
This function is an internal function for contracts with
multiple child blocks (dynamic increases, sum increases, riders).
It takes the values from all child blocks and calculates the
overall values from all child blocks aggregated.\preformatted{ This function should not be called manually.
}
overall values from all child blocks aggregated.
\if{html}{\out{<div class="sourceCode">}}\preformatted{ This function should not be called manually.
}\if{html}{\out{</div>}}
This function modifies the contract at time $t$ so that
no further premiums are paid (i.e. a paid-up contract) and the
......@@ -244,9 +250,11 @@ This function calculates one profit scenario with the
provided profit participation parameters (all parameters
not given in the call are taken from their values of the
contract, profit participation scheme or tariff). The results
are stored in a list of profit scenarios inside the contract.\preformatted{ This function can be chained to calculate and add multiple
are stored in a list of profit scenarios inside the contract.
\if{html}{\out{<div class="sourceCode">}}\preformatted{ This function can be chained to calculate and add multiple
profit scenarios.
}
}\if{html}{\out{</div>}}
}
\examples{
......@@ -337,21 +345,21 @@ contract state and its values before the change).}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\item \href{#method-new}{\code{InsuranceContract$new()}}
\item \href{#method-addHistorySnapshot}{\code{InsuranceContract$addHistorySnapshot()}}
\item \href{#method-addBlock}{\code{InsuranceContract$addBlock()}}
\item \href{#method-addDynamics}{\code{InsuranceContract$addDynamics()}}
\item \href{#method-calculateContract}{\code{InsuranceContract$calculateContract()}}
\item \href{#method-consolidateBlocks}{\code{InsuranceContract$consolidateBlocks()}}
\item \href{#method-premiumWaiver}{\code{InsuranceContract$premiumWaiver()}}
\item \href{#method-profitScenario}{\code{InsuranceContract$profitScenario()}}
\item \href{#method-addProfitScenario}{\code{InsuranceContract$addProfitScenario()}}
\item \href{#method-clone}{\code{InsuranceContract$clone()}}
\item \href{#method-InsuranceContract-new}{\code{InsuranceContract$new()}}
\item \href{#method-InsuranceContract-addHistorySnapshot}{\code{InsuranceContract$addHistorySnapshot()}}
\item \href{#method-InsuranceContract-addBlock}{\code{InsuranceContract$addBlock()}}
\item \href{#method-InsuranceContract-addDynamics}{\code{InsuranceContract$addDynamics()}}
\item \href{#method-InsuranceContract-calculateContract}{\code{InsuranceContract$calculateContract()}}
\item \href{#method-InsuranceContract-consolidateBlocks}{\code{InsuranceContract$consolidateBlocks()}}
\item \href{#method-InsuranceContract-premiumWaiver}{\code{InsuranceContract$premiumWaiver()}}
\item \href{#method-InsuranceContract-profitScenario}{\code{InsuranceContract$profitScenario()}}
\item \href{#method-InsuranceContract-addProfitScenario}{\code{InsuranceContract$addProfitScenario()}}
\item \href{#method-InsuranceContract-clone}{\code{InsuranceContract$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-new"></a>}}
\if{latex}{\out{\hypertarget{method-new}{}}}
\if{html}{\out{<a id="method-InsuranceContract-new"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceContract-new}{}}}
\subsection{Method \code{new()}}{
Create a new insurance contract (for the given tariff/product) and calculate all time series
\subsection{Usage}{
......@@ -397,8 +405,8 @@ Possible values are all sub-fields of the
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-addHistorySnapshot"></a>}}
\if{latex}{\out{\hypertarget{method-addHistorySnapshot}{}}}
\if{html}{\out{<a id="method-InsuranceContract-addHistorySnapshot"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceContract-addHistorySnapshot}{}}}
\subsection{Method \code{addHistorySnapshot()}}{
Add the current state of the contract to the history list
\subsection{Usage}{
......@@ -449,8 +457,8 @@ multiple insurance blocks (e.g. dynamic increases, riders, etc.)}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-addBlock"></a>}}
\if{latex}{\out{\hypertarget{method-addBlock}{}}}
\if{html}{\out{<a id="method-InsuranceContract-addBlock"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceContract-addBlock}{}}}
\subsection{Method \code{addBlock()}}{
Add a child contract block (e.g. a dynamic increase or a rider) to an insurance contract
\subsection{Usage}{
......@@ -497,8 +505,8 @@ created with overrides.}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-addDynamics"></a>}}
\if{latex}{\out{\hypertarget{method-addDynamics}{}}}
\if{html}{\out{<a id="method-InsuranceContract-addDynamics"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceContract-addDynamics}{}}}
\subsection{Method \code{addDynamics()}}{
Add a dynamic increase with the same parameters as the main contract part
\subsection{Usage}{
......@@ -549,8 +557,8 @@ they can be overridden per dynamic increase block.}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-calculateContract"></a>}}
\if{latex}{\out{\hypertarget{method-calculateContract}{}}}
\if{html}{\out{<a id="method-InsuranceContract-calculateContract"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceContract-calculateContract}{}}}
\subsection{Method \code{calculateContract()}}{
Calculate all time series of the contract from the parameters
\subsection{Usage}{
......@@ -609,8 +617,8 @@ sum when the premium is recalculated.}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-consolidateBlocks"></a>}}
\if{latex}{\out{\hypertarget{method-consolidateBlocks}{}}}
\if{html}{\out{<a id="method-InsuranceContract-consolidateBlocks"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceContract-consolidateBlocks}{}}}
\subsection{Method \code{consolidateBlocks()}}{
Aggregate values from all child contract blocks (if any)
\subsection{Usage}{
......@@ -627,8 +635,8 @@ that time will be left unchanged.}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-premiumWaiver"></a>}}
\if{latex}{\out{\hypertarget{method-premiumWaiver}{}}}
\if{html}{\out{<a id="method-InsuranceContract-premiumWaiver"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceContract-premiumWaiver}{}}}
\subsection{Method \code{premiumWaiver()}}{
Stop premium payments and re-calculate sumInsured of the paid-up contract
\subsection{Usage}{
......@@ -654,8 +662,8 @@ Stop premium payments and re-calculate sumInsured of the paid-up contract
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-profitScenario"></a>}}
\if{latex}{\out{\hypertarget{method-profitScenario}{}}}
\if{html}{\out{<a id="method-InsuranceContract-profitScenario"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceContract-profitScenario}{}}}
\subsection{Method \code{profitScenario()}}{
Calculate one profit scenario and return all values
\subsection{Usage}{
......@@ -686,8 +694,8 @@ terminal bonus funds, profit in case of death/surrender/premium waiver)
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-addProfitScenario"></a>}}
\if{latex}{\out{\hypertarget{method-addProfitScenario}{}}}
\if{html}{\out{<a id="method-InsuranceContract-addProfitScenario"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceContract-addProfitScenario}{}}}
\subsection{Method \code{addProfitScenario()}}{
Calculate one profit scenario and store it in the contract
\subsection{Usage}{
......@@ -717,8 +725,8 @@ in a profitScenario.}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-clone"></a>}}
\if{latex}{\out{\hypertarget{method-clone}{}}}
\if{html}{\out{<a id="method-InsuranceContract-clone"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceContract-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
......
......@@ -136,42 +136,42 @@ all fields.}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\item \href{#method-new}{\code{InsuranceTarif$new()}}
\item \href{#method-createModification}{\code{InsuranceTarif$createModification()}}
\item \href{#method-getParameters}{\code{InsuranceTarif$getParameters()}}
\item \href{#method-getInternalValues}{\code{InsuranceTarif$getInternalValues()}}
\item \href{#method-getAges}{\code{InsuranceTarif$getAges()}}
\item \href{#method-getTransitionProbabilities}{\code{InsuranceTarif$getTransitionProbabilities()}}
\item \href{#method-getCostValues}{\code{InsuranceTarif$getCostValues()}}
\item \href{#method-getPremiumCF}{\code{InsuranceTarif$getPremiumCF()}}
\item \href{#method-getAnnuityCF}{\code{InsuranceTarif$getAnnuityCF()}}
\item \href{#method-getDeathCF}{\code{InsuranceTarif$getDeathCF()}}
\item \href{#method-getBasicCashFlows}{\code{InsuranceTarif$getBasicCashFlows()}}
\item \href{#method-getCashFlows}{\code{InsuranceTarif$getCashFlows()}}
\item \href{#method-getCashFlowsCosts}{\code{InsuranceTarif$getCashFlowsCosts()}}
\item \href{#method-presentValueCashFlows}{\code{InsuranceTarif$presentValueCashFlows()}}
\item \href{#method-presentValueCashFlowsCosts}{\code{InsuranceTarif$presentValueCashFlowsCosts()}}
\item \href{#method-getAbsCashFlows}{\code{InsuranceTarif$getAbsCashFlows()}}
\item \href{#method-getAbsPresentValues}{\code{InsuranceTarif$getAbsPresentValues()}}
\item \href{#method-presentValueBenefits}{\code{InsuranceTarif$presentValueBenefits()}}
\item \href{#method-getPremiumCoefficients}{\code{InsuranceTarif$getPremiumCoefficients()}}
\item \href{#method-premiumCalculation}{\code{InsuranceTarif$premiumCalculation()}}
\item \href{#method-reserveCalculation}{\code{InsuranceTarif$reserveCalculation()}}
\item \href{#method-getBalanceSheetReserveFactor}{\code{InsuranceTarif$getBalanceSheetReserveFactor()}}
\item \href{#method-reserveCalculationBalanceSheet}{\code{InsuranceTarif$reserveCalculationBalanceSheet()}}
\item \href{#method-calculateProfitParticipation}{\code{InsuranceTarif$calculateProfitParticipation()}}
\item \href{#method-reservesAfterProfit}{\code{InsuranceTarif$reservesAfterProfit()}}
\item \href{#method-getBasicDataTimeseries}{\code{InsuranceTarif$getBasicDataTimeseries()}}
\item \href{#method-premiumDecomposition}{\code{InsuranceTarif$premiumDecomposition()}}
\item \href{#method-calculateFutureSums}{\code{InsuranceTarif$calculateFutureSums()}}
\item \href{#method-calculatePresentValues}{\code{InsuranceTarif$calculatePresentValues()}}
\item \href{#method-evaluateFrequencyLoading}{\code{InsuranceTarif$evaluateFrequencyLoading()}}
\item \href{#method-clone}{\code{InsuranceTarif$clone()}}
\item \href{#method-InsuranceTarif-new}{\code{InsuranceTarif$new()}}
\item \href{#method-InsuranceTarif-createModification}{\code{InsuranceTarif$createModification()}}
\item \href{#method-InsuranceTarif-getParameters}{\code{InsuranceTarif$getParameters()}}
\item \href{#method-InsuranceTarif-getInternalValues}{\code{InsuranceTarif$getInternalValues()}}
\item \href{#method-InsuranceTarif-getAges}{\code{InsuranceTarif$getAges()}}
\item \href{#method-InsuranceTarif-getTransitionProbabilities}{\code{InsuranceTarif$getTransitionProbabilities()}}
\item \href{#method-InsuranceTarif-getCostValues}{\code{InsuranceTarif$getCostValues()}}
\item \href{#method-InsuranceTarif-getPremiumCF}{\code{InsuranceTarif$getPremiumCF()}}
\item \href{#method-InsuranceTarif-getAnnuityCF}{\code{InsuranceTarif$getAnnuityCF()}}
\item \href{#method-InsuranceTarif-getDeathCF}{\code{InsuranceTarif$getDeathCF()}}
\item \href{#method-InsuranceTarif-getBasicCashFlows}{\code{InsuranceTarif$getBasicCashFlows()}}
\item \href{#method-InsuranceTarif-getCashFlows}{\code{InsuranceTarif$getCashFlows()}}
\item \href{#method-InsuranceTarif-getCashFlowsCosts}{\code{InsuranceTarif$getCashFlowsCosts()}}
\item \href{#method-InsuranceTarif-presentValueCashFlows}{\code{InsuranceTarif$presentValueCashFlows()}}
\item \href{#method-InsuranceTarif-presentValueCashFlowsCosts}{\code{InsuranceTarif$presentValueCashFlowsCosts()}}
\item \href{#method-InsuranceTarif-getAbsCashFlows}{\code{InsuranceTarif$getAbsCashFlows()}}
\item \href{#method-InsuranceTarif-getAbsPresentValues}{\code{InsuranceTarif$getAbsPresentValues()}}
\item \href{#method-InsuranceTarif-presentValueBenefits}{\code{InsuranceTarif$presentValueBenefits()}}
\item \href{#method-InsuranceTarif-getPremiumCoefficients}{\code{InsuranceTarif$getPremiumCoefficients()}}
\item \href{#method-InsuranceTarif-premiumCalculation}{\code{InsuranceTarif$premiumCalculation()}}
\item \href{#method-InsuranceTarif-reserveCalculation}{\code{InsuranceTarif$reserveCalculation()}}
\item \href{#method-InsuranceTarif-getBalanceSheetReserveFactor}{\code{InsuranceTarif$getBalanceSheetReserveFactor()}}
\item \href{#method-InsuranceTarif-reserveCalculationBalanceSheet}{\code{InsuranceTarif$reserveCalculationBalanceSheet()}}
\item \href{#method-InsuranceTarif-calculateProfitParticipation}{\code{InsuranceTarif$calculateProfitParticipation()}}
\item \href{#method-InsuranceTarif-reservesAfterProfit}{\code{InsuranceTarif$reservesAfterProfit()}}
\item \href{#method-InsuranceTarif-getBasicDataTimeseries}{\code{InsuranceTarif$getBasicDataTimeseries()}}
\item \href{#method-InsuranceTarif-premiumDecomposition}{\code{InsuranceTarif$premiumDecomposition()}}
\item \href{#method-InsuranceTarif-calculateFutureSums}{\code{InsuranceTarif$calculateFutureSums()}}
\item \href{#method-InsuranceTarif-calculatePresentValues}{\code{InsuranceTarif$calculatePresentValues()}}
\item \href{#method-InsuranceTarif-evaluateFrequencyLoading}{\code{InsuranceTarif$evaluateFrequencyLoading()}}
\item \href{#method-InsuranceTarif-clone}{\code{InsuranceTarif$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-new"></a>}}
\if{latex}{\out{\hypertarget{method-new}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-new"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-new}{}}}
\subsection{Method \code{new()}}{
Initialize a new tariff object
\subsection{Usage}{
......@@ -243,8 +243,8 @@ tarif.male = InsuranceTarif$new(name = "Annuity Males", type = "annuity",
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-createModification"></a>}}
\if{latex}{\out{\hypertarget{method-createModification}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-createModification"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-createModification}{}}}
\subsection{Method \code{createModification()}}{
create a copy of a tariff with certain parameters changed
\subsection{Usage}{
......@@ -300,8 +300,8 @@ tarif.unisex = tarif.male$createModification(name = "Annuity unisex",
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getParameters"></a>}}
\if{latex}{\out{\hypertarget{method-getParameters}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getParameters"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getParameters}{}}}
\subsection{Method \code{getParameters()}}{
Retrieve the parameters for this tariff (can be overridden
for each contract)
......@@ -321,8 +321,8 @@ tarif.male$getParameters()
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getInternalValues"></a>}}
\if{latex}{\out{\hypertarget{method-getInternalValues}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getInternalValues"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getInternalValues}{}}}
\subsection{Method \code{getInternalValues()}}{
Get some internal parameters cached (length of data.frames,
policy periods cut at max.age, etc.)
......@@ -349,8 +349,8 @@ relevant for the contract-specific calculations
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getAges"></a>}}
\if{latex}{\out{\hypertarget{method-getAges}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getAges"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getAges}{}}}
\subsection{Method \code{getAges()}}{
Calculate the contract-relevant age(s) given a certain
parameter data structure (contract-specific values)
......@@ -375,8 +375,8 @@ whole contract period
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getTransitionProbabilities"></a>}}
\if{latex}{\out{\hypertarget{method-getTransitionProbabilities}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getTransitionProbabilities"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getTransitionProbabilities}{}}}
\subsection{Method \code{getTransitionProbabilities()}}{
Calculate the transition probabilities from the contract-specific
parameters passed as \code{params} and the already-calculated contract
......@@ -403,8 +403,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getCostValues"></a>}}
\if{latex}{\out{\hypertarget{method-getCostValues}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getCostValues"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getCostValues}{}}}
\subsection{Method \code{getCostValues()}}{
Obtain the cost structure from the cost parameter and the
given paremeter set
......@@ -429,8 +429,8 @@ latter function is actually evaluated.
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getPremiumCF"></a>}}
\if{latex}{\out{\hypertarget{method-getPremiumCF}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getPremiumCF"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getPremiumCF}{}}}
\subsection{Method \code{getPremiumCF()}}{
Returns the unit premium cash flow for the whole contract period.
\itemize{
......@@ -463,8 +463,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getAnnuityCF"></a>}}
\if{latex}{\out{\hypertarget{method-getAnnuityCF}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getAnnuityCF"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getAnnuityCF}{}}}
\subsection{Method \code{getAnnuityCF()}}{
Returns the unit annuity cash flow (guaranteed and contingent) for
the whole annuity payment period (after potential deferral period)
......@@ -497,8 +497,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getDeathCF"></a>}}
\if{latex}{\out{\hypertarget{method-getDeathCF}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getDeathCF"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getDeathCF}{}}}
\subsection{Method \code{getDeathCF()}}{
Returns the unit death cash flow for the whole protection
period (after potential deferral period!)
......@@ -530,8 +530,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getBasicCashFlows"></a>}}
\if{latex}{\out{\hypertarget{method-getBasicCashFlows}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getBasicCashFlows"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getBasicCashFlows}{}}}
\subsection{Method \code{getBasicCashFlows()}}{
Returns the basic (unit) cash flows associated with the type
of insurance given in the InsuranceTarif's \code{tariffType} field
......@@ -557,8 +557,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getCashFlows"></a>}}
\if{latex}{\out{\hypertarget{method-getCashFlows}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getCashFlows"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getCashFlows}{}}}
\subsection{Method \code{getCashFlows()}}{
Returns the cash flows for the contract given the parameters
\subsection{Usage}{
......@@ -583,8 +583,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getCashFlowsCosts"></a>}}
\if{latex}{\out{\hypertarget{method-getCashFlowsCosts}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getCashFlowsCosts"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getCashFlowsCosts}{}}}
\subsection{Method \code{getCashFlowsCosts()}}{
Returns the cost cash flows of the contract given the contract
and tariff parameters
......@@ -610,8 +610,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-presentValueCashFlows"></a>}}
\if{latex}{\out{\hypertarget{method-presentValueCashFlows}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-presentValueCashFlows"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-presentValueCashFlows}{}}}
\subsection{Method \code{presentValueCashFlows()}}{
Returns the present values of the cash flows of the contract
(cash flows already calculated and stored in the \code{cashFlows} data.frame)
......@@ -639,8 +639,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-presentValueCashFlowsCosts"></a>}}
\if{latex}{\out{\hypertarget{method-presentValueCashFlowsCosts}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-presentValueCashFlowsCosts"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-presentValueCashFlowsCosts}{}}}
\subsection{Method \code{presentValueCashFlowsCosts()}}{
Calculates the present values of the cost cash flows of the
contract (cost cash flows alreay calculated by \href{#method-getCashFlowsCosts}{\code{InsuranceTarif$getCashFlowsCosts()}}
......@@ -669,8 +669,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getAbsCashFlows"></a>}}
\if{latex}{\out{\hypertarget{method-getAbsCashFlows}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getAbsCashFlows"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getAbsCashFlows}{}}}
\subsection{Method \code{getAbsCashFlows()}}{
Calculate the cash flows in monetary terms of the insurance contract
\subsection{Usage}{
......@@ -700,8 +700,8 @@ This method is NOT to be called directly, but implicitly by the \link{InsuranceC
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getAbsPresentValues"></a>}}
\if{latex}{\out{\hypertarget{method-getAbsPresentValues}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getAbsPresentValues"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getAbsPresentValues}{}}}
\subsection{Method \code{getAbsPresentValues()}}{
Calculate the absolute present value time series of the insurance contract
\subsection{Usage}{
......@@ -732,8 +732,8 @@ This method is NOT to be called directly, but implicitly by the \link{InsuranceC
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-presentValueBenefits"></a>}}
\if{latex}{\out{\hypertarget{method-presentValueBenefits}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-presentValueBenefits"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-presentValueBenefits}{}}}
\subsection{Method \code{presentValueBenefits()}}{
Calculate the absolute present value time series of the
benefits of the insurance contract
......@@ -765,8 +765,8 @@ This method is NOT to be called directly, but implicitly by the \link{InsuranceC
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getPremiumCoefficients"></a>}}
\if{latex}{\out{\hypertarget{method-getPremiumCoefficients}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getPremiumCoefficients"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getPremiumCoefficients}{}}}
\subsection{Method \code{getPremiumCoefficients()}}{
Calculate the linear coefficients of the premium calculation formula for the insurance contract
\subsection{Usage}{
......@@ -823,8 +823,8 @@ argument.
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-premiumCalculation"></a>}}
\if{latex}{\out{\hypertarget{method-premiumCalculation}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-premiumCalculation"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-premiumCalculation}{}}}
\subsection{Method \code{premiumCalculation()}}{
Calculate the premiums of the InsuranceContract given the
parameters, present values and premium cofficients already calculated and
......@@ -861,8 +861,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-reserveCalculation"></a>}}
\if{latex}{\out{\hypertarget{method-reserveCalculation}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-reserveCalculation"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-reserveCalculation}{}}}
\subsection{Method \code{reserveCalculation()}}{
Calculate the reserves of the InsuranceContract given the
parameters, present values and premiums already calculated and stored in
......@@ -889,8 +889,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getBalanceSheetReserveFactor"></a>}}
\if{latex}{\out{\hypertarget{method-getBalanceSheetReserveFactor}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getBalanceSheetReserveFactor"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getBalanceSheetReserveFactor}{}}}
\subsection{Method \code{getBalanceSheetReserveFactor()}}{
Calculate the (linear) interpolation factors for the balance
sheet reserve (Dec. 31) between the yearly contract closing dates
......@@ -918,8 +918,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-reserveCalculationBalanceSheet"></a>}}
\if{latex}{\out{\hypertarget{method-reserveCalculationBalanceSheet}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-reserveCalculationBalanceSheet"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-reserveCalculationBalanceSheet}{}}}
\subsection{Method \code{reserveCalculationBalanceSheet()}}{
Calculate the reserves for the balance sheets at Dec. 31 of each
year by interpolation from the contract values calculated for
......@@ -946,8 +946,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-calculateProfitParticipation"></a>}}
\if{latex}{\out{\hypertarget{method-calculateProfitParticipation}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-calculateProfitParticipation"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-calculateProfitParticipation}{}}}
\subsection{Method \code{calculateProfitParticipation()}}{
Calculate the profit participation given the contract
parameters and the already calculated reserves of the contract.
......@@ -973,8 +973,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-reservesAfterProfit"></a>}}
\if{latex}{\out{\hypertarget{method-reservesAfterProfit}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-reservesAfterProfit"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-reservesAfterProfit}{}}}
\subsection{Method \code{reservesAfterProfit()}}{
Calculate the reserves after profit participation for the given profit scenario
\subsection{Usage}{
......@@ -1003,8 +1003,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getBasicDataTimeseries"></a>}}
\if{latex}{\out{\hypertarget{method-getBasicDataTimeseries}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-getBasicDataTimeseries"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-getBasicDataTimeseries}{}}}
\subsection{Method \code{getBasicDataTimeseries()}}{
Return the time series of the basic contract
\subsection{Usage}{
......@@ -1029,8 +1029,8 @@ Not to be called directly, but implicitly by the \link{InsuranceContract} object
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-premiumDecomposition"></a>}}
\if{latex}{\out{\hypertarget{method-premiumDecomposition}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-premiumDecomposition"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-premiumDecomposition}{}}}
\subsection{Method \code{premiumDecomposition()}}{
Calculate the time series of the premium decomposition of the contract
\subsection{Usage}{
......@@ -1056,8 +1056,8 @@ All premiums, reserves and present values have already been calculated.
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-calculateFutureSums"></a>}}
\if{latex}{\out{\hypertarget{method-calculateFutureSums}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-calculateFutureSums"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-calculateFutureSums}{}}}
\subsection{Method \code{calculateFutureSums()}}{
Generic function to calculate future sums of the values
\subsection{Usage}{
......@@ -1075,8 +1075,8 @@ Generic function to calculate future sums of the values
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-calculatePresentValues"></a>}}
\if{latex}{\out{\hypertarget{method-calculatePresentValues}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-calculatePresentValues"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-calculatePresentValues}{}}}
\subsection{Method \code{calculatePresentValues()}}{
Calculate all present values for a given time series. The
mortalities are taken from the contract's parameters.
......@@ -1100,8 +1100,8 @@ scheme and the contract)}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-evaluateFrequencyLoading"></a>}}
\if{latex}{\out{\hypertarget{method-evaluateFrequencyLoading}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-evaluateFrequencyLoading"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-evaluateFrequencyLoading}{}}}
\subsection{Method \code{evaluateFrequencyLoading()}}{
Calculate the premium frequency loading, i.e. the surcharge
on the premium for those cases where the premium is not paid yearly.
......@@ -1129,8 +1129,8 @@ list) then this method is called by the contract object}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-clone"></a>}}
\if{latex}{\out{\hypertarget{method-clone}{}}}
\if{html}{\out{<a id="method-InsuranceTarif-clone"></a>}}
\if{latex}{\out{\hypertarget{method-InsuranceTarif-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
......
......@@ -97,22 +97,22 @@ be provided to calculate the benefit stemming from profit participation.}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\item \href{#method-new}{\code{ProfitParticipation$new()}}
\item \href{#method-setParameters}{\code{ProfitParticipation$setParameters()}}
\item \href{#method-setFunctions}{\code{ProfitParticipation$setFunctions()}}
\item \href{#method-setFallbackParameters}{\code{ProfitParticipation$setFallbackParameters()}}
\item \href{#method-createModification}{\code{ProfitParticipation$createModification()}}
\item \href{#method-getAdvanceProfitParticipation}{\code{ProfitParticipation$getAdvanceProfitParticipation()}}
\item \href{#method-getAdvanceProfitParticipationAfterUnitCosts}{\code{ProfitParticipation$getAdvanceProfitParticipationAfterUnitCosts()}}
\item \href{#method-setupRates}{\code{ProfitParticipation$setupRates()}}
\item \href{#method-adjustRates}{\code{ProfitParticipation$adjustRates()}}
\item \href{#method-getProfitParticipation}{\code{ProfitParticipation$getProfitParticipation()}}
\item \href{#method-clone}{\code{ProfitParticipation$clone()}}
\item \href{#method-ProfitParticipation-new}{\code{ProfitParticipation$new()}}
\item \href{#method-ProfitParticipation-setParameters}{\code{ProfitParticipation$setParameters()}}
\item \href{#method-ProfitParticipation-setFunctions}{\code{ProfitParticipation$setFunctions()}}
\item \href{#method-ProfitParticipation-setFallbackParameters}{\code{ProfitParticipation$setFallbackParameters()}}
\item \href{#method-ProfitParticipation-createModification}{\code{ProfitParticipation$createModification()}}
\item \href{#method-ProfitParticipation-getAdvanceProfitParticipation}{\code{ProfitParticipation$getAdvanceProfitParticipation()}}
\item \href{#method-ProfitParticipation-getAdvanceProfitParticipationAfterUnitCosts}{\code{ProfitParticipation$getAdvanceProfitParticipationAfterUnitCosts()}}
\item \href{#method-ProfitParticipation-setupRates}{\code{ProfitParticipation$setupRates()}}
\item \href{#method-ProfitParticipation-adjustRates}{\code{ProfitParticipation$adjustRates()}}
\item \href{#method-ProfitParticipation-getProfitParticipation}{\code{ProfitParticipation$getProfitParticipation()}}
\item \href{#method-ProfitParticipation-clone}{\code{ProfitParticipation$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-new"></a>}}
\if{latex}{\out{\hypertarget{method-new}{}}}
\if{html}{\out{<a id="method-ProfitParticipation-new"></a>}}
\if{latex}{\out{\hypertarget{method-ProfitParticipation-new}{}}}
\subsection{Method \code{new()}}{
Create a new profit participation scheme
\subsection{Usage}{
......@@ -132,8 +132,8 @@ field}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-setParameters"></a>}}
\if{latex}{\out{\hypertarget{method-setParameters}{}}}
\if{html}{\out{<a id="method-ProfitParticipation-setParameters"></a>}}
\if{latex}{\out{\hypertarget{method-ProfitParticipation-setParameters}{}}}
\subsection{Method \code{setParameters()}}{
Store all passed parameters in the \code{Parameters} field
\subsection{Usage}{
......@@ -150,8 +150,8 @@ Store all passed parameters in the \code{Parameters} field
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-setFunctions"></a>}}
\if{latex}{\out{\hypertarget{method-setFunctions}{}}}
\if{html}{\out{<a id="method-ProfitParticipation-setFunctions"></a>}}
\if{latex}{\out{\hypertarget{method-ProfitParticipation-setFunctions}{}}}
\subsection{Method \code{setFunctions()}}{
Store all passed functions in the \code{Functions} field
\subsection{Usage}{
......@@ -168,8 +168,8 @@ arguments will be ignored}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-setFallbackParameters"></a>}}
\if{latex}{\out{\hypertarget{method-setFallbackParameters}{}}}
\if{html}{\out{<a id="method-ProfitParticipation-setFallbackParameters"></a>}}
\if{latex}{\out{\hypertarget{method-ProfitParticipation-setFallbackParameters}{}}}
\subsection{Method \code{setFallbackParameters()}}{
Fill all missing parameters with the default fall-back values
\subsection{Usage}{
......@@ -178,8 +178,8 @@ Fill all missing parameters with the default fall-back values
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-createModification"></a>}}
\if{latex}{\out{\hypertarget{method-createModification}{}}}
\if{html}{\out{<a id="method-ProfitParticipation-createModification"></a>}}
\if{latex}{\out{\hypertarget{method-ProfitParticipation-createModification}{}}}
\subsection{Method \code{createModification()}}{
create a copy of a profit scheme with certain parameters changed
\subsection{Usage}{
......@@ -198,8 +198,8 @@ defining the characteristics of the tariff.}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getAdvanceProfitParticipation"></a>}}
\if{latex}{\out{\hypertarget{method-getAdvanceProfitParticipation}{}}}
\if{html}{\out{<a id="method-ProfitParticipation-getAdvanceProfitParticipation"></a>}}
\if{latex}{\out{\hypertarget{method-ProfitParticipation-getAdvanceProfitParticipation}{}}}
\subsection{Method \code{getAdvanceProfitParticipation()}}{
Calculate and return the advance profit participation (to be
applied on the actuarial gross premium)
......@@ -228,8 +228,8 @@ of a vector of numerical values for the whole contract period
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getAdvanceProfitParticipationAfterUnitCosts"></a>}}
\if{latex}{\out{\hypertarget{method-getAdvanceProfitParticipationAfterUnitCosts}{}}}
\if{html}{\out{<a id="method-ProfitParticipation-getAdvanceProfitParticipationAfterUnitCosts"></a>}}
\if{latex}{\out{\hypertarget{method-ProfitParticipation-getAdvanceProfitParticipationAfterUnitCosts}{}}}
\subsection{Method \code{getAdvanceProfitParticipationAfterUnitCosts()}}{
Calculate and return the advance profit participation (to be
applied after unit costs are added to the gross premium)
......@@ -262,8 +262,8 @@ of a vector of numerical values for the whole contract period
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-setupRates"></a>}}
\if{latex}{\out{\hypertarget{method-setupRates}{}}}
\if{html}{\out{<a id="method-ProfitParticipation-setupRates"></a>}}
\if{latex}{\out{\hypertarget{method-ProfitParticipation-setupRates}{}}}
\subsection{Method \code{setupRates()}}{
Set up the data.frame containing the profit participation rates
\subsection{Usage}{
......@@ -287,8 +287,8 @@ stored in the \code{Functions} field.}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-adjustRates"></a>}}
\if{latex}{\out{\hypertarget{method-adjustRates}{}}}
\if{html}{\out{<a id="method-ProfitParticipation-adjustRates"></a>}}
\if{latex}{\out{\hypertarget{method-ProfitParticipation-adjustRates}{}}}
\subsection{Method \code{adjustRates()}}{
Adjust the data.frame of profit participation rates after their setup
\subsection{Usage}{
......@@ -311,8 +311,8 @@ insurance contract, including cash flows, premiums, reserves etc.).}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-getProfitParticipation"></a>}}
\if{latex}{\out{\hypertarget{method-getProfitParticipation}{}}}
\if{html}{\out{<a id="method-ProfitParticipation-getProfitParticipation"></a>}}
\if{latex}{\out{\hypertarget{method-ProfitParticipation-getProfitParticipation}{}}}
\subsection{Method \code{getProfitParticipation()}}{
Calculation the full time series of profit participation for
the given contract values
......@@ -352,8 +352,8 @@ insurance contract, including cash flows, premiums, reserves etc.).}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-clone"></a>}}
\if{latex}{\out{\hypertarget{method-clone}{}}}
\if{html}{\out{<a id="method-ProfitParticipation-clone"></a>}}
\if{latex}{\out{\hypertarget{method-ProfitParticipation-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
......
......@@ -4,32 +4,8 @@
\name{TariffTypeSingleEnum-class}
\alias{TariffTypeSingleEnum-class}
\alias{TariffTypeEnum}
\title{An enum specifying the main characteristics of the tarif.
Possible values are:
\describe{
\item{annuity}{Whole life or term annuity (periodic survival benefits)
with flexible payouts (constand, increasing, decreasing, arbitrary,
etc.)}
\item{wholelife}{A whole or term life insurance with only death benefits.
The benefit can be constant, increasing, decreasing, described by
a function, etc.}
\item{endowment}{An endowment with death and survival benefits,
potentially with different benefits.}
\item{pureendowment}{A pure endowment with only a survival benefit at
the end of the contract. Optionally, in case of death, all or part
of the premiums paid may be refunded.}
\item{terme-fix}{A terme-fix insurance with a fixed payout at the end
of the contract, even if the insured dies before that time.
Premiums are paid until death of the insured.}
\item{dread-disease}{A dread-disease insurance, which pays in case of
a severe illness (typically heart attacks, cancer, strokes, etc.),
but not in case of death.}
\item{endowment + dread-disease}{A combination of an endowment and a
temporary dread-disease insurance. Benefits occur either on death,
severe illness or survival, whichever comes first.}
}}
\title{An enum specifying the main characteristics of the tarif.}
\description{
An enum specifying the main characteristics of the tarif.
Possible values are:
\describe{
\item{annuity}{Whole life or term annuity (periodic survival benefits)
......
......@@ -15,7 +15,9 @@ contractGrid(
contractGridPremium(
contractGrid = NULL,
premium = "written",
.fun = function(cntr) { cntr$Values$premiums[[premium]] },
.fun = function(cntr) {
cntr$Values$premiums[[premium]]
},
...
)
}
......
......@@ -2,9 +2,7 @@
% Please edit documentation in R/HelperFunctions.R
\name{fallbackFields}
\alias{fallbackFields}
\title{Replace all missing values in fields (either missing or NA) with
their corresponding values from fallback. Members in fallback that are missing
in fields are inserted}
\title{Replace missing values in ields by default fallback values}
\usage{
fallbackFields(fields, valuelist)
}
......
......@@ -2,10 +2,7 @@
% Please edit documentation in R/HelperFunctions.R
\name{fillFields}
\alias{fillFields}
\title{Overwrite all existing fields in the first argument with
values given in valuelist. Members of valuelist that are not yet in
fields are ignored. This allows a huge valuelist to be used to fill
fields in multiple lists with given structure.}
\title{Overwrite all existing fields with default values given}
\usage{
fillFields(fields, valuelist)
}
......
......@@ -2,12 +2,7 @@
% Please edit documentation in R/HelperFunctions.R
\name{freqCharge}
\alias{freqCharge}
\title{Defines a frequency charge (surcharge for monthly/quarterly/semiannual) premium payments #'
Tariffs are typically calculated with yearly premium installments. When
premiums are paid more often then one a year (in advance), the insurance
receives part of the premium later (or not at all in case of death), so a
surcharge for premium payment frequencies higher than yearly is applied to
the premium, typically in the form of a percentage of the premium.}
\title{Defines a frequency charge (surcharge for monthly/quarterly/semiannual) premium payments}
\usage{
freqCharge(monthly = 0, quarterly = 0, semiannually = 0, yearly = 0)
}
......@@ -21,6 +16,12 @@ freqCharge(monthly = 0, quarterly = 0, semiannually = 0, yearly = 0)
\item{yearly}{Surcharge for yearly premium payments (optiona, default is no surcharge)}
}
\description{
Tariffs are typically calculated with yearly premium installments. When
premiums are paid more often then one a year (in advance), the insurance
receives part of the premium later (or not at all in case of death), so a
surcharge for premium payment frequencies higher than yearly is applied to
the premium, typically in the form of a percentage of the premium.
This function generates the internal data structure to define surcharges for
monthly, quarterly and semiannual premium payments. The given surcharges can
be either given as percentage points (e.g. 1.5 means 1.5\% = 0.015) or as
......@@ -29,8 +30,7 @@ to distinguish percentage points and fractions is that all values larger than 0.
are understood as percentage points and values 0.1 and lower are understood
as fractions of 1.
As a consequence, a frequency charge of 10\% or more MUST be given as percentage points.
}
\details{
Currently, the frequency charges are internally represented as a named list,
\code{list("1" = 0, "2" = 0.01, "4" = 0.02, "12" = 0.03)}, but that might
change in the future, so it is advised to use this function rather than
......
......@@ -39,11 +39,11 @@ testVmGlgExample(
\item{t_prf}{Time for which to check all values after the premium waiver}
\item{net, }{Zillmer, gross, written, savings, risk, ZillmerRes, ZillmerRes.prf, VwKostenRes, VwKostenRes.prf, Bilanzreserve, Praemienuebertrag, Rueckkaufsreserve, Rueckkaufswert, Abschlusskostenruecktrag, Rueckkaufswert.prf, VS.prf Values as printed out by showVmGlgExamples}
\item{net, Zillmer, gross, written, savings, risk, ZillmerRes, ZillmerRes.prf, VwKostenRes, VwKostenRes.prf, Bilanzreserve, Praemienuebertrag, Rueckkaufsreserve, Rueckkaufswert, Abschlusskostenruecktrag, Rueckkaufswert.prf, VS.prf}{Values as printed out by showVmGlgExamples}
\item{...}{Further parameters for generating the contract for a tariff object}
\item{absTolerance}{If non-NULL, will ignore small floating point differences. It uses same algorithm as all.equal()}
\item{tolerance}{If non-NULL, will ignore small floating point differences. It uses same algorithm as all.equal()}
\item{...}{Further parameters for generating the contract for a tariff object}
}
\description{
Check the values of the example calculation of the given insurance contract
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment