oasislmf.preparation.reinsurance_layer

Attributes

Functions

create_risk_level_profile_id(ri_df, profile_map_df, ...)

Create new profile id from reinsurance in ri_df corresponding to reins_type.

check_ri_scope_filter(ri_df, risk_level)

get_xref_df(xref_descriptions_df, risk_level)

Build the cross-reference dataframe, which serves as a representation

write_files_for_reinsurance(ri_info_df, ri_scope_df, ...)

Create the Oasis structures - FM Programmes, FM Profiles and FM Policy

Module Contents

oasislmf.preparation.reinsurance_layer.REINS_RISK_LEVEL_XREF_COLUMN_MAP[source]
oasislmf.preparation.reinsurance_layer.XREF_COLUMN_DEFAULT = ['PortNumber', 'AccNumber', 'PolNumber', 'LocNumber'][source]
oasislmf.preparation.reinsurance_layer.RISK_LEVEL_FIELD_MAP[source]
oasislmf.preparation.reinsurance_layer.RISK_LEVEL_ALL_FIELDS = ['PortNumber', 'AccNumber', 'PolNumber', 'LocGroup', 'LocNumber'][source]
oasislmf.preparation.reinsurance_layer.FILTER_LEVEL_EXTRA_FIELDS = ['CedantName', 'ProducerName', 'LOB', 'CountryCode', 'ReinsTag'][source]
oasislmf.preparation.reinsurance_layer.CHECK_RI_SCOPE_MAP[source]
oasislmf.preparation.reinsurance_layer.REINS_TYPE_EXACT_MATCH[source]
oasislmf.preparation.reinsurance_layer.NO_LOSS_PROFILE_ID = 1[source]
oasislmf.preparation.reinsurance_layer.PASSTHROUGH_PROFILE_ID = 2[source]
oasislmf.preparation.reinsurance_layer.NO_LOSS_PROFILE[source]
oasislmf.preparation.reinsurance_layer.PASSTHROUGH_PROFILE[source]
oasislmf.preparation.reinsurance_layer.ITEM_LEVEL_ID = 1[source]
oasislmf.preparation.reinsurance_layer.FILTER_LEVEL_ID = 2[source]
oasislmf.preparation.reinsurance_layer.RISK_LEVEL_ID = 3[source]
oasislmf.preparation.reinsurance_layer.PROGRAM_LEVEL_ID = 4[source]
oasislmf.preparation.reinsurance_layer.FM_TERMS_PER_REINS_TYPE[source]
oasislmf.preparation.reinsurance_layer.create_risk_level_profile_id(ri_df, profile_map_df, fm_profile_df, reins_type, risk_level, fm_level_id, logger)[source]

Create new profile id from reinsurance in ri_df corresponding to reins_type. Add them to fm_profile_df and match the profile_ids in ri_df and profile_map_df Args:

ri_df: ri info and scope profile_map_df: tree structure df representing each ri fm levels fm_profile_df: df containing all the profiles reins_type: type of reinsurance (one of oed.REINS_TYPES) risk_level: level of the reinsurance terms (one of oed.REINS_RISK_LEVELS) fm_level_id: fm level in profile_map_df

Returns:

fm_profile_df: updated version of fm_profile_df

oasislmf.preparation.reinsurance_layer.check_ri_scope_filter(ri_df, risk_level)[source]
oasislmf.preparation.reinsurance_layer.get_xref_df(xref_descriptions_df, risk_level)[source]

Build the cross-reference dataframe, which serves as a representation of the insurance programme depending on the reinsurance risk level. Dataframes for programme, risk, filter and items levels are created. The fields agg_id, level_id and to_agg_id (agg_id_to), which are used to construct the FM Programmes structure, are assigned. The aforementioned dataframes are concatenated to form a single dataframe called xref_df, which is returned. The returned dataframe features the fields necessary for the assignment of profile IDs. Args:

xref_descriptions_df: Fm summary mapping enhanced by relevant information from Loc and Account risk_level: risk_level

Returns:

df_levels: list of dataframes, one per fm level

oasislmf.preparation.reinsurance_layer.write_files_for_reinsurance(ri_info_df, ri_scope_df, xref_descriptions_df, output_dir, fm_xref_fp, logger)[source]

Create the Oasis structures - FM Programmes, FM Profiles and FM Policy TCs - that represent the reinsurance structure.

The cross-reference dataframe, which serves as a representation of the insurance programme depending on the reinsurance risk level, is built. Except facultative contracts, each contract is a separate layer. Profile IDs for the risk and filter levels are created using the merged reinsurance scope and info dataframes. These profile IDs are assigned according to some combination of the fields PortNumber, AccNumber, PolNumber, LocGroup and LocNumber, dependent on reinsurance risk level. Individual programme level profile IDs are assigned for each row of the reinsurance info dataframe. Finally, the Oasis structure is written out.