OasisLMF / ReinsuranceTestTool

Test tool for new reinsurance functionality.
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Per Risk placed percent being applied in wrong place #51

Closed johcarter closed 5 years ago

johcarter commented 5 years ago

the placement percent should apply at the contract (final) level, not the risk level.

Here is the profile table for loc_PR (to be checked into dev shortly). the 0.8 should be in calcrule 10 not 9.

Also, you only need two rules total for a per risk treaty, not 2 rules per risk (2x4 =8 in this example), because the same rule applies to all risks. in this example, you can eliminate calcrules 5-10 and just use 3 and 4.

profile_id,calcrule_id,deductible1,deductible2,deductible3,attachment,limit,share1,share2,share3 1,14,0,0,0,0,0,0.0,0.0,0.0 2,12,0,0,0,0,0,0.0,0.0,0.0 3,24,0,0,0,5,10,1.0,0.8,1.0 4,23,0,0,0,0,30,0.0,1.0,1.0 5,24,0,0,0,5,10,1.0,0.8,1.0 6,23,0,0,0,0,30,0.0,1.0,1.0 7,24,0,0,0,5,10,1.0,0.8,1.0 8,23,0,0,0,0,30,0.0,1.0,1.0 9,24,0,0,0,5,10,1.0,0.8,1.0 10,23,0,0,0,0,30,0.0,1.0,1.0

johcarter commented 5 years ago

This was produced on stable, but it doesnt run at all on dev. here is the ktools command - appears to be missing RiskLevel in folder name fmcalc -p RI_1 -n -a 2 < ils.bin | tee RI_1.bin | fmtocsv > RI_1.csv Exec time: 0.4185972213745117 Ran 1 inuring layers Losses for: Direct Inuring_priority:1 - Risk_level:LOC

Step # 11 produces error


KeyError Traceback (most recent call last)

in () 1 # Step 11 - view the losses for the first inuring layer. 2 key = 'Inuring priority:1 - Risk level:LOC' ----> 3 net_losses[key] KeyError: 'Inuring priority:1 - Risk level:LOC'
johcarter commented 5 years ago

The percent placed is being applied at the risk level after risk attach and risk limit rather than at the occurrence level like the other treaty types. this is correct according to the guy carpenter worked example. however it is inconsistent.

johcarter commented 5 years ago

We're going to implement percent placed applies after occurrence limit to be in line with OED.

johcarter commented 5 years ago

fixed