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

Add helper function isSinglePremiumContract to identify single-premium...

Add helper function isSinglePremiumContract to identify single-premium contracts from the parameters
parent 9fa87704
......@@ -101,6 +101,20 @@ ProfitComponentsEnum = objectProperties::setMultipleEnum("ProfitComponents",
)
)
#' Determine whether a contract (given all parameters) is a single-premium contract or with regular premiums
#'
#' The death benefit will be the full sumInsured for the first year after the
#' deferral period and then decrease linearly to 0 at the end of the policyPeriod.
#' This can be used with the \code{deathBenefit} parameter for insurance
#' contracts, but should not be called directly.
#'
#' @param params The parameters of the contract.
#' @param values Unused by default (already calculated values of the contract)
#'
#' @export
isSinglePremiumContract = function(params, values) { params$ContractData$premiumPeriod <= 1 }
#' Describes the death benefit of a linearly decreasing whole life insurance (after a possible deferall period)
#'
#' The death benefit will be the full sumInsured for the first year after the
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/exportInsuranceContract_xlsx.R
\name{costValuesAsDF}
\alias{costValuesAsDF}
\title{Convert the multi-dimensional costs array to a data.frame for output to a file}
\usage{
costValuesAsDF(costValues)
}
\description{
Convert the cost values array to a tx15 matrix
}
\details{
Not to be called directly, but implicitly by the \link{InsuranceContract} object.
Convert the array containing cost values like cashflows, present
values, etc. (objects of dimension tx5x3) to a matrix with dimensions (tx15)
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HelperFunctions.R
\name{isSinglePremiumContract}
\alias{isSinglePremiumContract}
\title{Determine whether a contract (given all parameters) is a single-premium contract or with regular premiums}
\usage{
isSinglePremiumContract(params, values)
}
\arguments{
\item{params}{The parameters of the contract.}
\item{values}{Unused by default (already calculated values of the contract)}
}
\description{
The death benefit will be the full sumInsured for the first year after the
deferral period and then decrease linearly to 0 at the end of the policyPeriod.
This can be used with the \code{deathBenefit} parameter for insurance
contracts, but should not be called directly.
}
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