Fictitious Default Algorithm
The basis of the fictitious default algorithm is as follows. First, determine each bank’s payout, assuming all other banks satisfy their obligations in full. If, under this assumption, all banks are able to satisfy their obligations in full, then terminate the algorithm. If some banks default, re-solve for the clearing (payments) vector, assuming only this first round of defaults occurs. If, under this new clearing vector, the only defaults are those that occurred in that first round, terminate the algorithm. If a second round of defaults occurs, re-solve for a new clearing vector. This process repeats a maximum of n times, since there are n banks in the system (and at most n banks can default), converging in at most n iterations. This description manifests itself in the following pseudocode: