Advanced Ratings: Conditional Statements and Functions

From SchemeServe Help
Jump to: navigation, search

Introduction

This area of SchemeServe is more complex than most others. In order for you to make the most out of using our Help Guide for developing your own rates, it would be best if you read all the parts of this guide in order. To help you with this they are listed in numerical order in the “See Also” section of each page. You can click on a link to take you to section 1 and then move through logically at your own pace.

Conditional Expressions

There are several conditional expressions that can be used to generate rating formulae in SchemeServe:


  • MAX([Q1_Cover], [Q2_Cover]) This expression is used to take the maximum value from alternate expressions
  • MIN([Q1_Cover], [Q2_Cover]) This expression is used to take the minimum value from alternate expressions
  • SQRT(Q1_Cover]/2 * [Q2_Cover]^2) This expression provides the square root of the values in the statement
  • CEILING([Q1_Rate]*0.123) – this expression rounds up the value of the statement
  • FLOOR([Q1_Rate]*0.123) – this expression rounds down the value of the statement
  • ROUND([Q1_Rate]*0.123) - this expression rounds the figure to the nearest number specified
  • IF(conditional_expression, value_if_true, value_if_false) – this is a conditional statement


Note: IF statements can be confusing:


IF([Q1_Cover]+[Q2_Cover] >= 1000 AND [Q3_Value] = 'A little bit more', [Q4_Cover] * 0.2, [Q4_Cover])


It is sometimes easier to use the old SchemeServe syntax for this kind of command:


e.g. Answer:Q3,Formula:[Q1_Cover]+[Q2_Cover],SetCover:Q4 Yes,1000-999999,[Q4_Cover] * 0.2

See Also:

  1. Introduction to Rates in SchemeServe
  2. Uploading SchemeServe Rating Files
  3. Downloading SchemeServe Rating Files
  4. Flat Rating: Building Your First SchemeServe Rating File
  5. Conditions for Rating Files
  6. Actions for Rating Files
  7. Rating Modifiers: What they are and when to use them
  8. Multi-Step Ratings: Using Multiple Sections in Rating Files
  9. Advanced Ratings: Using Formulae
  10. Advanced Ratings: Conditional Statements and Functions
  11. Advanced Ratings: Rounding Values
  12. Master Rating: Using Tables and Row Lookup Loops
  13. Example Ratings for Specific Insurance Types (Life and Public Liability)
  14. Mathematical Helper Functions for Ratings Files
  15. Rating Agents: Tips and Tricks