Taking too long? Close loading screen.

Goal-Seeking in Prophet

Fundamental Concepts

Notes

  • Goal-seeking cannot be used in conjunction with looped modules.
  •  If you wish to goal seek at a product or fund level, you should use the REPEAT_LEVEL function.

 

Variables used in goal-seeking

Variable Description
SEED_VAL Seed value for first iteration.
PREV_VAL Value for current iteration.
NEXT_VAL Value for next iteration.
IF_CONVERGED If iteration has converged.

 

How to name variables

SEED_VAL* The SEED_VAL* variables can either be time-dependent or non time-dependent. In most circumstances they will be non time-dependent.
PREV_VAL* The PREV_VAL* and NEXT_VAL* variables must always be time-dependent. However, in many circumstances they will be calculated in such a way that they will have the same value for every t.
NEXT_VAL*

In determining if convergence has been achieved or not Prophet uses the value of IF_CONVERGED at the highest value of t calculated. It should be given a formula definition which returns one of the following values:

0 – Convergence has not been achieved – iteration should continue

1 – Convergence has been achieved

2 – Maximum value has been exceeded – iteration should cease

3 – Minimum value has been exceeded – iteration should cease

The goal-seeking will also cease if the maximum number of iterations of 50 is exceeded. You can use the ITERATION function to count the number of iterations performed for each model point.

 

The Iteration Process

The goal-seeking process is applied to each model point in turn. The values used in each loop are those contained in the PREV_VAL* variables.

In the first goal-seeking loop Prophet sets each PREV_VAL* variable equal to the value calculated by the corresponding SEED_VAL* variable. These are the seeds, or starting values, for the iteration process.

Prophet then calculates the values for all the variables in the product. In the first goal-seeking loop it also calculates the NEXT_VAL* variables. These are the values available to be used in the next loop.

If the variable IF_CONVERGED is not set equal to 1, 2 or 3, then the calculations are repeated. This time the PREV_VAL* variables are set equal to the values calculated in the NEXT_VAL* variables in the previous loop.

 

Debugging

Prophet does not normally provide any details of the iteration process. However, during the development of a goal-seeking product you may wish to see how the iteration process progresses towards the goal.

To see details of the iteration process:

  1. Click the File tab and on the Backstage view click Options. The Options dialog box appears.
  2. On the Options dialog box open the Run Log Settings tab.
  3. Click Include Goal Seeking Messages.

Prophet then includes in the run log the values for all the PREV_VAL* and NEXT_VAL* variables for each iteration.

 

Examples

Goal-Seeking for a Target Level of Profitability

Background

Suppose that the allocation rate needs to be determined so as to achieve a discounted profitability at inception of 5% of the annual premium, that is:

START_PVFP_A(1) = ANN_PREM_PP(1) * NO_POLS_IFSM(1) * TARG_PROF_PC/100

where TARG_PROF_PC is given a global or parameter definition and is set to 5.

 

A Simple Approach

The following approach could be used to achieve this:

  • Set SEED_VAL to be the value to be used for the first iteration.

In this example the goal-seeking capability is used solely for product design work so SEED_VAL could be set as a constant value of, say, 100.

  • Set the allocation percentage ALLOC_PC equal to PREV_VAL.

PREV_VAL is the value to be used for the current iteration.

  • For the first iteration PREV_VAL is automatically set equal to SEED_VAL by Prophet. In subsequent iterations it is set equal to the value of NEXT_VAL from the previous iteration. Hence it is this variable which passes the values from one iteration to the next iteration.

Note that PREV_VAL is a core variable. The formula for this variable is automatically replaced during code generation with a special formula which carries out this process. However, to ensure that the correct dependencies view is displayed in Diagram View the following formula is specified for PREV_VAL:

SEED_VAL + NEXT_VAL

  • Use ALLOC_PC for the remainder of the calculations. This is usually only in the formula for UNITALLOC_PC but it could be used elsewhere.
  • Assign a formula to the NEXT_VAL variable that calculates the allocation rate for the next iteration in such a way that the calculations move nearer to the goal. For example:

ALLOC_PC - 100 * TARG_DIFF / (START_PVFP_A(1) - DISC_PREMINA(0))

This formula calculates the amount by which the result of the current iteration differs from the target and applies a factor to convert it into a change in the allocation rate.

  • Assign a formula for IF_CONVERGED such as the following:

IF ABS(TARG_DIFF) < 0.1 THEN
  1
ELSE IF NEXT_VAL > 200 THEN
  2
ELSE IF NEXT_VAL < 0 THEN
  3
ELSE
  0

The condition in the first two lines stops the iteration if the result is within 0.1% of the specified target. The next four lines stop the iteration if the allocation rate exceeds 200% or falls below 0%.

  • TARG_DIFF, the difference between the target and actual profits, is defined as:

START_PVFP_A(1) - TARG_PROF_PC/100 * ANN_PREM_PP(1) * NO_POLS_IFSM(1)

 

A More Sophisticated Approach

The formulas used in the simple approach show how a single set of the iteration variables could be used. In practice it is more common to use more complex formulas so that the iteration process converges faster. The example in this section uses three sets of iteration variables and also allows existing business model points to be included. The allocation rate for existing business is assumed to have already been determined and is specified in the model point file.

The allocation rate variable ALLOC_PC should be given a model point definition. This allows the correct allocation rate to be used for existing business. A value needs to be included in the model point file for the new business model points and this could be set to an arbitrary constant of, say, 100.

  • Set SEED_VAL equal to ALLOC_PC.
  • This is the first value to be used in the iteration process. It will be either the already known value for the existing business or the arbitrary constant of 100 for the new business model points.
  • Use the variable PREV_VAL instead of ALLOC_PC for the remainder of the calculations. This is usually only in the formula for UNIT_ALLOC_PC but it could be used elsewhere.
  • Specify a formula for the variable NEXT_VAL that calculates the allocation rate for the next iteration.
  • This more sophisticated approach will interpolate between the allocation rate and the associated discounted profits from the current and previous iterations to determine the next “guess”.
  • To achieve this two further sets of seed, previous and next variables need to be defined to pass the values from one loop to the next.

SEED_VAL_ALC = 0
PREV_VAL_ALC = SEED_VAL_ALC + NEXT_VAL_ALC
NEXT_VAL_ALC = PREV_VAL
SEED_VAL_DPA = 0
PREV_VAL_DPA = SEED_VAL_DPA + NEXT_VAL_DPA
NEXT_VAL_DPA = START_PVFP_A(1)

  • The seed values for these variables are not significant. The interpolation formula chosen for NEXT_VAL does not use these values in the first iteration and these variables are not used for any other calculations. They are purely used to enable the iteration process to work.
  • Why do we need the extra set of _ALC variables when the SEED_VAL/PREV_VAL/NEXT_VAL set is already passing round the allocation rate? Each set of goal-seeking variables can only pass round one value. In this example we need two values, the allocation rate used in the previous loop (PREV_VAL) and the value calculated in the previous loop to be used in the current loop (NEXT_VAL).
  • This explains the use of PREV_VAL rather than ALLOC_PC in the definition of NEXT_VAL_ALC. ALLOC_PC has been changed to a model point, to allow for existing business, so will remain unchanged in all goal-seeking loops.
  • NEXT_VAL could be defined as follows:

IF DUR_M > 0 OR ABS(TARG_DIFF) < ZERO_TOL_GS THEN
  PREV_VAL
ELSE IF ITERATION = 1 AND TARG_DIFF < O THEN
  PREV_VAL - 0.25
ELSE IF ITERATION = 1 THEN
  PREV_VAL + 0.25
ELSE
  PREV_VAL - (PREV_VAL - PREV_VAL_ALC) * TARG_DIFF / (START_PVFP_A(1) - PREV_VAL_DPA)

where ZERO_TOL_GS is used to specify the accuracy required in the result, for instance a constant of 0.005 to be accurate to within 0.01.

  • Explanation of formula for NEXT_VAL

DUR_M > 0 is used to identify existing business model points. In this case NEXT_VAL is set equal to PREV_VAL and the allocation rate is not changed.

ABS(TARG_DIFF) < ZERO_TOL_GS identifies when the current allocation rate gives the required target within the accuracy specified, so again no change is needed.

  • The next four lines increase or decrease ALLOC_PC by 0.25 depending on whether the discounted profits are too low or too high. This calculation is performed only on the first iteration. The 0.25 is an arbitrary amount. This will provide two values to interpolate between subsequent iterations.
  • For the second and subsequent iterations an interpolation formula is used.
  • In this example the following formula for IF_CONVERGED could be used:

IF DUR_M > 0 OR ABS(TARG_DIFF) < ZERO_TOL_GS THEN
  1
ELSE IF NEXT_VAL > 200 THEN
  2
ELSE IF NEXT_VAL < 0 THEN
  3
ELSE
  0

This definition is very similar to the previous example. The only changes are to the first line. The DUR_M>0 expression ensures existing business model points converge immediately and ZERO_TOL_GS replaces a constant of 0.1. For this example, it may be considered preferable to define a result as acceptable if it is within 0.1% of the target percentage of 5%.

If so, the definitions for TARG_DIFF and ZERO_TOL_GS could be replaced with:

TARG_DIFF = 5 - 100 * START_PVFP_A(1) / (ANN_PREM_PP(1)
* NO_POLS_IFSM(1))
ZERO_TOL_GS = 0.1

 

Real Business Problem

Goal-Seeking for a Target Level of Dividend Rate

Background

Additional dividends are set to completely exhaust policyholder fund at the end of projection term, and then dividend transfers are made on an annual basis to shareholder fund.

 

Steps of Development

1. Policyholder Fund CF after gross up at time t is determined by

  • policyholder fund after gross up at time t-1 (LS_MY_EV_SH_IF_GU(t-1)), plus
  • the net cash flow after gross up during time t (LS_MY_EV_SH_NCF_GU(t))
Variable Definition
LS_MY_EV_ADD_CASH_DIV_OUT_GU IF t < DUR_M THEN
  0
ELSE IF t = DUR_M THEN
  LS_MY_EV_SH_IF(t)
ELSE
  LS_MY_EV_SH_IF_GU(t-1) + LS_MY_EV_SH_NCF_GU(t)

 

2. Shareholder Fund Net Cash Flow after gross up during time t is determined by

  • the statutory profit after gross up at time t (LS_MY_EV_STAT_PROFIT_GU(t)), plus
  • the increment of statutory reserves after gross up at time t (LS_MY_EV_TOT_STAT_RES_INC_GU), minus
  • the dividend transfer to shareholder fund after gross up at time t (LS_MY_EV_DIV_GROSS_TRANSF_SH_GU(t))
Variable Definition
LS_MY_EV_SH_NCF_GU IF t <= DUR_M THEN
  0
ELSE
  LS_MY_EV_STAT_PROFIT_GU(t) + LS_MY_EV_TOT_STAT_RES_INC_GU(t) - LS_MY_EV_DIV_GROSS_TRANSF_SH_GU(t)

 

3. Dividend – Gross Transfer to SH Fund after Gross up at time t is determined by

  • the sum of the total cost of bonus after gross up at time t (LS_MY_EV_DIV_GROSS_TRANSF_SH_GU(t)), and 
  • the additional cash dividend outgo after gross up at time t (LS_MY_EV_ADD_CASH_DIV_OUT_GU(t)), and then times
  • the portion of the amount from dividend account to policyholder account (LS_MY_EV_DA_TO_PH_PC(t))
Variable Definition
LS_MY_EV_DIV_GROSS_TRANSF_SH_GU IF t <= DUR_M OR LS_MY_EV_DIV_GROSS_TRANSF_TYPE = 0 THEN
  0
ELSE IF LS_MY_EV_DIV_GROSS_TRANSF_TYPE = 1 THEN
  IF MOD(t, 12) = 0 THEN
    ; Year End
  IF t = DUR_M + 1 THEN
    IF LS_MY_EV_DIV_TOT_COST_OF_BONUS_GU(t) > 0 THEN
      (LS_MY_EV_DIV_TOT_COST_OF_BONUS_GU(t) + LS_MY_EV_ADD_CASH_DIV_OUT_GU(t)) * LS_MY_EV_DA_TO_PH_PC(t)
    ELSE
      LS_MY_EV_TOT_ASSET_IF_GU(t) - LS_MY_EV_TOT_LIAB_IF_GU(t) - LS_MY_EV_RC_IF_GU(t)
  ELSE
    (LS_MY_EV_DIV_TOT_COST_OF_BONUS_GU(t) + LS_MY_EV_ADD_CASH_DIV_OUT_GU(t)) * LS_MY_EV_DA_TO_PH_PC(t)
  ELSE
    0
ELSE
  0

 

4. the additional cash dividend outgo after gross up at time t is determined by

  • the total cost of bonus after gross up at time t (LS_MY_EV_DIV_GROSS_TRANSF_SH_GU(t)), times 
  • the percentage of additional cash dividend outgo (LS_MY_EV_ADD_CASH_DIV_PC)
Variable Definition
LS_MY_EV_ADD_CASH_DIV_OUT_GU IF t < DUR_M THEN
  0
ELSE
  LS_MY_EV_DIV_TOT_COST_OF_BONUS_GU(t) * LS_MY_EV_ADD_CASH_DIV_PC

 

5.the percentage of additional cash dividend outgo after gross up at time t is set to be the dividend rate adjustment factor (LS_MY_EV_DIV_ADJ)

Variable Definition
LS_MY_EV_ADD_CASH_DIV_PC IF LS_MY_EV_AS_GOAL_SEEK_IND = 0 THEN
  0
ELSE IF LS_MY_EV_AS_GOAL_SEEK_IND = 1 THEN
  LS_MY_EV_DIV_ADJ
ELSE
  0

 

6.the dividend rate adjustment factor is set to be the previous value of dividend adjustment (PREV_VAL_DIVA)

Variable Definition
LS_MY_EV_DIV_ADJ IF LS_MY_EV_AS_GOAL_SEEK_IND = 1 THEN
  PREV_VAL_DIVA
ELSE
  0

 

7. Iteration

TARGET_GS_AMOUNT 0
SEED_VAL_DIV 0
SEED_VAL_DIVA 0
SEED_VAL_AS 0
TARG_DIFF IF LS_MY_EV_AS_GOAL_SEEK_IND = 0 THEN
  0
ELSE
  LS_MY_EV_SH_IF_GU(DUR_M + LS_MY_EV_GOAL_SEEK_TERM_Y * 12) - TARGET_GS_AMOUNT
PREV_VAL_AS SEED_VAL_AS + NEXT_VAL_AS
PREV_VAL_DIV SEED_VAL_DIV + NEXT_VAL_DIV
PREV_VAL_DIVA SEED_VAL_DIVA + NEXT_VAL_DIVA
LS_MY_EV_DIV_ADJ IF LS_MY_EV_AS_GOAL_SEEK_IND = 1 THEN
  PREV_VAL_DIVA
ELSE
  0
NEXT_VAL_AS LS_MY_EV_SH_IF_GU(DUR_M + LS_MY_EV_GOAL_SEEK_TERM_Y * 12)
NEXT_VAL_DIV LS_MY_EV_DIV_ADJ
NEXT_VAL_DIVA IF LS_MY_EV_AS_GOAL_SEEK_IND = 0 OR ABS(TARG_DIFF) < ZERO_TOL_GS THEN
  LS_MY_EV_DIV_ADJ
ELSE IF ITERATION = 1 AND TARG_DIFF < 0 THEN
  LS_MY_EV_DIV_ADJ - 0.005
ELSE IF ITERATION = 1 THEN
  LS_MY_EV_DIV_ADJ + 0.005
ELSE
  LS_MY_EV_DIV_ADJ - (LS_MY_EV_DIV_ADJ - PREV_VAL_DIV) * TARG_DIFF / (LS_MY_EV_SH_IF_GU(DUR_M + LS_MY_EV_GOAL_SEEK_TERM_Y * 12) - PREV_VAL_AS)

 

8. Check the log