A sample pricing project for level term insurance products.
The objective of this project is to provide an introductory demonstration of actuarial modeling using Rgogo Framework. The project demonstrates a simple pricing exercise for a 20-year level term insurance and a level term to age 65 using Rgogo framework. The intention is to show how Rgogo can help actuaries to build actuarial models easily and quickly.
You must install Rgogo
package and Canadian mortality table package MortTables.CA
before using this sample project. You can download these packages with the following commands if you have not done so:
library(devtools)
install_github(repo = "ActPersp/Rgogo")
install_github(repo = "ActPersp/MortTables.CA")
It is also assumed that you are using RStudio for development environment.
You can make changes to the model by modifying any R script files under "R" folders.
Each R script file under "R" folder represents a model component:
| File Name | Model Component | | --- | --- | | Plan.LT20.R | 20-year level term product features | | Plan.LT65.R | Level term to age 65 product features | | MortAssump.R | Mortality assumption | | LapseAssump.R | Lapse assumption | | IntrAssump.R | Interest rate assumption | | ExpnsAssump.R | Expense assumption | | Model.R| Model for solving premium rates |
Every time you make any change to the above files, you must deploy the project by executing the following commands before running the model.
Rgogo::DeployProject("LTPricing", overwrite = TRUE)
Run the script file Generate_PremTable.R under "batch" folder. The job will calculate premium rates and export the premium tables to an Excel file under "export" folder.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.