Skip to content

Banking

Banking realizations shared by the economics packages.

They are the balance sheets of banks.

BalanceSheetElement(label, *, external=0.0, equity=0.0, payment=0.0, status=SOLVENT, size=None)

Bases: Element

Bank of an interbank network.

It holds its external assets, its equity, its payments, and its state of default. The bank is a passive agent that the contagion of the system updates, a solvency cascade through its equity or a clearing of payments through its payment.

Parameters:

Name Type Description Default
label str

The label of the agent or group.

required
external Annotated[object, closed_open(0, oo)]

The external assets.

0.0
equity object

The equity, the assets minus the liabilities.

0.0
payment Annotated[object, closed_open(0, oo)]

The payment the bank makes on its interbank liabilities.

0.0
status Annotated[object, NN]

0 for solvent, 1 for defaulting in this step, and 2 for defaulted.

SOLVENT
size int | None

The number of members, or None for one.

None

Examples:

>>> from skcomplex.systems.economics.finance import BalanceSheetElement
>>> BalanceSheetElement('banks', equity=4.0, size=3).size
3
Source code in src/skcomplex/systems/economics/common/banking/_balance_sheet.py
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
def __init__(
    self,
    label: str,
    *,
    external: Annotated[object, RealSet.closed_open(0, oo)] = 0.0,
    equity: object = 0.0,
    payment: Annotated[object, RealSet.closed_open(0, oo)] = 0.0,
    status: Annotated[object, NN] = SOLVENT,
    size: int | None = None,
) -> None:
    super().__init__(label, size=size)
    self.external = external
    self.equity = equity
    self.payment = payment
    self.status = status