OasisLMF / ReinsuranceTestTool

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

setting net flag to True results in direct losses being run 'net' #82

Closed johcarter closed 5 years ago

johcarter commented 5 years ago

Need to remove the -n flag from the direct insurance loss run (see below in bold) . this flag is only for reinsurance.

Call the manager to run the deterministic loss generation workflow - this will cause the manager to generate all possible levels of losses for the given test case: GUL, IL and RI losses loss_factor = 1.0 net = True

guls, ils, rils = manager().run_deterministic(run_dir, output_dir=run_dir, loss_percentage_of_tiv=loss_factor, net=net)

Generating deterministic ground-up and direct insured losses with command: gultobin -S 1 < /home/jovyan/run_test_dir/guls.csv | fmcalc -p /home/jovyan/run_test_dir -n -a 2 | tee ils.bin | fmtocsv > /home/jovyan/run_test_dir/ils.csv

Generating deterministic RI layer 1 losses with command: gultobin -S 1 < /home/jovyan/run_test_dir/guls.csv | fmcalc -p /home/jovyan/run_test_dir -a 2 | tee ils.bin | fmcalc -p /home/jovyan/run_test_dir/RI_1 -n -a 2 | tee ri1.bin | fmtocsv > /home/jovyan/run_test_dir/ri1.csv

sr-murthy commented 5 years ago

@johcarter This has been done in an MDK branch commit

https://github.com/OasisLMF/OasisLMF/commit/07ec0f27c81cb1132deb9420c7b35b32d04534e8

The RTT notebook call to generate deterministic losses invokes the generate_deterministic_losses method in the manager (oasislmf.manager.OasisManager), and so the fix was made inside that method.