Skip to content

Commit

Permalink
Merge pull request #4 from EconomicSL/master
Browse files Browse the repository at this point in the history
update fork
  • Loading branch information
x0range authored Oct 31, 2017
2 parents 3c1633b + b4efc88 commit be1282f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions insurancefirm.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,12 @@ def ask_reinsurance(self):
nonreinsured = [contract
for contract in self.underwritten_contracts
if contract.reincontract == None]
if len(nonreinsured) > (1 - self.reinsurance_limit)*len(self.underwritten_contracts):

nonreinsured.reverse()

if len(nonreinsured) >= (1 - self.reinsurance_limit)*len(self.underwritten_contracts):
counter = 0
limitrein = 0.1 * len(nonreinsured) # TODO: Use parameter
limitrein = len(nonreinsured) - (1 - self.reinsurance_limit)*len(self.underwritten_contracts)
for contract in nonreinsured:
if counter < limitrein:
risk = {"value": contract.value, "category": contract.category, "owner": self,
Expand Down
2 changes: 1 addition & 1 deletion insurancesimulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, replic_ID=None, override_no_riskmodels=False, simulation_para
"acceptance_threshold_friction": 0.9, \
"initial_agent_cash": 10000, \
"initial_reinagent_cash": 50000, \
"interest_rate": 0.001, \
"interest_rate": 0, \
"reinsurance_limit": 0.1, \
"upper_price_limit": 1.2, \
"lower_price_limit": 0.85, \
Expand Down

0 comments on commit be1282f

Please sign in to comment.