Skip to content

Prophet Best Practice

There are several ways to improve the model efficiency and utilize the functions in Prophet.

  1. Always prepare descriptions seriously. Descriptions can help others to understand the model easily and clearly.
    • Tables description
    • Product description
    • Accumulation description
    • Variable description
    • Run number description
    • SPCODE description
  2. Use “Actuarial Documentation” function for documentation.
  3. Employ “Same as” if possible. Employ “Same as” if new product features are similar to existing products. “Same as” products do not have separate codes and thus can reduce maintenance efforts.
    • If all features are same between two products except of parameters, we can use “same as”.
    • If only minor feature is different between two products, we can still employ “same as” products by utilizing “IF PROD_NAME = product_1 THEN *** ELSE ***” statement to differentiate between two products. Or create indicator variable to differentiate. For example, IF DTH_BEN_IND = 1 THEN *** ELSE ***.
  4. Assumptions tables should be organized easily understood. Most of assumptions can be classified into the following types:
    • Expense assumption
    • Lapse assumpton
    • Mortality assumption
    • Investment return assumption

    The relevant parameters are recommended to be placed in appropriate tables with easily undestood names.

  5. Generic tables: this table format is used when the value or values required for a variable in any of your products depend on the values of between two and ten index variables.
  6. Global table: contains values for variables that have the same value across all products for any run number. For example, sensitivity factors for expense, lapse, mortality, investment return assumptions, and the renewal expense inflation rate. This type of assumption would not normally vary by product.
  7. Parameter table: contains values for variables that have the same value across all model points for any product. For example, SURR_INT_PC, VAL_INT_PC, SM_SAR_PC, SM_RES_PC, etc. This type of assumption normally varies from product to product but is the same for every model point within a product.
  8. Avoid huge assumption tables. The size of assumption table will significantly impoact run time. It is suggested to split the table into several small tables if it is too big. For example, a table with more than 5000 rows and 5 index variables.
  9. Use Excel VBA for table generation. It is suggested to record tables in Excel format. It is easier to trace the assumption changes in Excel. VBA program can help to generate Prophet tables from Excel spreadsheets.
  10. Avoid reading table if unnecessary. Reading table is time consuming than normal calculation. It is the best practice to avoid reading table if unnecessary. For example:
    • UFII_PC, Original Formula Definition
      IF t= 0 THEN
         0
      ELSE
         READ_GENERIC_TABLE(“Inv_rate”,”Y”,”PROD_NAME”,MIN(POLICY_YEAR,10))
    • A better code following the best practice:
      IF t = 0 THEN
         0
      ELSE IF mult(t-1, 12) AND POLICY_YEAR <= MAX_INVRATE_YR THEN
         READ_GENERIC_TABLE(“Inv_rate”,”Y”,”PROD_NAME”,POLICY_YEAR
      ELSE
         UFII_PC(t-1)
  11. Avoid reading table for factors. It is suggested to calculate reserve factors, surrender value factors in first principle rather than reading from table.
  12. Avoid referring inappropriate variables. Normally, there are three lines of calculation in liability products.
    • Pricing / surrender line: variables of this line are used for premium, surrender value calculation. More variables contain text “SURR”. For examples, SURR_INT_PC, SURR_VAL_PP, Q_SURR_PN, SURR_NETPPREM.
    • Reserving line: variables of this line are used for reserve calculation. Most variables contain text “VAL”. For examples, VAL_INT_PC, Q_VAL_PN, VAL_ANN_PREM.
    • Best estimate line: variables of this line are used for cash flow, P&L projection. For examples, Q_EXP_PN, DEATH_OUTGO, GROSS_PROFIT.
  13. Avoid unnecessary complex calculations. For example, premium rate or beta for reserve calculation. The calculation is only needed at time 0. Other time points could just equal to premium rate and beta at time 0.
  14. Avoid hard coding. All assumptions and parameters should be stored in tables rather than hard coding. Use the table driven parameters rather than hard coding. For examples,
    • UFII_PC: Constant Definition. Constant: 5.0. Change to read global table.
    • DEATH_BEN_PP: IF PROD_NAME = product_1 THEN *** ELSE ***. Change to IF DTH_BEN_IND = 1 THEN *** ELSE ***. Add variable DTH_BEN_IND as read parameter table.
  15. Create new variable by duplicating existing. It is safe to create a new variable in libraries by copying an existing one with similar features, rather than creating a new one from the scratch.
    • Follow naming convention. For example, we want to create a new variable SB_OUTGO for survival benefit. We can copy DEATH_OUTGO and change its name and property accordingly.
    • Set the new variable properties carefully and correctly: Accounting Type: Revenue Account or Balance Sheet, Cumulative or not, Variable Code.
  16. Use new indicator for new variables. Create a set of company / product specific indicators for new variables and definitions. Keep the standard definition unchanged. For example, create ING_WL for the ING whole life products.
  17. Try not to use complex functions. Some complex calculation is time consuming. Such as exponential calculation which is powered by t. For example: X(t) = V ^ (t/12) can be changed to Y = V ^ (1/12), X(t) = X(t-1) * Y.
  18. Always add comments for complex or special code in the customized variable formula. For example, REBASE_MTH:
  19. Create an array variable for a group of same calculations. Use array variables rather than create a lot of variables for same calculations. For example:

  20. Run single model point before final run. If there are a large amount of model points, it is a good practice to run the first model point to test the code and table setting ebfore final run.
  21. Employ Accumulation and Summary products. Usder a good model management prcess, the calculation in model is more systematically controlled than in Excel. Try to reduce the calculations in Excel. It can reduce the mistakes caused by manual work. Accumulation and Summary product are useful to aggregate results. Summary product can be used to do company level adjustment.