Skip to content

Commit

Permalink
Adding a description to bank_reserves.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackiekazil committed Oct 1, 2018
1 parent f1201ab commit 9a6e781
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/bank_reserves/bank_reserves/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ def get_total_loans(model):


class BankReserves(Model):
"""
This model is a Mesa implementation of the Bank Reserves model from NetLogo. It is a highly abstracted, simplified model of an economy, with only one type of agent and a single bank representing all banks in an economy. People (represented by circles) move randomly within the grid. If two or more people are on the same grid location, there is a 50% chance that they will trade with each other. If they trade, there is an equal chance of giving the other agent $5 or $2. A positive trade balance will be deposited in the bank as savings. If trading results in a negative balance, the agent will try to withdraw from its savings to cover the balance. If it does not have enough savings to cover the negative balance, it will take out a loan from the bank to cover the difference. The bank is required to keep a certain percentage of deposits as reserves and the bank's ability to loan at any given time is a function of the amount of deposits, its reserves, and its current total outstanding loan amount.
"""


# grid height
grid_h = 20
Expand Down

0 comments on commit 9a6e781

Please sign in to comment.