exportInsuranceContract.xlsx: Export an insurance act object tocontract (object of class...

View source: R/exportInsuranceContract_xlsx.R

exportInsuranceContract.xlsxR Documentation

Export an insurance act object tocontract (object of class InsuranceContract) to an Excel file

Description

Export an insurance act object tocontract (object of class InsuranceContract) to an Excel file

Usage

exportInsuranceContract.xlsx(contract, filename)

Arguments

contract

The insurance contract to export

filename

Target Excel filename for export

Details

The function exportInsuranceContract.xlsx exports an object of class InsuranceContract to an Excel file. All basic data, as well as the time series of (absolute and unit) cash flows, reserves, premiums, premium composition and all profit participation scenarios are exported to the file in nicely looking tables.

No new calculations are done in this function. It only prints out the values stored in contract$Values.

Examples

library("MortalityTables")
mortalityTables.load("Austria_Annuities_AVOe2005R")
# A trivial deferred annuity tariff with no costs:
tariff = InsuranceTarif$new(name = "Test Annuity", type = "annuity", tarif = "Annuity 1A",
    mortalityTable = AVOe2005R.unisex, i=0.01)
contract = InsuranceContract$new(
    tariff,
    age = 35, YOB = 1981,
    policyPeriod = 30, premiumPeriod = 15, deferralPeriod = 15,
    sumInsured = 1000,
    contractClosing = as.Date("2016-10-01")
);
## Not run: exportInsuranceContract.xlsx(contract, "Example_annuity_contract.xlsx")

kainhofer/r-life-insurance-contracts documentation built on Sept. 18, 2022, 7:56 p.m.