machinery. While large firms usually obtain earmarked loans directly from the National Development Bank (BNDES), earmarked loans to medium and small firms are indirectly allocated through other financial institutions. By 2016, nearly 40% of the outstanding indirect earmarked loans to firms was originated by private banks. In their role as intermediators of earmarked loans, private banks screen and select loan applicants, price, disburse, and service the loans, and ultimately bear the credit risk.

In terms of pricing, earmarked loans are characterized by interest rate ceilings that vary across earmarked programs and are regulated by the government. Although the funding of earmarked loans comes from government sources at rates below the interbank market, private banks can add an interest rate spread to cope with credit losses as long as the final interest rate is below the interest rate ceiling. Due to these ceilings, interest rates of earmarked loans are not only substantially lower than those of free-market loans, but also below the monetary policy rate (i.e., the SELIC rate), and in some cases below inflation rates (see Appendix Figure A1).

# **2.2. Data**

Our analysis relies on two large data sources of corporate loan contracts in the Credit Registry maintained by the Central Bank of Brazil for the period between January 2005 and December 2016.

The first data set comprises all working capital loans above a 5,000 _reais_ threshold (approximately 2,200 USD) that were originated by all private banks during the period. For each loan, we observe the contracted interest rate, the loan amount, its maturity, collateral, and risk rating.<sup>11</sup> The data set also reports information about the borrower, including its industry (at the 2- digit CNAE level), location (at the 2-digit zip code level), number of workers, and the number of years with a relationship with the bank. There are two advantages of studying the universe of working capital loans. First, working capital is the main non-earmarked credit product of firms in Brazil, representing 44% of non-earmarked total outstanding loans. Second, working capital financing is almost exclusively accessed through the free market, as it accounts for a negligible share of earmarked loans (only 0.3%). Thus, the pricing of a working capital loan is decided by the issuing bank and is not subject to interest rate caps.

Our second data set includes information on the origination of earmarked loans for every firm-bank pair in our sample. Each record includes the date and credit type of all earmarked loans originated in the country. Two patterns emerge from the earmarked credit data. First, the relationship of earmarked credit between a lender and its borrowers is highly persistent. More precisely, 92% of the firms that obtain their first earmarked credit and receive consecutive earmarked loans will use the same bank. Second, firms that receive earmarked loans obtain these loans on a frequent basis. The median time between consecutive earmarked loans in the data is nine months. Based on these patterns, we create an indicator variable, _Earmark_ , that records when an earmarked credit relationship starts between a firm-bank pair.

> 11 Each rating is associated with a minimum loan accounting provision, which is an estimate of the probability of default. The possible ratings are AA, A, B, C, D, E, F, G, H. However, we exclude from our sample all ratings below E, which account for less than 1% of the observations and are loans associated with evergreening processes.

6