View source: R/exportInsuranceContractExample.R
| exportInsuranceContractExample | R Documentation | 
Export the given contract to excel (full history/timeseries of all cash flows, reserves, premiums, etc.) and to a text file (sample calculation required by the Austrian regulation).
exportInsuranceContractExample( contract, prf = 10, outdir = ".", basename = NULL, extraname = NULL, ... )
| contract | The  | 
| prf | The time of the premium waiver | 
| outdir | The output directory (the file names are not configurable) | 
| basename | The base output filename (sans .xlsx). If missing, a name of the form 2020-08-01_TARIFNAME_EXTRANAME_RZ0.01_x35_YoB1977_LZ45_PrZ20_VS100000 is used. If given, the main contract without modification will be exported to basename.xlsx, while the example with premium waiver will be exported to basename_PremiumWaiver_t10.xlsx and the text file containing the examples required by the LV-VMGV is exported to basename_VmGlg.txt. | 
| extraname | If basename is not given, this allows a suffix to distinguish multiple exports. | 
| ... | Further parameters (passed on to  | 
Three output files are generated:
DATE_TARIFF_Example.xlsx: Full history/timeseries
DATE_TARIFF_Example_PremiumWaiver_t10.xlsx: Full history/timeseries
after a premium waiver at the given time prf
DATE_TARIFF_Examples_VmGlg.txt: Example calculation required for the Austrian regulation (LV-VMGLV)
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: exportInsuranceContractExample(contract, prf = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.