Prophet Modelling Technique (3): Calculation Looping

In our previous post on using enumerations in Prophet, we briefly referenced the concept of calculation looping. That mention sparked a thought—many Prophet users, especially those who work primarily with standard valuation models, may not be entirely familiar with this technique. Yet, calculation looping is a powerful and often underutilized feature that can enhance both model flexibility and efficiency.

In this article, we take a closer look at what calculation looping is, how it works, and why it’s particularly relevant when working with multiple sets of assumptions within a single Prophet run.

What Is Calculation Looping?

Calculation looping is one of several built-in calculation techniques available in Prophet, alongside others such as Rebasing and Dynamic Run. Among these, calculation looping is generally the most straightforward.

Here’s how it works:

  • The number of loops to run is defined using the variable NUM_CLCLOOPS.
  • Within each loop, the loop counter variable, CALC_LOOP, automatically increments from 1 to the defined number of loops.
  • Prophet repeats the model calculations for each loop cycle.
  • If results from earlier loops need to be preserved (rather than overwritten), users can apply the NO_CALC function to store selected values conditionally.

This looping mechanism allows the same Prophet structure to be reused repeatedly, with different sets of inputs or assumptions applied in each loop.

Why Use Calculation Looping?

The key advantage of calculation looping is efficiency. It allows actuaries to reuse the same variables—for premiums, benefits, expenses, lapses, etc.—to perform multiple calculations within a single run.

For example, in models using the Gross Premium Valuation (“GPV”) method, calculation looping enables a streamlined process to calculate:

  • Best Estimate Reserves
  • Statutory Reserves
  • Capital Reserves under RBC

Instead of duplicating entire sets of variables or converting every item into arrays, the model cycles through assumption sets using separate loops. This not only simplifies the model structure but also reduces the potential for inconsistencies.

Benefits Beyond Logic Simplification

Calculation looping is not just about convenience. It also offers technical and operational benefits, including:

  • Improved consistency: Since all calculations are performed using the same logic structure, the risk of mismatched assumptions between reserve bases is significantly reduced.
  • Smaller output files: Unless explicitly configured to retain all results, Prophet stores only the final loop’s output—helping reduce file sizes, especially in large-scale models.

If intermediate results are needed (e.g., for comparison or disclosure), they can be selectively retained using CALC_LOOP and NO_CALC in combination.

Application in RBC2 Reporting

For Prophet users supporting RBC2 reporting in Malaysia, calculation looping can be an especially practical enhancement.

Rather than setting up multiple separate runs to calculate capital requirements for each prescribed stress scenario, actuaries can define these as loops within a single Prophet run. Each calculation looping applies a different set of stressed assumptions—interest rates, lapse, mortality, etc.—under one cohesive run.

Given the volume of scenarios required under RBC2, using loops helps streamline the process, improve control, and reduce model setup time.

Conclusion

Calculation looping is a valuable modelling technique that allows Prophet users to handle multiple assumption sets within a single run—without duplicating variables or runs. For teams managing complex projections, regulatory stress testing, or multiple reserve bases, this approach offers both clarity and efficiency.

If you haven’t yet explored calculation looping in your Prophet models, it may be a good time to revisit how your modelling process is structured. When applied thoughtfully, calculation looping can be a simple yet powerful way to bring structure, flexibility, and control to your actuarial models.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top