Skip to content

Allow unbounded contract terms: Allow policyPeriod=Inf, add methods InsuranceContract$getCFlength(), $getPolicyTerm() and $getPremiumTerm()

When allowing infinite policy terms, the actual CF vectors need to be cut, typically defined by the maxAge of the mortality table.

So, rather than using params$ContractData$policyPeriod, the new InsuranceContract$getCFlength() method can be used to retrieve the actual (max) length of all cash flow vectors, and getPolicyTerm and getPremiumTerm can be used to get actual lengths for premium and policy terms, bound by the max age constraint. If the contract is not directly available, the contract and tarif objects are now available in the values$ array passed to all functions. -> Lots of small adaptions required all over the package

Internally, this requires some intermediary values to be stored in values$int. Whenever the policyPeriod, premiumPeriod or age or mortality table are updated, a call to private$updateInternalValues() in the InsuranceContract class updates the internal data, too.

Inifinite policy terms allow annuities to be open-ended, so the annuity CF generating functions needed to be updated, too.

Edited by Reinhold Kainhofer