oasislmf.pytools.fm.policy_extras ================================= .. py:module:: oasislmf.pytools.fm.policy_extras .. autoapi-nested-parse:: 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 --------- .. autoapisummary:: oasislmf.pytools.fm.policy_extras.min2 oasislmf.pytools.fm.policy_extras.deductible_over_max oasislmf.pytools.fm.policy_extras.deductible_under_min oasislmf.pytools.fm.policy_extras.calcrule_1 oasislmf.pytools.fm.policy_extras.calcrule_2 oasislmf.pytools.fm.policy_extras.calcrule_3 oasislmf.pytools.fm.policy_extras.calcrule_5 oasislmf.pytools.fm.policy_extras.calcrule_7 oasislmf.pytools.fm.policy_extras.calcrule_8 oasislmf.pytools.fm.policy_extras.calcrule_10 oasislmf.pytools.fm.policy_extras.calcrule_11 oasislmf.pytools.fm.policy_extras.calcrule_12 oasislmf.pytools.fm.policy_extras.calcrule_13 oasislmf.pytools.fm.policy_extras.calcrule_14 oasislmf.pytools.fm.policy_extras.calcrule_15 oasislmf.pytools.fm.policy_extras.calcrule_16 oasislmf.pytools.fm.policy_extras.calcrule_17 oasislmf.pytools.fm.policy_extras.calcrule_19 oasislmf.pytools.fm.policy_extras.calcrule_20 oasislmf.pytools.fm.policy_extras.calcrule_22 oasislmf.pytools.fm.policy_extras.calcrule_23 oasislmf.pytools.fm.policy_extras.calcrule_24 oasislmf.pytools.fm.policy_extras.calcrule_25 oasislmf.pytools.fm.policy_extras.calcrule_26 oasislmf.pytools.fm.policy_extras.calcrule_27 oasislmf.pytools.fm.policy_extras.calcrule_28 oasislmf.pytools.fm.policy_extras.calcrule_32 oasislmf.pytools.fm.policy_extras.calcrule_33 oasislmf.pytools.fm.policy_extras.calcrule_34 oasislmf.pytools.fm.policy_extras.calcrule_35 oasislmf.pytools.fm.policy_extras.calcrule_36 oasislmf.pytools.fm.policy_extras.calcrule_37 oasislmf.pytools.fm.policy_extras.calcrule_38 oasislmf.pytools.fm.policy_extras.calcrule_39 oasislmf.pytools.fm.policy_extras.calcrule_40 oasislmf.pytools.fm.policy_extras.calcrule_41 oasislmf.pytools.fm.policy_extras.calc Module Contents --------------- .. py:function:: min2(a, b) .. py:function:: deductible_over_max(i, loss_out, loss_in, deductible, over_limit, under_limit, max_deductible) 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 .. py:function:: deductible_under_min(i, loss_out, loss_in, effective_deductible, over_limit, under_limit, min_deductible, deductible) Deductible is under the minimum, we raise the deductible from over_limit first then loss if over_limit is not enough .. py:function:: calcrule_1(policy, loss_out, loss_in, deductible, over_limit, under_limit) Deductible and limit .. py:function:: calcrule_2(policy, loss_out, loss_in, deductible, over_limit, under_limit) Deductible, attachment, limit and share .. py:function:: calcrule_3(policy, loss_out, loss_in, deductible, over_limit, under_limit) Franchise deductible and limit .. py:function:: calcrule_5(policy, loss_out, loss_in, deductible, over_limit, under_limit) Deductible and limit as a proportion of loss .. py:function:: calcrule_7(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible, minimum and maximum deductible, with limit .. py:function:: calcrule_8(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible and minimum deductible, with limit .. py:function:: calcrule_10(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible and maximum deductible .. py:function:: calcrule_11(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible and minimum deductible .. py:function:: calcrule_12(policy, loss_out, loss_in, deductible, over_limit, under_limit) Deductible only .. py:function:: calcrule_13(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible, minimum and maximum deductible .. py:function:: calcrule_14(policy, loss_out, loss_in, deductible, over_limit, under_limit) Limit only .. py:function:: calcrule_15(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible and limit % loss .. py:function:: calcrule_16(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible % loss .. py:function:: calcrule_17(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible % loss with attachment, limit and share .. py:function:: calcrule_19(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible % loss with min and/or max deductible TODO: check if we can assume 0 <= policy['deductible1'] <= 1 .. py:function:: calcrule_20(policy, loss_out, loss_in, deductible, over_limit, under_limit) reverse franchise deductible .. py:function:: calcrule_22(policy, loss_out, loss_in, deductible, over_limit, under_limit) reinsurance % ceded, limit and % placed .. py:function:: calcrule_23(policy, loss_out, loss_in, deductible, over_limit, under_limit) reinsurance limit and % placed .. py:function:: calcrule_24(policy, loss_out, loss_in, deductible, over_limit, under_limit) reinsurance excess terms .. py:function:: calcrule_25(policy, loss_out, loss_in, deductible, over_limit, under_limit) reinsurance proportional terms .. py:function:: calcrule_26(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible % loss with min and/or max deductible and limit TODO: check if we can assume 0 <= policy['deductible1'] <= 1 .. py:function:: calcrule_27(policy, loss_out, loss_in, deductible, over_limit, under_limit) step payout with limit .. py:function:: calcrule_28(policy, loss_out, loss_in, deductible, over_limit, under_limit) % loss step payout .. py:function:: calcrule_32(policy, loss_out, loss_in, deductible, over_limit, under_limit) monetary amount trigger and % loss step payout with limit .. py:function:: calcrule_33(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible % loss with limit .. py:function:: calcrule_34(policy, loss_out, loss_in, deductible, over_limit, under_limit) 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 .. py:function:: calcrule_35(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible % loss with min and/or max deductible and limit % loss TODO: check if we can assume 0 <= policy['deductible1'] <= 1 .. py:function:: calcrule_36(policy, loss_out, loss_in, deductible, over_limit, under_limit) deductible with min and/or max deductible and limit % loss .. py:function:: calcrule_37(policy, loss_out, loss_in, deductible, over_limit, under_limit) % loss step payout .. py:function:: calcrule_38(policy, loss_out, loss_in, deductible, over_limit, under_limit) conditional coverage .. py:function:: calcrule_39(policy, loss_out, loss_in, deductible, over_limit, under_limit) Franchise deductible .. py:function:: calcrule_40(policy, loss_out, loss_in, deductible, over_limit, under_limit) BI deductible (waiting period) and limit (period of interest) .. py:function:: calcrule_41(policy, loss_out, loss_in, deductible, over_limit, under_limit) No BI deductible (waiting period) and limit only (period of interest) .. py:function:: calc(policy, loss_out, loss_in, deductible, over_limit, under_limit, stepped)