In 1999 Craig Furfine published the article “Interbank exposures: quantifying the risk of contagion” (BIS Working paper, No. 70) where he for the first time used data on individual payments settled in the interbank payment system to construct a time series of the unsecured overnight loan market. The methodology has since been duplicated by numerous studies (see e.g. Bech and Atalay (2008), Bech and Rørdam (2008), Iori et al. (2008), Wetherilt et al (2009) under “Links to research“) and is informally referred to as the “Furfine algorithmâ€. Loan data of this granularity is generally not available from other sources and the data sets generated with this algorithm can be used to e.g. analyze the topology and contagion in interbank markets. Also the recent crisis has made this type of data more desirable for financial stability and macroprudential supervision purposes (see earlier post).
At its simplest, the algorithm looks for two payments: first a payment of value v from bank A to bank B on day t, and second, a payment of value v + interest on day t+1 from bank B to bank A. As the interest rate may be unknown and due to the fact that some systems have hundreds of thousands of payments per day, random matches are also possible. To reduce such errors, a number of additional criteria can be used. The following small software application can be used to match trades of any length. The program has many additional filtering criteria that can be used.

Read the rest of the entry for instructions on downloading and using this application. You are welcome to get in touch with me for any questions.
Parameters
‘Payments file (Pass 1 input)’: location of the file with payment data. Fields must be in order: id, date, time, value, sender, receiver, [priority: optional]. The date format is defined below. The value field must be numeric and the sender and receiver fields must be integers. A line starting with # is considered a comment line. Empty lines are ignored.
‘Pass 2 input’: this file contains the trades identified by Pass 1 (see below), and is input for Pass 2.
‘Pass 3 input’: this file contains the trades identified by Pass 2 (see below), asn is input for Pass 3.
‘Run ID’: This run identifier is appended to result file names.
‘Define reference rates’: option to use reference rates (e.g. deposit rate or interbank rate). The algorithm will then search for trades that are within the given bounds (lower and upper) from this reference rate.
‘Rates file’: File for reference rates. Format: date, rate. (E.g. “1/1/2009, 5%”). A line starting with # is considered a comment line. Empty lines are ignored.
‘Date format’: date format in both Payments and Rates files, see possible formats.
‘Field separator’: field separator used in Payments and Rates files, usually “;” or “,”
‘Decimal separator’: decimal separator used in Payments and Rates files, usually ”,” or “.”
‘Maximum duration’: the maximum length of overnight loans searched for. It is usually best to start with short durations and go for longer ones after shorter ones are established. For overnight loans, set to 1.
‘Trade value tick’: the “denomination” at which trades are made. Looks for round numbers such as 1.000 or 10.000 (only trades fully divisible by 1.000 or 10.000 are eligible)
‘Rate lower margin’: the margin setting together with the interest rate in the “Rates file” the lower bound for interest rates allowed, i.e. lower bound=’Daily interest rate in Rates file’ – ‘Rate lower margin’
‘Rate upper margin’: the margin setting together with the interest rate in the “Rates file” the upper bound for interest rates allowed, i.e. upper bound=’Daily interest rate in Rates file’ + ‘Rate upper margin’
‘Rate tick’: interest rates on overnight and term loans are often agreed in round numbers, e.g. 4.0% or 4.25%. This parameter filters out other possible trades. The unit is in basis points (100bp=1%).
‘Rate tick margin’: due to rounding errors the rate ticks are not always exactly as the Rate tick parameter would prescribe. This parameter allows you to set a tolerance around the rate tick. For example a tolerance of 1 would consider anything between 3.99% and 4.01% to be within the rate of 4.0%. The unit is in basis points (100bp=1%).
Operation
The applications looks for trades in three ‘passes’.
Pass 1 is a rough rule that identifies possible trade candidates which fulfill the following criteria:
- ’sender of advance’ = ‘receiver of return’ (advance is the payment made to deliver the loan to the borrower, and return is its repayment back to the lender)
- ‘date of return’ > ‘date of advance’
- ‘date of return’ <= ‘date of advance’ + ‘maximum duration’
- ‘value of return’ > ‘value of advance
- (’value of return’ / ‘value of advance’ – 1) * 365 / days <= ‘max rate’
- ‘value of advance’ is a round number as specified by value tick
Pass 2 filters the “candidates” according to the following criteria:
- Calculate ‘interest rate’s for possible trades in 1: ‘duration’ = ‘date of return’ – ‘date of advance’, ‘rate’ = ((1-’value of return’/'value of advance’)*365)/’duration’
- Calculate ‘lower bound’ and ‘upper bound’ for acceptable interest rates: ‘lower bound’ = ‘deposit rate’ – ‘Rate lower margin’, ‘upper bound’ = ‘deposit rate’ + ‘Rate upper margin’
- Select payments where: ‘interest rate’ is between ‘lower bound’ and ‘upper bound’ and ‘interest rate’ is with given ‘rate tick margin’ around the ‘rate tick’
Pass 3 selects the most likely loan from the possible ‘matches’ above by the following rules.
- In case multiple matches (1-many, many-1, many-many) select trade that has an interest rate closest to base rate on the date of the first leg. The rate is rounded to the closest rate tick before making this comparison.
- If the interest rate is the same for many trades then among these: in case 1-many relationship (1 advance is matched with many returns or vice versa), match latest advance and earliest repayment. In case many-many relationship, order advances and repayments and match them in order. Say there are M advances and N repayments. If M>N, then discard the (M-N) earliest advances. If M<N, then discard the (N-M) latest repayments. We now have equal-sized sets of advances and repayments. Match the payments in time order e.g. the earliest advance goes with the earliest repayment, the second goes with the second etc.
Output
The application creates three files (pass1_[run id], pass2_[run id], and pass3_[run id]) at selected locations:
- ‘advance_date’: date of advance (first leg)
- ‘return_date’: date of return (second leg)
- ’sender’: sender of advance / receiver of return
- ‘receiver’: receiver of advance / sender of return
- ‘advance_value’: value of advance payment
- ‘return_value’: value of return payment (advance value + interest)
- ‘advance_id’: id of payment (in input data) matched as an advance
- ‘return_id’: id of payment (in input data) matched as a return
- ‘advance_time’: time advance was made
- ‘return_time’: time return was made
- ‘loan term’: term of loan in calendar days
- ‘loan_term_business_days’: term loan in business days (e.g. Friday->Monday equals 1 -Â a business day is defined as a day with at least one payment made)
- ‘rate’: interest rate in % (e.g. 4 equals 4%). This field is reported for Pass 2 and 3 only.
Download, installation and running
Simply copy and extract this Furfine-algorithm application to a folder that you create for it. Double click run.bat to launch the application. You need to have JRE1.5 installed (usually you do have it already). The package contains a file test-payments.txt and test-rates.txt files (in the /data folder) and an test-parameters.txt file that uses them. You can load that parameter file into the application and test the example data. It identifies one trade (in Pass 3) from the payments in the example.
Credits & Usage
I would like to thank Peter Zimmerman, Casper Chistophersen and Balázs Gődény for their contributions to this application.
You are free to use the program for any purpose. The .zip file contains the source code as well. Please make a reference to this blog entry in case you use the application for any written works.
Software for identifying interbank loans from payment data
In 1999 Craig Furfine published the article “Interbank exposures: quantifying the risk of contagion” (BIS Working paper, No. 70) where he for the first time used data on individual payments settled in the interbank payment system to construct a time series of the unsecured overnight loan market. The methodology has since been duplicated by numerous studies (see e.g. Bech and Atalay (2008), Bech and Rørdam (2008), Iori et al. (2008), Wetherilt et al (2009) under “Links to research“) and is informally referred to as the “Furfine algorithmâ€. Loan data of this granularity is generally not available from other sources and the data sets generated with this algorithm can be used to e.g. analyze the topology and contagion in interbank markets. Also the recent crisis has made this type of data more desirable for financial stability and macroprudential supervision purposes (see earlier post).
At its simplest, the algorithm looks for two payments: first a payment of value v from bank A to bank B on day t, and second, a payment of value v + interest on day t+1 from bank B to bank A. As the interest rate may be unknown and due to the fact that some systems have hundreds of thousands of payments per day, random matches are also possible. To reduce such errors, a number of additional criteria can be used. The following small software application can be used to match trades of any length. The program has many additional filtering criteria that can be used.
Read the rest of the entry for instructions on downloading and using this application. You are welcome to get in touch with me for any questions.
Parameters
‘Payments file (Pass 1 input)’: location of the file with payment data. Fields must be in order: id, date, time, value, sender, receiver, [priority: optional]. The date format is defined below. The value field must be numeric and the sender and receiver fields must be integers. A line starting with # is considered a comment line. Empty lines are ignored.
‘Pass 2 input’: this file contains the trades identified by Pass 1 (see below), and is input for Pass 2.
‘Pass 3 input’: this file contains the trades identified by Pass 2 (see below), asn is input for Pass 3.
‘Run ID’: This run identifier is appended to result file names.
‘Define reference rates’: option to use reference rates (e.g. deposit rate or interbank rate). The algorithm will then search for trades that are within the given bounds (lower and upper) from this reference rate.
‘Rates file’: File for reference rates. Format: date, rate. (E.g. “1/1/2009, 5%”). A line starting with # is considered a comment line. Empty lines are ignored.
‘Date format’: date format in both Payments and Rates files, see possible formats.
‘Field separator’: field separator used in Payments and Rates files, usually “;” or “,”
‘Decimal separator’: decimal separator used in Payments and Rates files, usually ”,” or “.”
‘Maximum duration’: the maximum length of overnight loans searched for. It is usually best to start with short durations and go for longer ones after shorter ones are established. For overnight loans, set to 1.
‘Trade value tick’: the “denomination” at which trades are made. Looks for round numbers such as 1.000 or 10.000 (only trades fully divisible by 1.000 or 10.000 are eligible)
‘Rate lower margin’: the margin setting together with the interest rate in the “Rates file” the lower bound for interest rates allowed, i.e. lower bound=’Daily interest rate in Rates file’ – ‘Rate lower margin’
‘Rate upper margin’: the margin setting together with the interest rate in the “Rates file” the upper bound for interest rates allowed, i.e. upper bound=’Daily interest rate in Rates file’ + ‘Rate upper margin’
‘Rate tick’: interest rates on overnight and term loans are often agreed in round numbers, e.g. 4.0% or 4.25%. This parameter filters out other possible trades. The unit is in basis points (100bp=1%).
‘Rate tick margin’: due to rounding errors the rate ticks are not always exactly as the Rate tick parameter would prescribe. This parameter allows you to set a tolerance around the rate tick. For example a tolerance of 1 would consider anything between 3.99% and 4.01% to be within the rate of 4.0%. The unit is in basis points (100bp=1%).
Operation
The applications looks for trades in three ‘passes’.
Pass 1 is a rough rule that identifies possible trade candidates which fulfill the following criteria:
Pass 2 filters the “candidates” according to the following criteria:
Pass 3 selects the most likely loan from the possible ‘matches’ above by the following rules.
Output
The application creates three files (pass1_[run id], pass2_[run id], and pass3_[run id]) at selected locations:
Download, installation and running
Simply copy and extract this Furfine-algorithm application to a folder that you create for it. Double click run.bat to launch the application. You need to have JRE1.5 installed (usually you do have it already). The package contains a file test-payments.txt and test-rates.txt files (in the /data folder) and an test-parameters.txt file that uses them. You can load that parameter file into the application and test the example data. It identifies one trade (in Pass 3) from the payments in the example.
Credits & Usage
I would like to thank Peter Zimmerman, Casper Chistophersen and Balázs Gődény for their contributions to this application.
You are free to use the program for any purpose. The .zip file contains the source code as well. Please make a reference to this blog entry in case you use the application for any written works.