Commit 592e91ef authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Add function isRegularPremiumContract

parent b6a4fdec
...@@ -64,6 +64,8 @@ export(fillNAgaps) ...@@ -64,6 +64,8 @@ export(fillNAgaps)
export(filterProfitRates) export(filterProfitRates)
export(head0) export(head0)
export(initializeCosts) export(initializeCosts)
export(isRegularPremiumContract)
export(isSinglePremiumContract)
export(makeContractGridDimname) export(makeContractGridDimname)
export(makeContractGridDimnames) export(makeContractGridDimnames)
export(pad0) export(pad0)
......
...@@ -103,10 +103,7 @@ ProfitComponentsEnum = objectProperties::setMultipleEnum("ProfitComponents", ...@@ -103,10 +103,7 @@ ProfitComponentsEnum = objectProperties::setMultipleEnum("ProfitComponents",
#' Determine whether a contract (given all parameters) is a single-premium contract or with regular premiums #' 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 #' Single premium contracts are identified by the parameter \code{premiumPeriod = 1}.
#' 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 params The parameters of the contract.
#' @param values Unused by default (already calculated values of the contract) #' @param values Unused by default (already calculated values of the contract)
...@@ -115,6 +112,17 @@ ProfitComponentsEnum = objectProperties::setMultipleEnum("ProfitComponents", ...@@ -115,6 +112,17 @@ ProfitComponentsEnum = objectProperties::setMultipleEnum("ProfitComponents",
isSinglePremiumContract = function(params, values) { params$ContractData$premiumPeriod <= 1 } isSinglePremiumContract = function(params, values) { params$ContractData$premiumPeriod <= 1 }
#' Determine whether a contract (given all parameters) is a contract with regular premiums
#'
#' Regular premium contracts are identified by the parameter \code{premiumPeriod > 1}.
#'
#' @param params The parameters of the contract.
#' @param values Unused by default (already calculated values of the contract)
#'
#' @export
isRegularPremiumContract = function(params, values) { params$ContractData$premiumPeriod > 1 }
#' Describes the death benefit of a linearly decreasing whole life insurance (after a possible deferall period) #' 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 #' 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/HelperFunctions.R
\name{isRegularPremiumContract}
\alias{isRegularPremiumContract}
\title{Determine whether a contract (given all parameters) is a contract with regular premiums}
\usage{
isRegularPremiumContract(params, values)
}
\arguments{
\item{params}{The parameters of the contract.}
\item{values}{Unused by default (already calculated values of the contract)}
}
\description{
Regular premium contracts are identified by the parameter \code{premiumPeriod > 1}.
}
...@@ -12,8 +12,5 @@ isSinglePremiumContract(params, values) ...@@ -12,8 +12,5 @@ isSinglePremiumContract(params, values)
\item{values}{Unused by default (already calculated values of the contract)} \item{values}{Unused by default (already calculated values of the contract)}
} }
\description{ \description{
The death benefit will be the full sumInsured for the first year after the Single premium contracts are identified by the parameter \code{premiumPeriod = 1}.
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