Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Salesforce x Actuarial Mortality Table

License

Sheing/SalesforceActuarial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

SalesforceActuarial

The SalesforceActuarial library contains a simple ActuarialTable class for Mortality calculations leveraging Salesforce's native Custom Object and Fields.


WORK IN PROGRESS


Getting Started:

  1. Create a Custom Object call Mortality_Table__c, with 3 fields:
  • Age__c
  • Death_Probability_Male__c
  • Death_Probability_Female__c
  1. Upload your own Mortality Table to Salesforce through Data Upload Wizard.
  2. Data should consist of Age, Male Mortality, Female Mortality
  3. Map the data to correspond fields mentioned in step 1.
  4. Setup Complete. You should be able to use ActuarialTable library now.

Example:

The present value of a lifetime assurance on a person at age 10, with 2 years waiting period.

ActuarialLifeTable ATB = new ActuarialLifeTable(0.03,'Male');
ActuarialLifeTable.Ax(10,2);
ActuarialLifeTable ATB = new ActuarialLifeTable(0.03,'Female');
ActuarialLifeTable.Axn(25,1,1);

ActuarialTable

Modifier and type Method
static Decimal disc()
static Decimal lx(Integer x)
static Decimal dx(Integer x)
static Decimal qx(Integer x)
static Decimal D_x(Integer x)
static Decimal C_x(Integer x)
static Decimal N_x(Integer x)
static Decimal M_x(Integer x)
static Decimal Ax(integer x, integer f)
static Decimal Axn(integer x,integer n, integer f)
static Decimal Exn(integer x, integer n)
static Decimal AnnDuenx(integer x, integer n, integer k, integer f)
static Decimal AnnDuex(integer x,integer k, integer f)

To-Do

  1. Fix CPU Timeout Limit
  2. Advanced Implementation

About

Salesforce x Actuarial Mortality Table

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages