oasislmf.pytools.fm.policy_extras

TODO: should I check values are valid in the financial structure percentage not between 0 and 1 (ex: deductible, limit …) TODO: validate max and min ded implementation TODO: It seems that if a policy with share is used, subsequent policy using min or max deductible will be wrong

so it make no sense to compute deductible, over_limit, under_limit

Functions

min2(a, b)

deductible_over_max(i, loss_out, loss_in, deductible, ...)

deductible is over maximum deductible, we reduce the loss, therefore increase the loss up to under_limit

deductible_under_min(i, loss_out, loss_in, ...)

Deductible is under the minimum, we raise the deductible from over_limit first then loss if over_limit is not enough

calcrule_1(policy, loss_out, loss_in, deductible, ...)

Deductible and limit

calcrule_2(policy, loss_out, loss_in, deductible, ...)

Deductible, attachment, limit and share

calcrule_3(policy, loss_out, loss_in, deductible, ...)

Franchise deductible and limit

calcrule_5(policy, loss_out, loss_in, deductible, ...)

Deductible and limit as a proportion of loss

calcrule_7(policy, loss_out, loss_in, deductible, ...)

deductible, minimum and maximum deductible, with limit

calcrule_8(policy, loss_out, loss_in, deductible, ...)

deductible and minimum deductible, with limit

calcrule_10(policy, loss_out, loss_in, deductible, ...)

deductible and maximum deductible

calcrule_11(policy, loss_out, loss_in, deductible, ...)

deductible and minimum deductible

calcrule_12(policy, loss_out, loss_in, deductible, ...)

Deductible only

calcrule_13(policy, loss_out, loss_in, deductible, ...)

deductible, minimum and maximum deductible

calcrule_14(policy, loss_out, loss_in, deductible, ...)

Limit only

calcrule_15(policy, loss_out, loss_in, deductible, ...)

deductible and limit % loss

calcrule_16(policy, loss_out, loss_in, deductible, ...)

deductible % loss

calcrule_17(policy, loss_out, loss_in, deductible, ...)

deductible % loss with attachment, limit and share

calcrule_19(policy, loss_out, loss_in, deductible, ...)

deductible % loss with min and/or max deductible

calcrule_20(policy, loss_out, loss_in, deductible, ...)

reverse franchise deductible

calcrule_22(policy, loss_out, loss_in, deductible, ...)

reinsurance % ceded, limit and % placed

calcrule_23(policy, loss_out, loss_in, deductible, ...)

reinsurance limit and % placed

calcrule_24(policy, loss_out, loss_in, deductible, ...)

reinsurance excess terms

calcrule_25(policy, loss_out, loss_in, deductible, ...)

reinsurance proportional terms

calcrule_26(policy, loss_out, loss_in, deductible, ...)

deductible % loss with min and/or max deductible and limit

calcrule_27(policy, loss_out, loss_in, deductible, ...)

step payout with limit

calcrule_28(policy, loss_out, loss_in, deductible, ...)

% loss step payout

calcrule_32(policy, loss_out, loss_in, deductible, ...)

monetary amount trigger and % loss step payout with limit

calcrule_33(policy, loss_out, loss_in, deductible, ...)

deductible % loss with limit

calcrule_34(policy, loss_out, loss_in, deductible, ...)

deductible with attachment and share

calcrule_35(policy, loss_out, loss_in, deductible, ...)

deductible % loss with min and/or max deductible and limit % loss

calcrule_36(policy, loss_out, loss_in, deductible, ...)

deductible with min and/or max deductible and limit % loss

calcrule_37(policy, loss_out, loss_in, deductible, ...)

% loss step payout

calcrule_38(policy, loss_out, loss_in, deductible, ...)

conditional coverage

calcrule_39(policy, loss_out, loss_in, deductible, ...)

Franchise deductible

calc(policy, loss_out, loss_in, deductible, ...)

Module Contents

oasislmf.pytools.fm.policy_extras.min2(a, b)[source]
oasislmf.pytools.fm.policy_extras.deductible_over_max(i, loss_out, loss_in, deductible, over_limit, under_limit, max_deductible)[source]

deductible is over maximum deductible, we reduce the loss, therefore increase the loss up to under_limit

under limit is always the minimum between the limit - loss and the sub_node under_limit + the applied deductible so we are sure that if deductible[i] > max_ded_left, we are sure that under_limit is the good cap we are sure that is there is no sub node with limit loss_delta < under_limit

loss delta can be negative so in this case we have to be careful it is not bigger than loss_in

oasislmf.pytools.fm.policy_extras.deductible_under_min(i, loss_out, loss_in, effective_deductible, over_limit, under_limit, min_deductible, deductible)[source]

Deductible is under the minimum, we raise the deductible from over_limit first then loss if over_limit is not enough

oasislmf.pytools.fm.policy_extras.calcrule_1(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

Deductible and limit

oasislmf.pytools.fm.policy_extras.calcrule_2(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

Deductible, attachment, limit and share

oasislmf.pytools.fm.policy_extras.calcrule_3(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

Franchise deductible and limit

oasislmf.pytools.fm.policy_extras.calcrule_5(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

Deductible and limit as a proportion of loss

oasislmf.pytools.fm.policy_extras.calcrule_7(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible, minimum and maximum deductible, with limit

oasislmf.pytools.fm.policy_extras.calcrule_8(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible and minimum deductible, with limit

oasislmf.pytools.fm.policy_extras.calcrule_10(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible and maximum deductible

oasislmf.pytools.fm.policy_extras.calcrule_11(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible and minimum deductible

oasislmf.pytools.fm.policy_extras.calcrule_12(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

Deductible only

oasislmf.pytools.fm.policy_extras.calcrule_13(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible, minimum and maximum deductible

oasislmf.pytools.fm.policy_extras.calcrule_14(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

Limit only

oasislmf.pytools.fm.policy_extras.calcrule_15(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible and limit % loss

oasislmf.pytools.fm.policy_extras.calcrule_16(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible % loss

oasislmf.pytools.fm.policy_extras.calcrule_17(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible % loss with attachment, limit and share

oasislmf.pytools.fm.policy_extras.calcrule_19(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible % loss with min and/or max deductible

TODO: check if we can assume 0 <= policy[‘deductible_1’] <= 1

oasislmf.pytools.fm.policy_extras.calcrule_20(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

reverse franchise deductible

oasislmf.pytools.fm.policy_extras.calcrule_22(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

reinsurance % ceded, limit and % placed

oasislmf.pytools.fm.policy_extras.calcrule_23(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

reinsurance limit and % placed

oasislmf.pytools.fm.policy_extras.calcrule_24(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

reinsurance excess terms

oasislmf.pytools.fm.policy_extras.calcrule_25(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

reinsurance proportional terms

oasislmf.pytools.fm.policy_extras.calcrule_26(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible % loss with min and/or max deductible and limit

TODO: check if we can assume 0 <= policy[‘deductible_1’] <= 1

oasislmf.pytools.fm.policy_extras.calcrule_27(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

step payout with limit

oasislmf.pytools.fm.policy_extras.calcrule_28(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

% loss step payout

oasislmf.pytools.fm.policy_extras.calcrule_32(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

monetary amount trigger and % loss step payout with limit

oasislmf.pytools.fm.policy_extras.calcrule_33(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible % loss with limit

oasislmf.pytools.fm.policy_extras.calcrule_34(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible with attachment and share

TODO: compare to the cpp, as there is shares, deductible won’t be use later on so no need to compute it

oasislmf.pytools.fm.policy_extras.calcrule_35(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible % loss with min and/or max deductible and limit % loss

TODO: check if we can assume 0 <= policy[‘deductible_1’] <= 1

oasislmf.pytools.fm.policy_extras.calcrule_36(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

deductible with min and/or max deductible and limit % loss

oasislmf.pytools.fm.policy_extras.calcrule_37(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

% loss step payout

oasislmf.pytools.fm.policy_extras.calcrule_38(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

conditional coverage

oasislmf.pytools.fm.policy_extras.calcrule_39(policy, loss_out, loss_in, deductible, over_limit, under_limit)[source]

Franchise deductible

oasislmf.pytools.fm.policy_extras.calc(policy, loss_out, loss_in, deductible, over_limit, under_limit, stepped)[source]