rslc command on your path, and Python with the rslc package.
1. Make a folder
A rater is a folder. It holds the source filerater.rsl and one CSV file per table:
2. Name the filing
Openrater.rsl and write the two header blocks:
specnames the carrier, state, product and effective date of the filing.rsl: "0.4"is the language version line. Copy it as it is.Sourcesnames the filed documents. Heremanualis the rating manual, a PDF. A citation such asmanual:p3points to its page 3.
3. Add the filed numbers
Add the names the manual uses, its one fixed number and its rate table:Perillists the three perils the manual rates.ProtectionClassgroups protection classes into bands: 1 to 3, 4 to 6, 7 to 9, and 10 and up.Moneyis an amount in whole cents.expense_feeis the 35 policy fee from page 9.BaseRateis the table on page 3: one rate per peril for each band.
4. Write the rate table
Write the table’s rows intables/BaseRate.csv:
protection cell names a band by its first class. Check the rater so far:
5. Describe the policy and the math
Add the records, which describe the policy, and the outcome, which names the premium:- A policy has one dwelling and up to ten scheduled items. These are the inputs: the facts a request sends.
- Each
whereline is a rule on an input. A rule with acodeis a rule from the manual. peril_premium[p: Peril]holds one premium per peril.lookup!reads the rate table.round(x, 0, half_up)rounds to whole dollars, half up.RatingOutcomespublishesPolicy.premiumas the rater’s premium.
6. Check
Check the rater:PASS means each request that passes the rules gets a premium. The cost line counts the steps of
work for one premium: 12, plus 2 per item.
Check the layout too:
7. Package
Export the rater as a bundle, a zip file that holds everything needed to rate. Unpack it:8. Price a policy
Price a 250,000 dwelling in protection class 5 with two scheduled items. Load thebundle folder you unpacked in the preceding step, from the same dwelling working directory:
detailed=True:
Now send a protection class of 11:
Next steps
- RSL at a glance shows every part of the language.
- What rslc checks and guarantees explains
PASSand refusals. - Use the rslc commands covers each command in depth.