Interbank Contagion

Interbank Contagion preview image

1 collaborator

Default-person Amy Costa (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.1.0 • Viewed 517 times • Downloaded 46 times • Run 0 times
Download the 'Interbank Contagion' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This is a simple model simulating the interbank lending market, with the attempt to apply Functional Dependency Network Analysis (FDNA) to the system. FDNA is a technique for measuring a supplier-provider network and the effect a degraded node has on the rest of the system. My hope is that this method can be used to study financial contagion.

HOW IT WORKS

At initialization, nodes (turtles, representing banks) are created and they are asked to create directed links to one another. "Money" flows along these links; the links can be thought of as going from borrower to lender. The amount of payment is chosen at random from an exponential distribution. From an FDNA standpoint, BOL (baseline operability level) is defined as a node's ability to make it's debt payments.

In the go procedure, nodes update their variables. New incoming payments are summed together and added to assets. Outgoing payments are then subtracted from this amount. The result is the updated version of assets.

SOD (strength of dependency) refers to the amount of operability a contributor (borrower) node is contributing to a receiver (lender) node's operability. In this model, it is calculated as a proportion of all incoming payments.

If any node does not have enough payments coming in to make its own outgoing payments, it becomes insolvent and drops out of the program. Its borrowers are asked to link to a new node to make their payments.

HOW TO USE IT

"Setup" prepares the model to run, and "go" runs it. The "go" button runs continuously and only stops if you press it again.

Before pressing "setup," choose the number of links you would like each node to make. This changes the density of the network.

There are two monitors to display the number of nodes and the number of links currently left in the program. There is also a plot to better visualize how their numbers are changing over time as defaults occur.

EXTENDING THE MODEL

It would be interesting to add a more complicated financial structure to this model, such as: small businesses and homeowners who also borrow from the banks, insurance companies, hedge funds, etc.

Another improvement would be changing the structure of the network so that, instead of an even distribution of links for all nodes, some nodes are much more extensively linked than others.

NETLOGO FEATURES

Learning about directed links was new to me when coding this model, and they were extremely helpful in getting it to flow smoothly!

RELATED MODELS

I studied both "Virus on a Network" and "Diffusion on a Directed Network" to get ideas for how this model might work and learn the proper code syntax.

CREDITS AND REFERENCES

More information on FDNA can be found in: "Advanced Risk Analysis in Engineering Enterprise Systems" by C. Ariel Pinto and Paul R. Garvey (Boca Raton, FL: Taylor & Francis Group, LLC, 2013). See the chapter "Functional Dependency Network Analysis," pp. 177-256.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

turtles-own [assets pmt BOL]
links-own [SOD]

;;;;;;;;;;;;;;;;;;;
;; INITIAL SETUP ;;
;;;;;;;;;;;;;;;;;;;

to setup
  clear-all
  create-turtles 100 [set color green set shape "circle"]
  layout-circle turtles 15
  MakeLinks
  InitiateVariables
  reset-ticks
end 

to MakeLinks
  ; Asks turtles to create out-links to other turtles.
  ; The number of out-links created is specified by the user.
  ; The direction of the link goes to from borrower to lender.
  ask turtles [
   while [count my-out-links <  number-of-links] [
     create-link-to (one-of other turtles with [not out-link-neighbor? myself])
   ]
  ] 
end 

to InitiateVariables
  ; This sets initial values for pmt, assets, and BOL.
  ask turtles [
   ask in-link-neighbors [
     set pmt random-exponential 100
   ]
   set assets (sum [pmt] of in-link-neighbors)
   set BOL (pmt * count my-out-links)
  ]
end 

;;;;;;;;;;;;;;;;;;;
;; GO PROCEDURES ;;
;;;;;;;;;;;;;;;;;;;

to go
  UpdateVariables
  Fail
  tick
end 

to UpdateVariables
  ask turtles [
    ; If a turtle has any borrowers, it collects their payments,
    ; then adds those payments to its assets, minus what it must pay to another.
    ; If it does not, it simply saves the leftovers from making its own payment.
    ; (Recall that in-link-neighbors are borrowers, out-link-neighbors are lenders.)
    let new-assets (sum [pmt] of in-link-neighbors)
    set assets (assets + new-assets - (pmt * count my-out-links))
      
    ; Updates BOL.
    set BOL (pmt * count my-out-links)
    
    ; Links calculate SOD.
    ask my-in-links [
        ifelse ([new-assets] of end2) != 0 [
          set SOD ([pmt] of end1 / [new-assets] of end2)
        ] [set SOD 0]
  ]
  ]
end 

to Fail
  ; Turtles drop out if they are unable to pay their debts.
  ; Their borrowers are asked to link to another lender.
  ask turtles [
    if (assets - pmt) < 0 [
      ask in-link-neighbors [
        create-link-to (one-of other turtles with [not out-link-neighbor? myself])
        ]
      die
      ]
    ]
end 

There is only one version of this model, created over 10 years ago by Amy Costa.

Attached files

File Type Description Last updated
Interbank Contagion.png preview Preview for 'Interbank Contagion' over 10 years ago, by Amy Costa Download

This model does not have any ancestors.

This model does not have any descendants.