{'fraction_non_alphanumeric': 0.031019551239994753, 'fraction_numerical': 0.015483532344836636, 'mean_word_length': 4.3665939018378985, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Interbank borrowing and lending between financially constrained banks

Some stylized facts about transactions among banks are not easily reconciled with coinsurance of short-term liquidity risks. In our model, interbank markets play a different role. We argue that lending to another bank can reduce a bank’s overall portfolio risk through diversification. If insolvency is costly, this diversification improves the interbank lender’s funding liquidity, boosting credit supply to nonbanks. However, diversification comes at an endogenous cost that depends on bank-specific factors of interbank borrower and lender. The model provides a framework for understanding the importance of interbank lending for aggregate credit supply and the stability of banking systems. The model’s predictions are consistent with evidence documented in the literature that other theories cannot consistently explain.


Introduction
Interbank markets are traditionally considered to be dominated by overnight deposits and repos. These are short-term instruments traded on rather risk-intolerant markets. Motivated by this, the academic literature has explored the role of such contracts as instruments for banks to coinsure short-term liquidity risks (e.g., Allen and Gale 2000;Castiglionesi et al. 2014).
While the importance of such coinsurance as a driver for interbank transactions is widely accepted, this notion cannot be easily reconciled with three other stylized facts about interbank markets, especially in Europe. First, the size of banks' interbank assets and liabilities is substantially larger than their average deposit and credit fluctuations (Bluhm et al. 2016). Second, although the flows among banks are predominantly short-term transactions, a substantial part of the stock of interbank claims is long term (European Central Bank 2015). Third, the average net position of many participants in the interbank market is substantially different from zero and persistent (Roengpitya et al. 2017). These observations suggest that there is a need for a theory of interbank markets which complements the established theory of interbank deposits or repos. 1 Such theory should also take into account that interbank transactions are to a large extent conducted bilaterally over the counter (Craig and von Peter 2014) and that interbank lenders tend to be better capitalized and have better credit ratings than interbank borrowers (Angelini et al. 2011).
We shall argue in this paper that there are economic environments where profitmaximizing banks have an incentive to engage in interbank transactions that capture these features. In these environments, a bank can lend funds to another bank that may default at a later date. As long as the correlation of the two banks' earnings is not equal to one, assuming such counterparty risk can help the interbank lender to better diversify its overall exposure to insolvency risk. If insolvency creates losses, a reduction in risk will reduce the cost of external, nonbank funding sources, hence easing the external funding constraint of the interbank lender and allowing for an expansion of credit supply. Such diversification may be costly, though. To fully reap the potential diversification benefits, an interbank lender may have to lend more funds than the borrower wants to raise. In this case, the lender will have to offer a discounted interbank lending rate, i.e., the borrower's expected repayment will fall short of the lender's cost of raising the additional funds used to make the interbank loan. As a result, interbank loans come at an expected loss to the lender, making diversification costly. The benefits of diversification (in terms of improved access to external finance from nonbank investors) and its cost (in terms of expected losses from granting loans to another bank) are determined jointly in equilibrium as an interbank lender decides how much to lend to another bank.
With a focus on the capacity of the banking sector to borrow from nonbank investors, the present paper contributes to three related branches in the literature. The first concerns the role of interbank markets for banks' credit supply to nonbank borrowers. In models where interbank markets facilitate the coinsurance of short-term liquidity risks, a fixed amount of liquid assets held in the banking sector is reallocated on interbank markets. 2 Accordingly, dysfunctional interbank markets result in liquidity hoarding and idle lending capacities, as loanable funds no longer flow to the most profitable lending opportunities, both within and across banks (Freixas and Holthausen 2005;Gertler and Kiyotaki 2010;Acharya and Skeie 2011;Diamond and Rajan 2011). 3 In our paper, the scope for banks to diversify risks shrinks if interbank markets become dysfunctional. As a consequence, an interbank lender's financial constraint tightens which impairs its ability to grant loans to nonbanks. The interbank borrower may also curtail lending as it has to resort to nonbank investors who may provide funds either at higher costs or not at all.
A second strand of the literature studies the terms of interbank transactions, in particular how they depend on risk (Furfine 2001;King 2008) and other borrowerspecific characteristics (Craig and von Peter 2014;Vollmer and Wiese 2014). Our model suggests that the characteristics of the interbank lender are also key for the terms of interbank transactions, in a way consistent with recent evidence (Angelini et al. 2011;Affinito 2012). For example, an interbank lender with fewer internal funds faces a tighter funding constraint. Hence, the lender has to gain more from diversification and would want to grant a larger loan. However, for the interbank borrower to accept the larger loan, the interest rate has to be smaller.
Finally, our paper is also related to a body of research on interbank linkages and financial stability, with a particular focus on probabilities of joint bank failures. The literature has identified contagion as one possible reason for joint failures. Since Allen and Gale (2000), it has been argued that incomplete interbank networks are more susceptible to contagion than complete networks because the former do not allow for as much coinsurance of risks (see also Afonso and Lagos 2015;Craig and von Peter 2014;Craig et al. 2015). 4 An alternative explanation of joint bank failures refers to systemic risk-shifting incentives according to which banks may gain from holding similar portfolios (Acharya and Yorulmazer 2008;Acharya 2009). We show that although diversification is generally beneficial for a financially constrained interbank lender, it may be better for the bank to make itself vulnerable to the failure of a counterparty holding not identical but similar assets. Diversification benefits will be smaller, but so will be the costs of diversification. This shows that banks do not necessarily seek a perfectly diversified exposure on interbank markets and that incentives for banks to hold somewhat similar assets exist beyond systemic risk-shifting.
The remainder of the paper has the following structure. In Sect. 2, we provide an overview of the environment in which banks benefit from diversification via interbank exposures. Having thus motivated our assumptions, we present in detail the formal model setup in Sect. 3. In Sect. 4, we characterize the equilibrium and its implication for credit supply. In Sect. 5, we extend the model to study the role of diversification and associated stability issues. In Sect. 6, we discuss some empirical implications of the model. Section 7 concludes.

Overview of the environment
The environment we consider in this paper has three features. These features are well established in the literature. Importantly, they are not rival to those environments in which banks seek to coinsure short-term liquidity risks.
Banks are financially constrained Banks' equity capital is limited because building up internal funds is a costly process that takes time (Bucher et al. 2013) and raising funds on equity markets is subject to frictions, such as market segmentation (Allen et al. 2015). The resulting constraints on bank loan supply can be further aggravated by capital regulation (Behn et al. 2016). Tapping on alternative sources of funding is also hampered. For example, the pool of insured retail deposits, although usually a stable funding source (Martin et al. 2018), is rather fixed in size for a bank (Billett et al. 1998), and asymmetric information generally limits the willingness of investors to provide external funding (Stiglitz and Weiss 1981).
In our model, a bank has only a limited amount of funds at its immediate disposal, for example as a result of the above-mentioned frictions in equity and deposit markets. Furthermore, a bank's ability to borrow more funds is impaired by asymmetric information about its solvency. We consider a reduced form of a model in which investors can enforce the promised payment from the bank only if they incur the costs of verifying the bank's earnings. Under these circumstances, the literature has identified contracts as optimal if they specify a fixed repayment obligation and creditors get to verify the state of the bank if it defaults (Gale and Hellwig 1985;Krasa and Villamil 2000). 5 While this contract lessens the incentive for a bank to misreport the true state, it implies that investors incur verification costs when the bank is truly unable to repay, which reduces their willingness to lend to the bank in the first place. In such circumstances, any possible way to lower the probability of default, and thus of wasting resources when a bank fails, potentially helps banks to mitigate their financial constraints.
Diversifying and hedging risk is costly One way to reduce the probability of default is through diversification (Diamond 1984). However, banks are typically not fully diversified. One piece of evidence for diversification being imperfect is the substantial home bias in banks' international asset allocations (García-Herrero and Vázquez 2013). For the Euro area, there is strong evidence that banks wishing to diversify their loan portfolio internationally are still hesitant to engage in direct cross-border lending in the retail market. Instead, they prefer cross-border interbank lending in the wholesale market. Despite a gradual increase in the share of direct cross-border loans to total loans for nonfinancial corporations and households to approximately 10% in 2018, the ratio of direct cross-border retail lending to wholesale interbank lending is still considerably below 30% (European Central Bank 2018, Charts 17 and 19). Such patterns can be the result of credit market segmentation due to asymmetric information problems. Typically, local banks have informational advantages over foreign banks, which would face adverse selection problems that leave them with a pool of the least creditworthy or even unworthy borrowers. In those environments, entry by foreign banks in regional loan markets can reduce the screening incentives for banks through increased competition (Gehrig 1998) or imply a lower resilience of foreign banks to liquidity shocks (Dietrich and Vollmer 2010).
Other means of reducing risks are also costly. For example, contingent contracts such as credit derivatives cause additional incentive problems (Hakenes and Schnabel 2010;Ahn and Breton 2014). Suppose the debt a bank issues and its loans suffer both from costly verification problems, i.e., a bank can enforce loan repayments only if it verifies the borrower's income. In this scenario, buying a credit derivative will destroy the bank's incentive to incur any verification costs as it will be compensated anyway when a borrower defaults. Having not been in any contractual relationship at all with the borrower, the seller of the credit derivative has a natural disadvantage in verifying the borrower's true state. The borrower, in turn, will then not report the true earnings. Such problems do not arise if the bank seeks to reduce risks through diversification as a bank's interest in enforcing loan repayments is maintained.
Taken together, a bank has different options to reduce risks and thus ease its financial constraint. As each instrument comes at a cost, optimal risk management will balance marginal costs and benefits across those instruments. Interbank lending belongs to the set of such instruments. It allows banks to reinsure their idiosyncratic credit risk, but has its own cost. In our model, these costs are endogenous. They exist even in the absence of regulation, such as capital requirements for term loans to other banks, provided the number of counterparties for interbank transactions is limited. The literature has identified lending relationships (Affinito 2012;Bräuning and Fecht 2017) and search costs (Afonso and Lagos 2015) as reasons for such limitations.

Information-sensitive investors exist
For a bank to expect that by lowering its risk exposure it can improve the willingness of investors to provide funds, there have to be investors who are sensitive to information about the bank. Hence, investors should exist who are reasonably well informed about a bank and who care about whether the bank can fail. These characteristics usually do not apply to retail depositors, who may not care enough about the risk of a bank failure as they are covered by some sort of investor protection or deposit insurance scheme.
Real-world wholesale investors, such as insurance companies, pension funds or hedge funds, however, fit well in this description (Calomiris and Kahn 1991;Huang and Ratnovski 2011). They are professional investors who are in the business of monitoring prices of bank shares and credit derivatives. Like banks, they are able to infer banks' individual probabilities of default from market data, and they do research into the different business models and risk exposures of banks. For our diversification argument, investors would only need to be able to assess a bank's probability of default in equilibrium. In order to capture this ability of investors while keeping the analysis simple and tractable, however, investors in our model observe interbank transactions and their terms and know also the correlation of loan returns. 6

Setup
In this section, we present the baseline model. We consider a one-period economy, populated by two banks n ∈ {1, 2} and a continuum of investors. Bank n enters the period with some liquid endowment Ω n ≥ 0 called internal funds. Investors as a group have plenty of funds, although an individual investor's endowment may be infinitesimal. Everyone is risk neutral, lives the whole period, has no time preference and is protected by limited liability.
At the beginning of the period, each investor can use her funds to hold a portfolio of safe assets and claims on banks. Banks can also invest in safe assets, grant risky business loans and lend funds to each other. The potential interbank lender is called bank 1, and the potential interbank borrower is called bank 2.
Investors' claims on bank n are characterized by the amount d n ≥ 0 the investors provide to the bank at the beginning of the period and a face value δ n the bank has to repay at the end (all face values are per unit). Similarly, an interbank loan contract will stipulate the amount b ≥ 0 to be lent by bank 1 to bank 2 and a face value β that bank 2 promises to repay. Claims on banks held by investors rank pari passu with interbank loans.
Let a n ≥ 0 be the amount bank n invests in safe assets and l n ≥ 0 be the amount invested in risky business loans. Then, the budget constraints at the beginning of the period read (3.1) While access to safe assets is free, granting business loans is associated with nonpecuniary, nonverifiable costs c(l n ) arising from, e.g., processing applications, screening borrowers and negotiating loan contracts. These costs are increasing and convex; to simplify the exposition, we also assume c(0) = c (0) = 0. One interpretation is that business loans differ in their complexity and banks add the least complex loans first to their portfolios.
To pay out its creditors, a bank can use its portfolio returns generated at the end of the period. Returns on business loans are state-dependent and not freely observable. The success of a bank's loans can be described as a random variable that takes the value H if loan earnings are high (success) and the value L if they are low (failure). Denote a high return of bank n's business loans by λ n,H , a low return by λ n,L (all returns are per unit), and let p n be the probability of a low return. While business loans do not dominate the safe assets, which yield a risk-free return α > 0, the expectation of high loan earnings alone already exceeds the risk-free return, i.e., 0 < λ n,L < α < (1 − p n ) λ n,H . As realized loan earnings are not freely observed by investors, a bank could pretend that it is unable to repay what it owes. However, if the bank does not repay, it goes into bankruptcy which triggers a costly state verification process. All creditors of such a failing bank, i.e., investors and potentially an interbank lender, then equally share the value of the bank's assets net of any costs arising from bankruptcy. Therefore, a simple debt contract minimizes expected bankruptcy costs. To simplify matters, we assume that the net returns the creditors of a failing bank can expect after bankruptcy are infinitesimal, regardless of the state. Hence, while ensuring that a bank repays its debts whenever it can, nobody gets anything meaningful if loan earnings are too low to cover the bank's payment obligations in full.
We formalize these assumptions by defining an indicator variable I n,s , which is 1 when bank n suffers from bankruptcy in state s and 0 otherwise. A bank will be forced into bankruptcy whenever its end-of-period book value π n,s in state s is negative, i.e., (3.4) π 2,s := λ 2,s l 2 + αa 2 − βb − δ 2 d 2 . (3.5) For the sake of simplifying the exposition, we introduce the following definition: Definition 1 Bank n operates in a safe mode m n = S if π n,s ≥ 0 for all s ∈ S and in a risky mode m n = R if π n,s < 0 for all s ∈ S with λ n,s = λ n,L and π n,s ≥ 0 for all s ∈ S with λ n,s = λ n,H .
Accordingly, a bank chooses to either go bankrupt in those states in which loan earnings are small or to survive regardless which state materializes. 8 Contracting at the beginning of the period takes place as follows. Banks negotiate an interbank loan contract (b, β) in a simple noncooperative game. In this game, bank 1 makes a take-it-or-leave-it offer (b * , β * ) to bank 2. If accepted, the offer will be implemented, i.e., (b, β) = (b * , β * ). If bank 2 declines the offer, no interbank transaction takes place, i.e., (b, β) = (0, 0). 9 Each bank n will also decide on the details of the contract (d n , δ n ) offered to investors taking their participation constraint into account. The latter requires the face value δ n of claims on bank n to satisfy 7 To study the case with correlated loan earnings, we will consider a larger set of states in Sect. 5. 8 Clearly, the option to go bankrupt regardless of which state materializes is not relevant when Ω n ≥ 0. s∈S 1 − I n,s p s δ n ≥ α, (3.6) that is, the expected repayments to investors at least cover the value of their next best alternative. As investors have plenty of funds and no better option than to invest in safe assets, their supply of funds to the banks is perfectly elastic. They are willing to provide any volume of funds provided the face value δ n satisfies (3.7) The objective of a bank is to maximize expected profits subject to its constraints. These constraints are somewhat different for the interbank borrower and the interbank lender. For any given interbank loan contract (b, β), the optimization problem of the interbank borrower reads max (a 2 ,l 2 ,d 2 )∈R 3 + s∈S p s max π 2,s , 0 − c (l 2 ) s.t. (3.1), (3.5) and (3.7). (3.8) Let P 2 (b, β) denote the associated indirect expected profits for the interbank borrower as a function of the terms of the interbank loan. Then, the optimization problem of the interbank lender is max (a 1 ,l 1 ,d 1 ,b,β)∈R 5 + s∈S p s max π 1,s , 0 − c (l 1 ) s.t.

Analysis
In the present section, we analyze the optimization problem of a bank and its implications. In Sect. 4.1, we start with a bank that does not form financial links to the other bank. This defines the outside options in the negotiations of the terms of the interbank loan which we analyze in Sect. 4.2. We then discuss the costs associated with interbank lending in Sect. 4.3 and draw conclusions regarding structure and volume of the supply of business loans in Sect. 4.4. We discuss the nonnegativity constraints on the interbank borrower's internal funds and on the expected NPV of its business loans in Sect. 4.5. We conclude this section with a remark on the choice between holding a diversified portfolio of business loans and diversifying through interbank lending.

Without interbank loans
If the two banks are not linked via interbank loans (b = 0), each bank chooses between the safe and the risky mode. The advantage of the safe mode is that a bank can always collect all earnings. The disadvantage of the safe mode is that a bank has to ensure that it can pay investors the full face value of their claims even in the 'bad' state when earnings are low. Therefore, the total amount a bank owes has to satisfy δ n d n ≤ λ n,L l n + αa n , (4.1) implying an upper limit on the funds a bank can obtain from investors. Together with the budget constraint (3.1) and the face value of investor claims on the bank (3.7), it implies that granting business loans is subject to a financial constraint, which reads Given assumption (3.2), a bank cannot fully refinance business loans externally because it cannot repay investors a sufficiently large amount. There is a gap, which depends on the amount the bank plans to lend out. If the present value of this gap cannot be covered by internal funds, granting this amount of loans is not feasible. In short, since internal funds are limited, the volume of business loans is limited too in the safe mode.
In the risky mode, investors are repaid only in the state when returns are high. Hence, δ n d n ∈ λ n,L l n + αa n , λ n,H l n + αa n . gives (4.5) Restriction (4.4) states that the bank must grant a sufficiently large volume of risky business loans to be actually exposed to the risk of bankruptcy. Restriction (4.5) looks similar to (4.2). However, because of assumption (3.2), there is no funding gap in the risky mode, which is the advantage over the safe mode. The disadvantage of the risky mode is that business loans are less valuable, for bankruptcy will drive all values down to (almost) zero in the bad state. Without interbank loans, a bank's optimal investment and financing decision has the following properties.
with l R n andΩ n being defined by Proposition 1 shows that a bank, whose capacity to raise funds does not impose a binding constraint on business loans, grants the first-best loan volume. If the bank's endowment implies that its financial constraint is binding in the safe mode, the bank operates either in the safe mode, with loan volumes being smaller, the tighter the constraint is, or in the risky mode. If the financial constraint in the safe mode is not too tight, the deviation from the first-best is not too large and the bank prefers the safe mode over the risky mode. Only if the financial constraint is sufficiently tight, i.e., a bank's endowment is belowΩ n , it prefers the risky mode because the benefits of shaking off a relatively tight financial constraint outweigh loan earnings forgone in the bad state.

With interbank loans
From the analysis so far, we know what happens if bank 2 does not agree to the terms of the interbank loan contract offered by bank 1. When making a take-it-or-leave-it offer to bank 2, bank 1 not only takes this into account but also that, if its offer is accepted, the interbank loan affects the funding liquidity of both banks. A necessary condition for a bank to face a financial constraint on its volume of business loans is to operate in the safe mode. With interbank loans, these constraints are which differ from (4.2) with respect to the second term on the RHS. For bank 1, any dollar raised from investors at a cost of α and lent to bank 2 increases the amount collectible in the bad state by β. If β > α, the bank can use the difference β − α to increase the amount it can promise to repay to its investors in the safe mode. For this effect to work, bank 1 does not rely on how much it can collect from bank 2 in the other state, when earnings of bank 1 are high anyway. In fact, even if bank 1 takes the risk of being unable to collect its claims on bank 2 in that state, making an interbank loan to bank 2 will still offset the risk associated with its own business loans. Assuming such counterparty risk lowers the bank's total portfolio risk, enabling it to commit to a higher face value of claims held by investors. Hence, bank 1 can attract additional funds from investors and refinance additional business loans. Bank 2 will have scope for additional business loans only if β < α. However, bank 1 would never agree on interbank loans with β < α, as they neither cover their refinancing costs nor do they help to grant more business loans. This raises the question why bank 2 would accept an interbank loan with β > α. If bank 2 operated in the safe mode, such a loan would be more expensive than accepting funds directly from investors. However, if bank 2 is in the risky mode, it repays β only with probability 1 − p 2 = p 1 . Hence, bank 2 accepts β > α as long as it will operate in the risky mode and the expected costs of the interbank loan are not higher than those of funds from investors, i.e., p 1 β ≤ α.
These insights already allow to draw two important conclusions. First, there is no benefit to bank 1 from diversifying its portfolio with claims on bank 2 if the former is not financially constrained even without interbank lending, i.e., if Ω 1 ≥ α−λ 1,L α l fb 1 . Accordingly, provided diversification is the only reason for banks to trade in our context, there is no need for bank 1 to lend to bank 2 although doing so would not harm anyone either. The interbank lender would simply become an investor just like any other investor of bank 2. 10 Second, there is also no reason for interbank loans unless the interbank lender will be safe and the interbank borrower risky. For the sake of brevity and clarity, we henceforth focus on situations in which already in the absence of interbank markets, the endowments of banks Ω n imply that both banks would face external funding constraints, but while bank 1 would operate in the safe mode, bank 2 would operate in the risky mode. 11 That is, Ω 1 ∈ Ω 1 , (α − λ 1,L )l fb 1 /α and Ω 2 ∈ 0,Ω 2 . The optimal interbank loan contract has the following properties. (4.12)

For
, (4.13) 10 For example, if the endowment Ω 1 exceeds the first-best loan volume, bank 1 could lend its excess wealth to bank 2. To empirically assess the validity of this result, one would need to solve an endogeneity problem. Observing a bank which operates as interbank lender although it is not financially constrained does not need to be in contradiction with our results. The bank may be financially unconstrained because it lends to other banks. Therefore, the counterfactual question whether the bank would be financially constrained if it did not lend to other banks is to be answered. 11 Note that gains from trade exist for banks with other endowments, but the exposition would be more complex. We attend to a more general discussion in Sect. 4.5.
According to the proposition, two cases are to be distinguished, which differ with respect to the relative weight of two factors. One factor is the funding gap faced by bank 1 if it plans to grant the first-best volume of business loans, i.e., The other factor is the maximum amount bank 1 can raise from investors if it diversifies its portfolio with an interbank loan that is as costly for bank 2 as funds raised from investors. This amount has two components. First, as interbank loans cost bank 2 the same as funds from investors if α = p 1 β, each unit of interbank loans contributes to close the funding gap of bank 1 by β−α α = p 2 p 1 . Second, bank 2 needs no more than l R 2 − Ω 2 from external sources to refinance its favored volume of business loans l R 2 in the risky mode. Hence, provided that the interbank loan costs the same as funds from investors, l R 2 − Ω 2 is also the largest amount bank 2 is willing to accept from bank 1. Together this means that the highest amount, which bank 1 can raise externally if the interbank loan is to cost bank 2 as much as other external funds, is p 2 p 1 l R 2 − Ω 2 . The first case in Proposition 2 refers to situations in which the funding gap of bank 1 α−λ 1,L α l fb 1 − Ω 1 is small relative to what this bank can potentially raise by diversifying its portfolio with an interbank loan that costs as much as funds from investors p 2 p 1 l R 2 − Ω 2 . In this case, bank 1 diversifies its portfolio such that the first-best volume of business loans becomes financially feasible, while bank 2 acts just like without an interbank market. It operates in the same mode and grants the same loan volume l R 2 because, from the perspective of bank 2, the interbank loan merely crowds out funds from investors.
In the other case, bank 1 would still be financially constrained with an interbank loan of l R 2 −Ω 2 and would therefore benefit from granting a larger loan to bank 2. However, bank 2 is unwilling to accept more funds than necessary to refinance l R 2 , unless it receives compensation for granting otherwise inefficient business loans. Hence, bank 1 has to offer a contract with a lower repayment obligation β, making the interbank loan cheaper for bank 2 than funds from investors. In that sense, diversification becomes costly for bank 1 because expected returns on the interbank loan do not cover their own refinancing cost. Trading off this cost of diversification with its benefit, the optimum for bank 1 is given by (4.16). The LHS of the first equation in (4.16) reflects the funding gap of bank 1. According to the RHS, the compensation for bank 2 (second term) reduces the amount by which bank 1 could close its funding gap with the help of a costless interbank loan (first term). According to the second equation in (4.16), the gains from granting one more unit of business loans (LHS) just offsets the marginal cost of compensating bank 2 (RHS). To discuss further implications of the optimal arrangement between bank 1 and bank 2, we now take a closer look at the determinants of these costs.

Bank-specific characteristics and diversification costs
Our discussion of the determinants of diversification costs begins with the definition of these costs as a function K 2 of the loan volume l 1 .
Definition 2 For any given l 1 , let (4.17) withl 2 being implicitly defined by and let Financial endowments and credit risks of the interbank lender as well as the interbank borrower are key determinants of the diversification costs. Regarding endowments, a higher Ω 1 eases the interbank lender's own financial constraint, making it less dependent on diversification as a means to mitigate its financial constraint. The interbank loan is smaller and so is the compensation payable to the interbank borrower. By contrast, diversification is more expensive for the interbank lender if Ω 2 is higher because the interbank borrower will require a higher compensation. The reason is that the interbank borrower would need less external funds. To be still willing to accept an interbank loan that makes the interbank lender's portfolio sufficiently diversified, the interbank borrower asks for a higher compensation.
As regards risk, we operationalize it by introducing a mean-preserving spread to a bank's loan earnings. Let Δ n := λ n,H − λ n,L implying λ n,L = E[λ n,s ] − (1 − p n ) Δ n and λ n,H = E[λ n,s ] + p n Δ n . By definition, a higher Δ n increases the variance of loan earnings without changing E[λ n,s ]. According to (4.9), a higher credit risk Δ 1 comes with a tighter financial constraint for the interbank lender. In order to have sufficient funds for maintaining a volume l 1 of business loans, the interbank borrower has to be convinced to accept a larger interbank loan. As a larger interbank loan drives up l 2 , the interbank borrower requires a higher compensation. Similarly, the interbank borrower's total loan earnings in its good state are higher with a higher Δ 2 . Holding everything else equal, this implies that the interbank borrower forgoes less in profits by investing in a larger than efficient loan portfolio. Hence, the required compensation can be smaller too.
The marginal costs of diversification K 2 (l 1 ) are defined as the change in compensation required if the interbank lender wants to marginally increase its business loans. If they are strictly positive, the properties of the function c imply that it is optimal for the interbank lender to remain financially constrained. Proposition 2 has shown that, although an interbank lender could potentially escape its financial constraint entirely, the interbank loan chosen by the interbank lender may be too small to achieve this. The characteristics of diversification costs in equilibrium are summarized in the following lemma.
The costs of diversification, and thus the bank-specific characteristics, have two implications. The first refers to the volume of business loans a bank wishes to grant, henceforth credit supply for short. Applying the general implicit function theorem to (4.16) and taking Lemma 1 into account, we obtain the following results.
Corollary 1 If the interbank lender's credit supply depends on its own financial endowment Ω 1 and credit risk Δ 1 , then 1. credit supply of the interbank lender is negatively correlated with the interbank borrower's endowment Ω 2 and positively correlated with the interbank borrower's credit risk Δ 2 ; 2. credit supply of the interbank borrower is negatively correlated with the interbank lender's endowment Ω 1 and varies with the interbank lender's credit risk Δ 1 , but with an unclear sign.
Otherwise, the bank-specific characteristics of its interbank trading partner are irrelevant for a bank's credit supply.
That lower internal funds and higher credit risk tend to tighten a bank's own financial constraint is a rather standard result. In fact, the model has qualitatively similar implications when we abstract from any interbank linkages (i.e., setting b = 0, see Proposition 1). The novelty in our model is that bank-specific characteristics of the interbank borrower also matter for the credit supply of the interbank lender. Both, a better endowment Ω 2 and a lower credit risk Δ 2 increase the marginal costs of diversification, inducing a lower credit supply by the interbank lender. In addition, bank-specific characteristics of the interbank lender also have an effect on the interbank borrower's credit supply. With a higher Ω 1 , an interbank lender relies less on diversification to maintain its credit supply. In order to economize on diversification costs, it reduces the interbank loan, leading to a lower credit supply by the interbank borrower. A higher credit risk Δ 1 has two effects. In order to maintain a specific volume of business loans, the interbank lender would have to lend more to the interbank borrower. However, since the marginal costs of diversification are higher, the interbank lender does not want to leave the loan volume unchanged but prefers to grant fewer loans. The first effect increases credit supply by the interbank borrower, the second effect decreases it.
The second implication of diversification costs refers to the substitutability of interbank and nonbank wholesale funding.

Corollary 2
If the interbank lender's credit supply does not depend on its own financial endowment Ω 1 and/or credit risk Δ 1 , interbank loans and funds provided by nonbanks are perfect substitutes for the interbank borrower. Otherwise, they are not.
The reasons behind this corollary are the following. For K 2 l * 1 = 0, interbank loans are as costly for the interbank lender as funds from investors. If the interbank lender would reduce the volume of the interbank loan, the interbank borrower could easily replace them at no additional costs with funds from investors. For K 2 l * 1 > 0, the interbank loan comes at a lower unit cost and crowds out funding from other investors. Therefore, these two funding sources are not perfect substitutes for the interbank borrower, as a marginal reduction in interbank lending would not be offset by more funds from investors.
At times, a limited substitutability of funding sources causes worries among central banks and regulators. A major concern during the world financial crisis was that a freeze in interbank lending or the failure of a major interbank lender would cut off some other banks entirely from their funding sources, triggering a further blow to the banking sector and aggregate credit supply. We now turn to these issues.

Interbank markets and credit intermediation
The previous analysis suggests that to understand the role of interbank loans for credit supply, it is key to consider them as complements on the aggregate level. This is because the banking sector as a whole can raise more funds from nonbanks when banks trade with each other. Such a more-money effect of transactions among banks indicates that tensions in interbank markets have the potential to harm the real economy even more seriously than it is commonly thought. In particular, as the following comparison of credit supply in economies with and without an interbank market reveals, not only interbank borrowers but also interbank lenders supply less credit if interbank transactions cannot take place.

Corollary 3 A breakdown of interbank markets will lead to a drop in the interbank lender's credit supply which
1. is independent from bank-specific characteristics of the interbank borrower if the interbank lender's credit supply before the market breakdown does not depend on its own financial endowment Ω 1 and credit risk Δ 1 ; 2. tends to be more pronounced for a lower financial endowment Ω 2 or higher credit risk Δ 2 of the interbank borrower if the interbank lender's credit supply depends on its own financial endowment Ω 1 and credit risk Δ 1 .
Credit supply of a potential interbank lender, i.e., bank 1, will be different in economies with and without interbank markets. For example, if the interbank market allows the bank to completely escape its financial constraint at no further costs, i.e., K 2 l * 1 = 0, the bank will supply credit according to its first-best loan volume l fb 1 . In economies without interbank markets, however, this bank will face a binding financial constraint and supply onlyl 1 = α α−λ 1,L Ω 1 . The percentage drop in credit supply will be 1 − α α−λ 1,L Ω 1 l fb 1 , which depends on the aforementioned bank-specific characteristics Ω 1 and Δ 1 of the interbank lender. The less an interbank lender can refinance its optimal credit supply with internal funds, i.e., the smaller is Ω 1 /l fb 1 , the more important are interbank markets for aggregate credit supply. In a similar vein, interbank markets will boost aggregate credit supply the stronger, the higher the credit risk for the interbank lender is. A higher Δ 1 implies a lower λ 1,L and thus a tighter financial constraint for the bank if it cannot ease its funding constraint through diversification. 12 The more interesting insight, however, refers to the role of the interbank borrower's characteristics. Corollary 1, Part 1 suggests that, if K 2 (l * 1 ) > 0, credit supply of the interbank lender depends negatively on the borrower's endowment Ω 2 and positively on its credit risk Δ 2 . Accordingly, the effect of a market breakdown on the interbank lender's credit supply depends on these characteristics too.
Finally, the interbank borrower's credit supply may also depend on whether there is an interbank market.

has no impact on the interbank borrower's credit supply if the interbank lender's
credit supply does not depend on its own financial endowment Ω 1 and/or credit risk Δ 1 ;

leads to a drop in the interbank borrower's credit supply if the interbank lender's credit supply depends on its own financial endowment Ω 1 and credit risk Δ 1 . This drop is more pronounced if the financial endowment of the interbank lender Ω 1 is low.
According to Proposition 1, a potential borrower on interbank markets, i.e., bank 2, may face a substantial external funding constraint in economies without an interbank market. From Proposition 2, we know that there are two cases. One refers to situations in which the interbank borrower wants to raise more externally than what the interbank lender, i.e., bank 1, needs for achieving a degree of diversification that would allow to refinance its first-best loan volume. Interbank loans and funds from investors are perfect substitutes, and the interbank borrower's credit supply does not depend on whether or not there is an interbank market. Accordingly, an exogenous freeze of interbank markets would not have an effect on this bank's ability to grant business loans.
In the other case, the interbank lender wants to lend more to the interbank borrower. The interbank borrower is funded entirely by the other bank, and interbank loans are not a perfect substitute for funds from investors. A freeze of the interbank market implies that the interbank borrower's credit supply will be lower. Instead ofl 2 , as given in (4.16), the credit supply will be only l R 2 . The reason that this bank's credit supply is higher in an economy with an interbank market is not that it is dependent on interbank borrowing, but that its business loans provide additional benefits to other banks which are internalized only through interbank transactions.

Debt overhang and business loans with negative NPV
Next, we remove the restrictions on bank 2's internal funds and let Ω 2 ≶ 0. We also ease the restriction on loan returns and assume merely α < λ 2,H . In the absence of interbank lending, i.e., b = 0, bank 2 would still operate as described in Proposition 1, but with two qualifications. First, if Ω 2 < 0, the bank would start with a negative endowment which could be the result of a debt overhang. If the debt overhang problem is bad enough such that Ω 2 < − 1 α φ 2 l R 2 − p 2 λ 2,L l R 2 , bank 2 is better off closing down right at the beginning of the period as expected profits would not cover the existing debt overhang. Second, if α > p 1 λ 2,H , the bank will not operate in the risky mode because expected loan earnings may not even cover their cost of finance. If bank 2's endowment is positive, it will opt for the safe mode in the absence of interbank markets and credit supply will be l max 2 := αΩ 2 / α − λ 2,L . If its endowment is negative, the best it can do is to fail outright.
The major difference to the previously considered cases is that the costs of diversification comprise not only an element that depends on the deviation of the induced loan volumel 2 from the loan volume l R 2 the bank would grant in the risky mode. It also contains a lump sum. If bank 1 wants to take advantage of potential diversification benefits through interbank loans, it has to make bank 2 operate in the risky mode in the first place. Doing so requires a compensation C 2 for bank 2 to not go bankrupt or operate in the safe mode, if either would be preferred by bank 2 over the risky mode, i.e., with l S 2 := min l fb 2 , max 0, l max 2 . Hence, the total costs of diversification are C 2 + K 2 (l 1 ) with It follows that, although the cost of diversification can be higher, it does not necessarily render interbank loans meaningless as an instrument to relax funding constraints for the interbank lender. Even structurally weak banks with a debt overhang and lending opportunities with negative NPV may still offer a diversification benefit to an interbank lender which can outweigh its cost. Since the weak bank would not grant any loans in the absence of interbank markets, a loan from another bank would thus appear to be the only, life-sustaining funding source for this bank. Such a loan has to be less costly than any other funding alternative as the interbank lender has to compensate the interbank borrower for not going bankrupt. However, interbank loans will not be cheap enough to allow the interbank borrower to regain sufficient financial strength and a sound capital structure, for otherwise the interbank borrower would not offer any diversification benefits to the interbank lender.

Diversified loan portfolios versus diversification through interbank lending
We conclude this section with a remark on the endogenous choice between investing in a diversified portfolio of business loans and seeking diversification on the interbank loan market. As discussed in Sect. 2, there is evidence for regional fragmentation in European retail banking markets (European Central Bank 2018), which is considered to be linked to local information advantages of banks.
Our model helps to shed some further light on this phenomenon. Suppose that bank 1 can choose between two loan portfolios, A and B. There are again two states. In one state, both portfolios are a success, and in the other state, they are both a failure. However, compared to portfolio A, portfolio B is associated with higher marginal costs, c , lower expected returns, E[λ 1,s ], and a lower variance, Δ 1 . One could interpret portfolio A as a portfolio solely consisting of business loans granted in the bank's home country and portfolio B as a portfolio of loans the bank grants at home as well as abroad. The differences between portfolios then reflect both the informational disadvantage the bank has abroad and the higher degree of diversification achievable through direct cross-border lending. Importantly, these characteristics of the portfolios imply that the financial constraint for the bank is tighter if it invests only in domestic loans. This is not only because the lower costs and the higher expected return imply a higher first-best loan volume, but also due to the higher volatility which lowers the bank's ability to repay investors regardless of whether the portfolio returns are high or low. Provided the bank wants to operate in the safe mode, this financial constraint may be so tight that the bank prefers the more diversified portfolio B over the more productive portfolio A. 13 However, instead of seeking diversification through direct cross-border lending, the bank can also choose to invest in loan portfolio A and lend to another bank which has a better expertise in the foreign market. Then, the benefit of interbank lending is given by the additional expected profit due to a looser financial constraint, net of any diversification costs payable to the interbank borrower. If this benefit is sufficiently high, the bank prefers diversification through interbank markets over direct diversification of its loan portfolio.

Imperfect correlation of loan portfolios
So far, we analyzed interbank loans as an instrument for a bank to reduce its probability of default provided that perfect diversification is possible, even though it may choose not to become perfectly diversified due to the associated costs. However, business loans granted by banks may be exposed to systematic risks, for example due to business cycle factors. In this section, we set out to explore two related questions. First, how does the correlation of banks' business loans affect the benefits and costs of interbank lending, and hence the terms of interbank loans? Second, what are the stability implications if an interbank lender has to choose between counterparties with access to different borrower pools?

Modeling correlation
With the aim of controlling for changes in the correlation of loan portfolios for a given risk-return structure of business loans, we generalize the space of possible states S in the following way.
As the success of a bank's loans can be described as a random variable that takes the value L if loan earnings are low ( Expected loan earnings of bank n are E λ n,s = p n λ n,L +(1 − p n ) λ n,H with variance var n = p n (1 − p n ) λ n,H − λ n,L 2 . The covariance of the banks' loan earnings is cov = ( p L L p H H − p L H p H L ) λ 1,H − λ 1,L λ 2,H − λ 2,L with a correlation coefficient ρ = cov/ √ var 1 var 2 . In order to isolate the implications of the correlation of loan portfolios, we start off from unconditional probabilities of failure, p 1 and p 2 , for which p 1 = 1 − p 2 , and consider changes to ρ that do not affect p 1 and p 2 . The probabilities of states hence read implying that changes in the correlation of loan portfolios leave the risk-return profile of each bank's business loans unchanged. As nonnegativity of p L H and p H L implies an upper bound on the correlation coefficient, given by min{ p 1 /(1 − p 1 ), (1 − p 1 / p 1 )} ∈ ]0, 1], we cover all negative correlation coefficients as well as a range of positive coefficients although not necessarily very large ones. 14 Note that p L L can serve as an indicator of the degree of correlation of loan portfolios. Obviously, p L L = 0 indicates perfect negative correlation while an increase in p L L indicates that the correlation of portfolios increases.

Correlation and the terms of interbank loans
To understand the role of correlation for the terms of interbank loans, we need to adjust the definition of a bank's mode of operation.
Definition 3 Let Q n be the set of states in which bank n is bankrupt. Bank n operates in a failure mode m n :=F if Q n = S, in a safe mode m n :=S if Q n = ∅, and in a risky mode m n :=R (Q n ) otherwise.
Naturally, there is no scope for interbank loans as a means to ease a financial constraint if the correlation coefficient is ρ = 1. For ρ ∈] − 1, 1[, interbank loans will be made only if the interbank borrower operates in the risky mode, just like for ρ = −1. However, if there is interbank lending, the interbank lender necessarily assumes also some risk of bankruptcy for ρ ∈] − 1, 1[. The lender will be bankrupt in state L L, in which earnings of its own business loans are low and the interbank borrower defaults.
Given that Q 1 = {L L}, bank 1's budget constraint together with the upper bound on funds from investors implies a funding constraint similar to (4.9). This constraint is now given by Bankruptcy of bank 1 in state L L implies that investors will insist on a higher repayment promise α/(1 − p L L ) > α. This has two immediate consequences. First, the funding liquidity of the bank's business loans will be smaller as can be seen by comparing the first terms on the RHS in (4.9) and (5.3). Second, bank 1 can ease its financial constraint by lending to bank 2 only if β > α/(1 − p L L ), see the second term on the RHS of (5.3).
How business loans are correlated does not affect the banks' optimal portfolio choice in the absence of interbank lending. Hence, Proposition 1 still applies, i.e., provided their endowments satisfy Ω 1 ∈ [Ω 1 , α−λ 1,L α l fb 1 [ and Ω 2 ∈ [0,Ω 2 [, bank 1 would operate in the safe mode without interbank lending and bank 2 in the risky mode. However, with interbank loans, correlation has an effect on bank 1's funding constraint. Taking this into account, the interbank loan contract has the following properties.
Provided bank 1 grants a loan to bank 2, there are again two cases to distinguish. The first is when the interbank lender's own funding gap is small. As the lender fails if both banks' loan earnings are low, this funding gap now refers to the volume of business loans l R(Q 1 ) 1 that is optimal conditional on its failure in state L L. This volume is equal to the first-best only for p L L = 0 and thus ρ = −1, lower than the first-best for all p L L > 0 (ρ > −1) and decreasing in the degree of correlation. This is because an increase in correlation will increase the probability of bank 1 to fail and therefore lower the profitability of its business loans. The first part of Proposition 3 also shows that the interbank rate, or repayment obligation of bank 2, does not depend on the correlation of banks' loan portfolios and that the interbank loan can be as large as with perfect diversification. The reason is that correlation does not affect bank 2's behavior when there are no interbank links. Accordingly, it will also not affect the terms of an interbank loan acceptable to bank 2. To conclude, in case of the interbank lender facing a small funding gap, its volume of business loans is lower if correlation is higher while the volume of business loans granted by the interbank borrower will be the same as in the case of perfect diversification.
If the funding gap of the interbank lender is large, the second case in Proposition 3 applies. In this case, the volumeľ 2 of business loans made by the interbank borrower depends on the volume of the interbank loan, which in turn depends on the volumeľ 1 of business loans the interbank lender wishes to make. Applying the general implicit function theorem to Eqs. (5.14) and (5.15), we find that dľ 1 /dρ < 0 while the sign of dľ 2 /dρ is not clear. 15 To understand this, consider Eq. (5.15). Clearly, higher correlation lowers the marginal returns (on the LHS) for a given volume of business loansľ 1 as the interbank lender's probability of default (and thus of not collecting loan earnings) increases. In addition, an increase in correlation results in an increase of the marginal cost (on the RHS) of business loansľ 1 . The budget constraint (5.3) suggests that this is for two reasons. First, maintaining the same loan volumeľ 1 implies a tighter funding constraint for the interbank lender. To ease the additional pressure, a larger interbank loan is needed so that the interbank borrower would have to grant more business loans, for which marginal costs are higher. Second, a larger degree of correlation will impair the effectiveness of interbank loans as a means to ease the lender's funding constraint, due to a rise in the minimum repayment promise β. Again, this implies that the interbank lender needs to increase the volume of the interbank loan to maintain a certain volume of business loans. Hence, the interbank lender will respond to an increase in correlation by reducing its business loans until marginal returns and costs of these loans are balanced. Whether this reduction in the lender's business loans results in an increase or decrease in the volume of interbank loans and the interbank borrower's business loans then depends on the extent to which the lender cuts its provision of business loans.
While we cannot specify how the terms of the interbank loan depend on the correlation of loan portfolios in general as the sign of dľ 2 /dρ is not clear, we can pinpoint these terms for correlation coefficients for which interbank loans are (almost) meaningless in terms of relaxing the interbank lender's financial constraint.
Corollary 5 Suppose p 1 ≥ 0.5. Provided interbank lending takes place, the terms of interbank loans converge to b = l To understand this result, recall that bank 2 will under no circumstance accept an interbank loan with a repayment obligation β above α/ (1 − p 2 ) = α/ p 1 as such a loan would be more expensive for bank 2 than funds from investors. Also, recall from the funding constraint (5.3) that an interbank loan helps to mitigate the interbank lender's financial constraint only if (1 − p L L )β > α. Combining these bounds on β implies that an interbank loan cannot improve the lender's ability to make business loans unless 1 − p L L > p 1 . If ρ converges to (1 − p 1 )/ p 1 , the difference 1 − p L L will converge to p 1 . Consequently, it makes less and less sense to bank 1 to offer an interbank loan with a repayment obligation β below α/ p 1 , which would be needed to compensate bank 2 whenever it was supposed make business loans in excess of l R(Q 2 ) 2 . Accordingly, for ρ → (1 − p 1 )/ p 1 , bank 2's volume of business loans will be equal to or only marginally higher than l R(Q 2 ) 2 and the interbank loan will stipulate that the amount loaned is equal to or only marginally higher than l R(Q 2 ) 2 − Ω 2 and that the interbank rate β is equal to or only marginally below α/ p 1 .
Given the changes in the terms of interbank loans, we also draw the following conclusion.

Corollary 6 There is aρ < 1 such that interbank lending breaks down if the coefficient of correlation between banks' business loans is larger thanρ.
The reason behind this finding is as follows. Bank 2 makes the same expected profit with and without interbank loans. Therefore, whether or not there is an active market for interbank loans depends on the profits bank 1 expects. Without interbank lending, these profits are determined by Proposition 1, and with interbank lending they follow from Proposition 3. Two cases are to be distinguished. The first is if p 1 ≥ 0.5. As argued above, the RHS in Eq. (5.14) is arbitrarily close to zero if ρ is close to (1 − p 1 )/ p 1 , which implies that α− p 1 λ 1,L αľ 1 ≈ Ω 1 and thus αΩ 1 /(α − λ 1,L ) >ľ 1 . Hence, the volume of business loans bank 1 would grant without interbank loan is larger than with interbank loan. Interbank lending therefore implies that bank 1 faces a tighter funding constraint and cannot realize loan earnings in state L L. Bank 1 is thus strictly better off without granting a loan to bank 2. The second case is if p 1 < 0.5. The LHS in Eq. (5.15) converges to φ 1 (ľ 1 )− p 1 λ 1,L if ρ converges to p 1 /(1− p 1 ). Given that the RHS in Eq. (5.15) is positive, the volume of business loans with an interbank loan,ľ 1 , is smaller than the respective volume if bank 1 would operate in a risky mode without granting any interbank loans, l R n . Yet, bank 1's probability of survival is (almost) the same because p L H is arbitrarily close to zero. However, given that the safe mode is already better for bank 1 than the risky mode without interbank loans, interbank lending only makes bank 1 worse off. To conclude, since granting an interbank loan is always more profitable than not granting such loans provided the correlation coefficient is ρ = −1, and since granting no interbank loans makes bank 1 better off if ρ is close to (1− p 1 )/ p 1 for p 1 ≥ 0.5 and close to p 1 /(1− p 1 ) for p 1 < 0.5, there is a critical value of the correlation coefficientρ∈] − 1, min{ p 1 /(1 − p 1 ), (1 − p 1 )/ p 1 }[ such that it is not profitable to make an interbank loan for ρ >ρ.

Stability implications
Suppose a bank can choose to lend either to a bank that would allow for perfect diversification, or to a bank that would expose the interbank lender to the risk that the failure of the counterparty can trigger its own failure. In both cases, the possibility that the counterparty fails to repay its interbank loan is what makes interbank lending profitable in the first place. However, why and under which circumstances is it profitable for the interbank lender to expose itself to the risk of its own bankruptcy?
To address this question, suppose there are three banks n ∈ {1, 2, 3}. As before, the potential interbank lender is bank 1. This bank can lend either to bank 2 or to bank 3, but not to both. Business loans of bank 2 are a success if and only if those by bank 1 are a failure. Business loans of bank 3 are imperfectly correlated with those granted by bank 1. Following the spirit of the previous notation, the relevant states are now S = {L H L, L H H, H L L, H L H} with probabilities of states as in Eq. (5.2), i.e., Accordingly, {L H L, L H H} is the set of states in which loan earnings for bank 1 are low, {H L L, H L H} is the set of states in which loan earnings for bank 2 are low and {L H L, H L L} is the respective set of states for bank 3. As before, p n denotes the unconditional probability of low loan earnings of bank n, with p 1 = 1 − p 2 = 1 − p 3 . For all banks, loan earnings satisfy assumption (3.2).
The only interesting case is where the coefficient of correlation is sufficiently small such that granting a loan to bank 3 is better than granting no interbank loan at all, i.e., ρ ∈]−1,ρ[. According to Proposition 1, bank 1 operates in the safe mode and banks 2 and 3 operate in the risky mode in the absence of interbank lending if endowments satisfy Ω 1 ∈ Ω 1 , (α − λ 1,L )l fb 1 /α and Ω 2 ∈ 0,Ω 2 and Ω 3 ∈ 0,Ω 3 .
Lemma 3 Let P k be the probability of at least k banks failing at the same time. For , Ω 2 ∈ 0,Ω 2 and Ω 3 ∈ 0,Ω 3 , we have if bank 1 lends to bank 3, Lemma 3 states that if bank 1 trades with bank 2, the probability of two banks being simultaneously in default equals the probability of those states in which bank 2 and bank 3 jointly fail. The joint bank failure is just the result of a common shock in the sense that both banks suffer low loan earnings in state H L L. If, however, bank 1 is better off by lending funds to bank 3, there is a spillover effect from bank 3 to bank 1 in state L H L. Without interbank loans, bank 1 would have operated in the safe mode and hence would survive in this state. By granting a loan to bank 3, however, bank 1 will not survive in this state according to Lemma 2. It has exposed itself to the risk that its counterparty will not repay in a state in which earnings will be already low anyway. The interbank lender has chosen to add interbank loans to its loan portfolio, although they are to some extent subject to the same shock as its own business loans.
The question about whether and under which conditions the interbank lender prefers bank 3 over bank 2 can be answered by looking at the respective costs of diversification, K 2 (l 1 ) and K 3 (l 1 ), associated with interbank loans to bank 2 and 3, respectively. Costs K 2 (l 1 ) have been defined in Definition 2. According to Definition 3, the set of states in which bank 2 is bankrupt Q 2 = {(1, 0, 0), (1, 0, 1)} and for bank 3 the respective set is Q 3 = {(0, 1, 0), (1, 0, 0)}. Costs K 3 (l 1 ) can thus be defined as follows.

Definition 4 Let
(5.17) withl 3 being implicitly defined by (5.18) Diversification costs K 3 (l 1 ) have qualitatively similar properties as K 2 (l 1 ) with respect to bank 3's endowment Ω 3 and credit risk Δ 3 . Bank 1 makes its decision about with whom to trade on interbank markets by comparing expected profits. Expected profits of bank 1 from trading with bank 2 are and expected profits associated with lending to bank 3 are When comparing expected profits, Proposition 2 implies that bank 1 prefers lending to bank 2 over holding no interbank claims at all if Ω 1 ∈ Ω 1 , (α − λ 1,L )l fb 1 /α . This is because it would operate in the safe mode regardless, but some b * > 0, and not b = 0, actually maximizes expected profits. Another implication is that transactions with bank 2 will allow bank 1 to refinance the first-best loan volume l fb 1 already at no cost, i.e., K 2 (l 1 ) = 0, if (α − λ 1,L )l fb 1 /α − Ω 1 ≤ l R 2 − Ω 2 (1 − p 1 )/ p 1 . Trading with bank 3, however, would in any case at least imply to forfeit loan earnings in state H L L. Therefore, bank 2 will be the preferred transaction partner if K 2 (l 1 ) = 0.
Given that expected profits for the interbank lender are strictly decreasing in Ω n and increasing in Δ n for n ∈ {2, 3}, we come to the following conclusion.
Corollary 7 An interbank lender is more likely to lend to bank 3, and the probability of more banks going bankrupt at the same time tends to be higher, the larger are Ω 2 and Δ 3 and the smaller are Ω 3 and Δ 2 .
To sum up, the answer to the question of which bank is the better alternative for bank 1 to trade with depends inter alia on bank-specific factors of the potential interbank borrowers. A larger endowment of a counterparty implies that the costs of diversification for the interbank lender are higher. By contrast, a larger risk makes a counterparty more attractive as it offers diversification at lower costs. The interbank lender shies away from perfect diversification if the funding gap of the interbank borrower, who operates in the risky mode and offers scope for perfect diversification, is relatively small.

Theory and evidence
While a full-fledged empirical test of our theory is beyond the scope of this paper, our framework matches a number of stylized facts about Europe's interbank markets, and the mechanism we have described generates several empirical predictions that are consistent with recent empirical findings.
One stylized fact is that the size of interbank claims can be substantially larger than the average deposit and credit fluctuations of banks. For example, since 2002, the yearly average sum of interbank assets and liabilities in Germany has persistently exceeded the average fluctuations of deposits and credit (measured by the yearly standard deviation) by a factor of five to ten (Bluhm et al. 2016, Figure 1). This observation is economically significant for the Euro area as the German interbank market is the largest segment of the European interbank market where, according to Bluhm et al. (2016, Figure 4), total interbank lending exceeded 40% of total bank assets before the financial crisis and 30% afterward. 16 Another stylized fact refers to the maturity and risk structure of interbank transactions. According to Alves et al. (2013 , Table 3), long-term (at least 1 year) interbank exposures of a median bank in 2011 accounted for more than half of total exposures for a sample of 53 large banks in the Euro area. In Germany, more than one-third of banks' domestic interbank liabilities between 2002 and 2014 had a maturity of more than 1 year and the average maturity of interbank claims is well above 1 year (Bluhm et al. 2016, Figure 7). In terms of cross-border interbank loans, data from the Bank for International Settlement suggest that the average maturity of loans granted between 1997 and 2012 is close to 3 years. 17 The recent increase in the importance of long-term transactions among banks has sometimes been attributed to regulatory changes. The argument is that regulations such as the liquidity coverage ratio and the net stable funding ratio push banks to long-term maturities in the market for wholesale funding. But this argument is incomplete. If a bank wants to grant long-term loans and, because of the regulation, approaches another bank for a loan with a matching maturity, the problem of having to find long-term funding will not disappear. Instead, it will only shift from the interbank borrower to the lender, which will now have to find long-term funding to cover its additional long-term interbank loan. Accordingly, the interbank lender will agree to the transaction only if it can realize another benefit that is unavailable to the borrower. The diversification argument developed in our paper can explain such benefit.
As regards risks, Neal and García-Iglesias (2013 , Table 1) report for the five largest economies in Europe (France, Germany, Italy, UK and Spain) that in 2011, the share of unsecured interbank liabilities in total liabilities ranged from 6.4 to 11.3%. In the UK, unsecured lending among banks accounts for more than a quarter of risk entailed in the interbank network, both in terms of credit risk and funding risk. Moreover, about one-third of unsecured lending is with a maturity of more than three months (Langfield et al. 2014). 18 In Italy, domestic credit exposures in the interbank market have shifted away from short-term to longer-term transactions. For example, based on consolidated data excluding intragroup lending, the figure for unsecured longer-term transactions in 2012 was more than twice as large as that of short-term transactions, whereas in 2008 the ratio was less than a quarter (Bargigli et al. 2015 , Table 1).
A third stylized fact relates to the average net positions of interbank market participants. Not only are they substantially different from zero, their sign is also quite persistent over time (Ayadi et al. 2016;Martín-Oliver et al. 2017;Roengpitya et al. 2017). This suggests that there are banks which seldom switch from being interbank borrowers to interbank lenders or vice versa, which is at odds with the notion of interbank markets providing predominantly coinsurance of temporary idiosyncratic liquidity risks. For coinsurance of liquidity risk to explain this pattern, it would require that some banks are hit time and time again by a series of negative short-term liquidity shocks, while others are in a same way struck repeatedly by a series of positive short-term liquidity shocks. However, rather than referring to a series of bad luck or good luck, one would instead point to a structurally funding position of banks. Moreover, Ayadi et al. (2016, Table 3.1) report for a large sample of banks in the European Economic Area and Switzerland that compared to interbank borrowers, lending banks have a higher tangible common equity-to-assets ratio. Similarly, Martín-Oliver et al. (2017, Tables 3 and 5) find that Spanish interbank lenders tend to outperform borrowers in terms of solvency and liquidity measures, while Angelini et al. (2011, Tables 1 and 2) show that in Italy interbank lenders tend to have a higher (risk-weighted) capital ratio and a higher ratio of liquid assets to total assets than borrowers, especially during a crisis when financial constraints on banks tighten.
Altogether, these stylized facts suggest that the framework developed in this paper is appropriate to study interbank lending activities. Our framework also fits with the notion that the characteristics of counterparties seem to matter for interbank transactions (Afonso et al. 2011). The empirical literature indicates that banks rely heavily on decentralized, bilateral over-the-counter transactions where transaction partners know each other before entering a contract (Craig and von Peter 2014). However, even for trades not carried out over the counter, counterparty characteristics are key (Temizsoy et al. 2015). For example, an important alternative to OTCs is trading platforms such as e-MID which make the identity of the counterparty public (Angelini et al. 2011). 19 Another view is that banks overcome informational asymmetries by maintaining longer-term relationships (Bräuning and Fecht 2017). However, asymmetric information about counterparty risk alone cannot easily explain why worse performing banks increased the number of their counterparties right after the collapse of Lehman in September 2008 as documented by Afonso et al. (2011) who suggest that this could be the result of those banks seeking to diversify their exposure to interbank borrowers. The mechanism we present in the present paper analyzes such a motive for diversification and its implications.
As for the predictions of our model, the findings in Bluhm et al. (2016) are particularly interesting. They suggest that especially long-term transactions with nonbank customers can explain observed changes in a bank's interbank accounts as predicted by our model. In Table 4, Bluhm et al. (2016) report that 1 percentage point more long-term liabilities to nonbanks (relative to total assets) is associated with 0.39 percentage points more gross long-term interbank assets (relative to total assets), while interbank liabilities are virtually unchanged. This finding fits with the results for our interbank lender who channels additional funds from nonbanks only partly to other banks and partly to finance other bank assets. In Table 5, Bluhm et al. (2016) report that a larger supply of long-term loans to nonbanks by 1 percentage point (relative to total assets) is associated with more gross long-term interbank liabilities by 0.84 percentage points (relative to total assets). 20 This observation suggests, first, that it matters for an interbank borrower how to fund loans to nonbanks and, second, that interbank borrowing is, to a large extent, the preferred way of funding. This fits with the results for an interbank borrower in our model to whom interbank loans and other types of finance tend to be imperfect substitutes.
The evidence documented in Iyer et al. (2014) also confirms predictions of our model. Focusing on the Portuguese banking sector, they investigate how the supply of credit to nonbanks was affected by the interbank market freeze in August 2007. Before the market freeze, Portuguese banks were consistently and persistently net borrowers on interbank markets, being funded to large extents by foreign banks. 21 Given that cross-border lending to firms and households in the Euro area has been traditionally low compared to cross-border interbank lending (European Central Bank 2018, Chart 19), Portuguese banks may thus have provided foreign banks with an opportunity to diversify their assets geographically. Against this background, our model predicts that a freeze in the interbank market causes a drop in credit supply which is stronger the more funds the interbank borrower has raised prior to the market freeze. Indeed, Iyer et al. (2014, Table 2) report that firms obtaining loans from banks with a higher interbank borrowing ratio before the freeze suffered from a sharper fall in credit supply from these banks. Our model also predicts that the credit supply of interbank borrowers to firms will respond more strongly to a freeze of the interbank market the larger the (marginal) cost of diversification is. This (marginal) cost depends positively on the ability of those banks to finance their loans with own funds (see Lemma 1). Accordingly, we would expect that banks with lower capital will reduce their credit supply less when interbank markets freeze (Corollary 4). This expectation is confirmed as banks with higher capital ratios tended to reduce credit supply more strongly in response to the market freeze in 2007 (Iyer et al. 2014 , Table 7).

Conclusion
In this paper, we have developed an argument for transactions among banks that are not deposits or repos. In a nutshell, if a bank lends to another bank, the interbank lender assumes some counterparty risk. Taking on such risk can help to further diversify a bank's overall exposure to risk, and a better diversified portfolio improves the cost and availability of external funding for a financially constrained bank. Then, interbank trades have effects on aggregate credit supply and the stability of the banking sector. These effects depend on the potential benefits of diversification as well as on its associated, endogenous cost. The latter are a function of a multitude of bank-specific characteristics of both, interbank lender and borrower. l 2 + a 2 = Ω 2 + b. l 2 ≥ 0, a 2 ≥ 0. (B.4) Let L 2 be defined by φ 2 (L 2 ) = p 2 (λ 2 − α). Then, the bank sets a 2 = Ω 2 +b− L 2 if Ω 2 + b > L 2 and a 2 = 0 if l R 2 < Ω 2 + b ≤ L 2 .
As regards bank 1, expected profits are again derived from (3.8) taking into account Constraint (B.11) is to ensure that bank 1 operates within its financial means and (B.12) that bank 2 is not better off by rejecting an interbank loan. The proof is for each of the two cases made in the proposition separately.
(a) Equation (4.11) implies that budget constraint (3.1) is met for bank 2 if l 2 = l R 2 . As for bank 1, assume that it chooses the highest possible volume of interbank loans according to (4.11), i.e., b * = l R 2 − Ω 2 , for which (4.9) becomes .
(B.13) L L either and not gain anything in state H L, interbank loans would be at best useless. Hence, {L H} / ∈ Q 1 . If {L H} / ∈ Q 1 , then Q 2 = {H L, L L} implies that bank 1's financial constraint would be the same in the safe mode with b = 0. Hence, whether b > 0 or b = 0 would not matter. Therefore, {L L} ⊂ Q 1 . Finally, assumption (3.2) implies {H L} / ∈ Q 1 , which leaves Q 1 = {L L}.