@@ -276,6 +276,7 @@ def iterate(self, t):
276
276
# adjust market premiums
277
277
sum_capital = sum ([agent .get_cash () for agent in self .insurancefirms ]) #TODO: include reinsurancefirms
278
278
self .adjust_market_premium (capital = sum_capital )
279
+ sum_capital = sum ([agent .get_cash () for agent in self .reinsurancefirms ]) # TODO: include reinsurancefirms
279
280
self .adjust_reinsurance_market_premium (capital = sum_capital )
280
281
281
282
# pay obligations
@@ -397,6 +398,7 @@ def save_data(self):
397
398
current_log ['market_premium' ] = self .market_premium
398
399
current_log ['market_reinpremium' ] = self .reinsurance_market_premium
399
400
current_log ['cumulative_bankruptcies' ] = self .cumulative_bankruptcies
401
+ current_log ['cumulative_market_exits' ] = self .cumulative_market_exits
400
402
current_log ['cumulative_unrecovered_claims' ] = self .cumulative_unrecovered_claims
401
403
current_log ['cumulative_claims' ] = self .cumulative_claims #Log the cumulative claims received so far.
402
404
@@ -526,16 +528,47 @@ def shuffle_risks(self):
526
528
np .random .shuffle (self .risks )
527
529
528
530
def adjust_market_premium (self , capital ):
529
- self .market_premium = self .norm_premium * (self .simulation_parameters ["upper_price_limit" ] - capital / (self .simulation_parameters ["initial_agent_cash" ] * self .damage_distribution .mean () * self .simulation_parameters ["no_risks" ]))
531
+ """Adjust_market_premium Method.
532
+ Accepts arguments
533
+ capital: Type float. The total capital (cash) available in the insurance market (insurance only).
534
+ No return value.
535
+ This method adjusts the premium charged by insurance firms for the risks covered. The premium reduces linearly
536
+ with the capital available in the insurance market and viceversa. The premium reduces until it reaches a minimum
537
+ below which no insurer is willing to reduce further the price. This method is only called in the self.iterate()
538
+ method of this class."""
539
+ self .market_premium = self .norm_premium * (self .simulation_parameters ["upper_price_limit" ] - self .simulation_parameters ["premium_sensitivity" ] * capital / (self .simulation_parameters ["initial_agent_cash" ] * self .damage_distribution .mean () * self .simulation_parameters ["no_risks" ]))
530
540
if self .market_premium < self .norm_premium * self .simulation_parameters ["lower_price_limit" ]:
531
541
self .market_premium = self .norm_premium * self .simulation_parameters ["lower_price_limit" ]
532
542
533
543
def adjust_reinsurance_market_premium (self , capital ):
534
- self .reinsurance_market_premium = self .market_premium
544
+ """Adjust_market_premium Method.
545
+ Accepts arguments
546
+ capital: Type float. The total capital (cash) available in the reinsurance market (reinsurance only).
547
+ No return value.
548
+ This method adjusts the premium charged by reinsurance firms for the risks covered. The premium reduces linearly
549
+ with the capital available in the reinsurance market and viceversa. The premium reduces until it reaches a minimum
550
+ below which no reinsurer is willing to reduce further the price. This method is only called in the self.iterate()
551
+ method of this class."""
552
+ self .reinsurance_market_premium = self .norm_premium * (self .simulation_parameters ["upper_price_limit" ] - self .simulation_parameters ["reinpremium_sensitivity" ] * capital / (self .simulation_parameters ["initial_agent_cash" ] * self .damage_distribution .mean () * self .simulation_parameters ["no_risks" ]))
553
+ if self .reinsurance_market_premium < self .norm_premium * self .simulation_parameters ["lower_price_limit" ]:
554
+ self .reinsurance_market_premium = self .norm_premium * self .simulation_parameters ["lower_price_limit" ]
535
555
536
556
def get_market_premium (self ):
557
+ """Get_market_premium Method.
558
+ Accepts no arguments.
559
+ Returns:
560
+ self.market_premium: Type float. The current insurance market premium.
561
+ This method returns the current insurance market premium."""
537
562
return self .market_premium
538
563
564
+ def get_market_reinpremium (self ):
565
+ """Get_market_reinpremium Method.
566
+ Accepts no arguments.
567
+ Returns:
568
+ self.reinsurance_market_premium: Type float. The current reinsurance market premium.
569
+ This method returns the current reinsurance market premium."""
570
+ return self .reinsurance_market_premium
571
+
539
572
def get_reinsurance_premium (self , np_reinsurance_deductible_fraction ):
540
573
# TODO: cut this out of the insurance market premium -> OBSOLETE??
541
574
# TODO: make premiums dependend on the deductible per value (np_reinsurance_deductible_fraction) -> DONE.
@@ -682,15 +715,15 @@ def insurance_firm_market_entry(self, prob=-1, agent_type="InsuranceFirm"):
682
715
683
716
def record_bankruptcy (self ):
684
717
"""Record_bankruptcy Method.
685
- Accepts no arguments:
718
+ Accepts no arguments.
686
719
No return value.
687
720
This method is called when a firm files for bankruptcy. It is only called from the method dissolve() from the
688
721
class metainsuranceorg.py after the dissolution of the firm."""
689
722
self .cumulative_bankruptcies += 1
690
723
691
724
def record_market_exit (self ):
692
725
"""Record_market_exit Method.
693
- Accepts no arguments:
726
+ Accepts no arguments.
694
727
No return value.
695
728
This method is used to record the firms that leave the market due to underperforming conditions. It is only called
696
729
from the method dissolve() from the class metainsuranceorg.py after the dissolution of the firm."""
@@ -787,7 +820,7 @@ def reinsurance_capital_entry(self): #This method determines the capital mar
787
820
788
821
def reset_pls (self ):
789
822
"""Reset_pls Method.
790
- Accepts no arguments:
823
+ Accepts no arguments.
791
824
No return value.
792
825
This method reset all the profits and losses of all insurance firms, reinsurance firms and catbonds."""
793
826
for insurancefirm in self .insurancefirms :
0 commit comments