Technical writing

FDIC Call Report Data: The Quarterly Financial Filing Behind Every US Bank’s Balance Sheet

· AI Analytics
Federal DataFDICBankingFinance

Every FDIC-insured bank, savings institution, and thrift in the United States files a quarterly “Call Report” with its federal regulator. The filing covers the institution's complete balance sheet, income statement, loan portfolio composition, asset quality metrics, capital adequacy ratios, and liquidity position. Approximately 4,700 institutions file each quarter. The data goes back to the 1930s in some series and is published publicly through the FDIC BankFind Suite and the Federal Financial Institutions Examination Council (FFIEC) Central Data Repository (CDR). No other country publishes this level of granular financial disclosure for its banking system at this frequency and this breadth.

Call Reports are simultaneously a supervisory tool, a macroprudential monitoring instrument, and one of the richest public datasets on the financial health of the US banking system. Analysts use them to screen for distressed institutions months before a failure, researchers use them to study credit cycles, and journalists used them to document the warning signs visible in Silicon Valley Bank's balance sheet long before its March 2023 collapse. Understanding the filing mechanics, schedule structure, and API access is essential for anyone working with US banking data.

The three Call Report forms

The FFIEC administers three versions of the Call Report, differentiated by institution size and international activity. Every FDIC-insured bank files exactly one of them each quarter.

  • FFIEC 031 — Filed by institutions with domestic and foreign (international) offices. In practice this means the largest US banks—JPMorgan Chase, Bank of America, Citibank, Wells Fargo—as well as regional banks with significant overseas operations. The 031 is the most detailed version and includes additional schedules covering foreign office deposits, country exposure, and off-balance-sheet items involving cross-border counterparties.
  • FFIEC 041 — Filed by institutions with only domestic offices and total assets of $5 billion or more. This covers mid-size and large regional banks. The 041 contains all the core schedules—balance sheet, income statement, asset quality, capital—but omits the international-specific schedules required on the 031.
  • FFIEC 051 — A streamlined version introduced in 2017 for community banks with total assets below $5 billion that do not engage in complex activities. The 051 reduces regulatory burden by eliminating or simplifying roughly 40% of the data items on the 041. Most community banks now file the 051. The trade-off for researchers is that some granular schedule breakdowns are not available for smaller institutions in the post-2017 period.

Despite the three-form taxonomy, the core financial schedules are substantially consistent across all three forms. The RC, RI, RC-B, RC-C, RC-N, and RC-R schedules described below exist in recognizable form in all three versions. The FDIC normalizes the data across form types when publishing the BankFind API, so users querying the API do not need to handle form-version differences manually.

Filing mechanics and regulatory authority

Call Reports are due 30 calendar days after the end of each calendar quarter. For large institutions (generally those with $5 billion or more in assets), the deadline is extended to 45 days. Quarter-end dates are March 31, June 30, September 30, and December 31, so typical filing deadlines fall in late April, late July, late October, and late January. The FFIEC and FDIC publish revised data as institutions submit amendments; the BankFind API reflects the most current version of each filing.

Call Reports are signed by the institution's chief executive officer or chief financial officer under penalty of perjury. The signing officer attests that the data is accurate and complete to the best of their knowledge. Unlike SEC filings for public companies, there is no audit requirement for the Call Report itself—but the data is subject to examination by the institution's primary federal regulator, and material misstatements can result in civil money penalties and criminal referrals.

Supervisory responsibility is divided among three federal agencies through the FFIEC. The FDIC supervises state-chartered banks that are not members of the Federal Reserve System (state non-member banks, designated “NM” in the charter class field). The Federal Reserve supervises state-chartered banks that are members of the Federal Reserve System (state member banks, “SM”) and bank holding companies. The OCC supervises nationally chartered banks (“N”) and federal savings associations (“SA”). All three agencies share examination findings through FFIEC protocols, and all three use Call Report data as their primary financial monitoring input between examinations.

For publicly traded bank holding companies, Call Report data is roughly reconcilable to SEC filings. The bank-level Call Report maps to the bank subsidiary's balance sheet and income statement in the holding company's 10-K and 10-Q, but the consolidated holding company statements include non-bank subsidiaries, parent company assets, and intercompany eliminations that do not appear in the Call Report. Analysts comparing Call Report data to SEC filings must account for these consolidation differences.

Balance sheet schedules (RC schedules)

The balance sheet is reported on Schedule RC and detailed in a series of subsidiary RC schedules. Each subsidiary schedule expands one line item on the summary balance sheet into its component parts. The structure is analogous to a financial statement with footnotes, except the footnotes are themselves structured data.

  • RC-A: Cash and balances due from depository institutions. Separates cash in vault, balances due from the Federal Reserve (reserve balances), balances due from other depository institutions, and interest-bearing balances. The split between reserve balances and due-from balances matters for liquidity analysis—reserve balances are immediately available; due-from balances may have clearing delays.
  • RC-B: Securities. The most analytically complex schedule on the balance sheet. Securities are broken out by accounting classification—held-to-maturity (HTM) at amortized cost versus available-for-sale (AFS) at fair value—and by security type: US Treasury obligations, US government agency obligations, residential mortgage-backed securities (agency and non-agency), commercial MBS, asset-backed securities, obligations of states and political subdivisions (municipals), corporate and other debt, and equity securities. For each type, RC-B reports amortized cost, fair value, and realized gain/loss. The gap between HTM amortized cost and fair value—the unrealized loss position—is disclosed in RC-B and was the central data point in the SVB failure narrative.
  • RC-C: Loans and lease financing receivables.The loan portfolio broken out by borrower type and collateral: commercial and industrial (C&I) loans; construction and land development; secured by nonfarm nonresidential properties (CRE); secured by 1-4 family residential properties; multifamily residential; agricultural production; loans to individuals (consumer: credit card, auto, student, other); loans to foreign governments; loans to depository institutions; lease financing receivables; and other loans. RC-C Part II covers loans to small businesses and small farms, a key community development lending indicator. CRE concentration ratios—regulatory guidance flags banks where CRE exceeds 300% of capital and where construction and land development exceeds 100% of capital—are computed from RC-C and RC-R.
  • RC-D: Trading assets and liabilities.Relevant only for institutions with significant trading operations. Breaks down trading assets by type: US Treasury, agency, MBS, corporate, derivatives (fair value), and other. Most community banks carry zero or negligible trading book balances.
  • RC-E: Deposit liabilities. Deposits segmented by type and depositor: transaction accounts (demand deposits, NOW accounts), savings deposits (money market deposit accounts plus other savings), time deposits below $250,000, time deposits of $250,000 or more, and deposits in foreign offices. The split between time deposits at and above $250,000 matters for identifying concentrations of uninsured deposits—a key variable in the 2023 failure analysis. Brokered deposits, reported separately in Schedule RC-O, represent deposits acquired through deposit brokers or listing services rather than through the institution's own branch network.
  • RC-F and RC-G: Other assets and other liabilities.Catch-all schedules for balance sheet items not captured in the primary schedules. RC-F includes accrued interest receivable, premises and equipment, other real estate owned (OREO), intangible assets (goodwill and other), and deferred tax assets. OREO represents foreclosed real estate the bank has taken through default—it is included in the Texas Ratio numerator because it is a non-earning asset whose liquidation value is uncertain. RC-G covers accrued interest payable, other borrowed money not elsewhere classified, and other liabilities.
  • RC: Summary balance sheet. The top-level schedule aggregating all subsidiary schedules into total assets, total liabilities, and equity capital. Total equity capital = paid-in capital + retained earnings + accumulated other comprehensive income (AOCI). AOCI includes the after-tax unrealized gain or loss on AFS securities—for most banks, a negative number during the 2022–2023 rate hike cycle. HTM unrealized losses bypass AOCI and go directly to RC-B disclosure only, which is why SVB's reported equity looked stronger than the economic reality suggested.

Income statement (Schedule RI)

Schedule RI reports year-to-date income and expense through the quarter end. Unlike the balance sheet, which is a point-in-time stock, RI is a flow statement covering the period from January 1 through the reporting date. Analysts computing quarterly income figures subtract the prior quarter's year-to-date total from the current quarter's total to isolate a single quarter's activity.

  • Interest and fee income on loans (RI line 1).Broken by loan category matching RC-C: C&I, real estate, consumer, agricultural, other. The yield on each category equals income divided by average balance—a measure of pricing power that shifts as rates change and loan mix evolves.
  • Interest income on investment securities (RI line 2).Taxable versus tax-exempt (municipal), and HTM versus AFS. The yield on HTM securities is locked at the coupon rate regardless of market rates—this is precisely why rising rates in 2022 created duration losses without immediate income statement impact.
  • Interest expense on deposits and borrowings.Split by deposit type (transaction, savings, time) and by borrowing source (FHLB advances, subordinated notes, other). The cost of funds equals total interest expense divided by average interest-bearing liabilities. The spread between loan yield and cost of funds, adjusted for the non-interest-bearing deposit base, is the net interest margin (NIM)—the core profitability driver for most banks.
  • Provision for loan and lease losses. A non-cash expense that builds the allowance for loan and lease losses (ALLL) on the balance sheet. When a bank charges off a bad loan, the charge-off reduces both the ALLL and the gross loan balance simultaneously, leaving net loans unchanged. The provision rebuilds the ALLL to the level management believes adequate to cover expected future losses. Rising provisions are an early signal of deteriorating credit quality.
  • Noninterest income. Reported in detail: service charges on deposit accounts, fiduciary activities, trading revenue, fees from loan sales and securitization, card interchange, ATM fees, and other. For most community banks, service charges on deposits and mortgage banking fees dominate noninterest income. For large banks, trading revenue and investment banking fees can exceed net interest income in some quarters.
  • Noninterest expense. Salaries and employee benefits (typically 50–60% of total noninterest expense for most banks), occupancy and equipment, data processing, FDIC deposit insurance premiums, and other operating expenses. The efficiency ratio—noninterest expense divided by the sum of net interest income and noninterest income—measures how much operating cost is consumed per dollar of revenue. Below 60% is generally considered efficient; above 70% suggests cost structure problems.
  • Applicable income taxes and net income.Banks subject to Subchapter S elections and mutual savings institutions may have different tax structures; the tax line reflects the institution's actual tax provision, not a notional rate. Net income is the bottom line after provision, noninterest items, and taxes.

Asset quality: Schedule RC-N

Schedule RC-N is the most closely watched schedule for credit cycle analysis. It reports the aging and status of problem loans—the inputs for computing the Texas Ratio and for tracking the progression of credit stress through a loan portfolio.

RC-N breaks down loans by past-due status and nonaccrual status for each loan category in RC-C. The columns are: 30–89 days past due and still accruing; 90 days or more past due and still accruing (rare—regulators expect loans more than 90 days past due to be on nonaccrual unless they are well-secured and in the process of collection); and nonaccrual. Nonaccrual loans stop generating interest income—when a loan is placed on nonaccrual, any previously accrued but unpaid interest is reversed. The ratio of nonaccrual loans to total loans is a primary credit quality metric and the most predictive single variable for near-term charge-off rates.

Schedule RI-B reports charge-offs and recoveries by loan category and computes the net charge-off (NCO) ratio: net charge-offs divided by average gross loans. For most US commercial banks in normal credit conditions, the NCO ratio runs between 0.1% and 0.5% annualized. During the GFC, community bank NCO ratios for construction and land development loans exceeded 10% at many institutions. Comparing the NCO ratio to the provision expense in RI reveals whether management is provisioning ahead of losses (allowance building) or behind them (allowance depleting).

The allowance for loan and lease losses (ALLL) on Schedule RC-F and the related movements in RI-B form the core of the allowance coverage ratio: ALLL divided by nonperforming loans. A ratio below 1.0x means the reserve is insufficient to cover identified problem loans without drawing on equity capital. Post-CECL (Current Expected Credit Loss accounting, mandatory for SEC filers from 2020 and for most other banks from 2023), the ALLL is renamed the allowance for credit losses (ACL) and is sized to cover lifetime expected losses rather than incurred losses.

Capital adequacy: Schedule RC-R

Schedule RC-R implements the Basel III capital framework as adopted by US regulators. The schedule computes risk-weighted assets (RWA) by applying regulatory risk weights to each asset class, then derives capital ratios from the resulting denominator. Understanding the capital adequacy framework is essential because the thresholds drive regulatory action.

The four primary capital ratios for US banks are:

  • Common Equity Tier 1 (CET1) ratio. CET1 capital (common stock, retained earnings, AOCI for banks subject to the AOCI inclusion rule) divided by RWA. The CET1 ratio is the highest-quality capital measure and the first to be eroded by losses. Regulatory minimum: 4.5%. Capital conservation buffer adds an additional 2.5%, bringing the effective minimum for unrestricted distributions to 7.0%.
  • Tier 1 capital ratio. Tier 1 capital (CET1 plus Additional Tier 1, primarily qualifying preferred stock and contingent-convertible instruments) divided by RWA. Regulatory minimum: 6.0%.
  • Total capital ratio. Tier 1 capital plus Tier 2 capital (subordinated debt, general loan loss reserves up to 1.25% of RWA) divided by RWA. Regulatory minimum: 8.0%.
  • Tier 1 leverage ratio. Tier 1 capital divided by average total assets (not risk-weighted). Regulatory minimum: 4.0%. This ratio is binding for banks with low-risk-weight assets—like SVB, whose Treasuries and agency MBS carried low risk weights but still consumed balance sheet.

The prompt corrective action (PCA) framework in the Federal Deposit Insurance Act establishes mandatory regulatory responses at five capital threshold levels:

  • Well capitalized: Total capital ≥ 10%, Tier 1 ≥ 8%, CET1 ≥ 6.5%, leverage ≥ 5%. No restrictions on activities or distributions.
  • Adequately capitalized: Total capital ≥ 8%, Tier 1 ≥ 6%, CET1 ≥ 4.5%, leverage ≥ 4%. Cannot accept brokered deposits without a waiver.
  • Undercapitalized: Below adequately capitalized thresholds. Subject to mandatory restrictions on asset growth, acquisitions, and dividends; must submit a capital restoration plan.
  • Significantly undercapitalized: Total capital below 6%, Tier 1 below 4%, or leverage below 3%. Regulator must take one or more of twelve specified actions including ordering recapitalization or restricting executive compensation.
  • Critically undercapitalized: Tangible equity 2% or less of total assets. Regulator must appoint the FDIC as receiver within 90 days unless the institution's primary regulator determines and documents that other action would better achieve PCA purposes—a determination made in practice only in extraordinary circumstances.

For the largest US institutions—the eight Global Systemically Important Banks (G-SIBs) designated by the Financial Stability Board—an additional ratio applies: the Supplementary Leverage Ratio (SLR), which divides Tier 1 capital by total leverage exposure (on-balance-sheet assets plus off-balance-sheet exposure measures). G-SIBs must maintain a minimum SLR of 5% at the holding company level and 6% at the insured depository institution level.

Liquidity schedules: RC-P, RC-O, and the brokered deposit problem

Liquidity risk is the risk that an institution cannot meet its obligations as they come due without incurring unacceptable costs. Call Report schedules RC-P and RC-O provide the primary supervisory window into funding structure and liquidity risk concentration.

Schedule RC-O covers off-balance-sheet items and other regulatory reporting items, including a detailed breakdown of brokered deposits. Brokered deposits are deposits gathered through deposit brokers—intermediaries that aggregate funds from retail investors seeking higher yields and place them at institutions offering above-market rates. They are classified as “hot money” because broker-intermediated depositors are rate-sensitive and can withdraw at maturity without notice. The FDIC restricts brokered deposit acceptance: banks that are not well-capitalized are prohibited from accepting brokered deposits without an FDIC waiver. For undercapitalized institutions, brokered deposit acceptance is entirely prohibited.

The SVB collapse demonstrated the liquidity vulnerability that can be read from Call Report data when the right questions are asked. SVB's year-end 2022 Call Report showed several converging risks:

  • $91.3 billion in HTM securities, carried at amortized cost on the balance sheet with an unrealized loss exceeding $15 billion disclosed in RC-B at fair value. HTM securities cannot be sold without triggering reclassification of the entire HTM portfolio to AFS, which would force immediate recognition of the unrealized losses in capital. SVB was trapped.
  • Deposit concentration. Approximately 94% of total deposits were uninsured—above the $250,000 limit—held by venture capital firms, startups, and technology companies. RC-E disclosed the time deposit and demand deposit balances from which analysts could approximate the insured versus uninsured split (the exact uninsured deposit figure was in the 10-K footnotes, not the Call Report itself, but the deposit structure made concentration obvious).
  • Wholesale funding reliance. FHLB advances had grown substantially as deposit outflows accelerated in 2022. FHLB borrowings appear in Schedule RC as other borrowed money and are broken out on Schedule RC-M. Rising FHLB advances alongside deposit outflows is a classic pre-failure pattern: the institution is borrowing at the wholesale window to replace fleeing retail deposits, usually at higher cost and shorter duration.

These data points were all in public Call Reports filed months before March 2023. The analytical failure was not a data gap—it was a monitoring gap.

Accessing the data: FDIC BankFind Suite and API

The primary access point for Call Report data is the FDIC BankFind Suite at banks.data.fdic.gov. The suite provides both a web interface and a full REST API. The API requires no authentication or API key and supports field selection, filtering, sorting, and pagination.

The primary API endpoints are:

  • /institutions — The bank directory. Returns institution-level characteristics including name, location, charter class, primary regulator, FDIC certificate number, FDIC-assigned risk rating (CAMELS components are not public, but composite ratings appear in examination reports that are sometimes disclosed), and institution type. The certificate number is the join key to all other endpoints.
  • /financials — Quarterly Call Report financial data. Contains more than 1,000 normalized data items from across all Call Report schedules. Field names follow FDIC's mnemonic conventions (e.g., ASSET for total assets, LNLSNET for net loans,RBCT1J for Tier 1 capital ratio). The FDIC publishes a data dictionary mapping field names to Call Report schedule line items.
  • /summary — Aggregate statistics across the insured institution population. Useful for computing industry averages, peer group benchmarks, and aggregate balance sheet trends without downloading institution-level data.
  • /history — Institutional history events: charter grants, mergers, acquisitions, name changes, and failures. Essential for building a complete longitudinal panel because institutions change names and merge frequently; the history endpoint preserves the event chain.
  • /failures — The complete FDIC bank failure list from 1934, with resolution details, cost estimates, and acquiring institution. The same data underlying the FDIC bank failure CSV download.

All endpoints return JSON or CSV. Bulk CSV downloads are also available for the full institution list and failure list. For time-series panel data covering all institutions over multiple quarters, the API pagination (limit/offset parameters) is necessary; single requests are capped at 10,000 records.

The FFIEC Central Data Repository (CDR) at cdr.ffiec.gov provides direct access to Call Report filings in the original XBRL format and as bulk data downloads. The CDR is more granular than BankFind—it contains the raw schedule-level data at the line-item level—but requires more processing to use. For most analytical purposes, BankFind's normalized fields are sufficient.

The Texas Ratio as a screening metric

The Texas Ratio, developed by Gerard Cassidy at RBC Capital Markets during the Texas real estate bust of the late 1980s, is the most widely cited single-institution stress indicator derived from Call Report data. The formula is:

Texas Ratio = Nonperforming Assets / (Tangible Common Equity + ALLL)

Where:
  Nonperforming Assets = Nonaccrual loans (RC-N)
                       + Loans 90+ days past due and still accruing (RC-N)
                       + Other Real Estate Owned / OREO (RC-F)
  Tangible Common Equity = Total equity capital (RC) - Intangible assets (RC-F)
  ALLL = Allowance for Loan and Lease Losses (RC-F / RI-B)

A Texas Ratio exceeding 100% indicates that nonperforming assets exceed the institution's combined loss-absorption capacity from tangible equity and loan loss reserves. At that threshold, further credit deterioration directly impairs insured deposits. Empirical studies of the GFC-era failure wave found that banks crossing above 100% failed at rates exceeding 85% within the following 12 months.

The ratio is useful precisely because it is computable from public data without any proprietary information. CAMELS ratings—the supervisory composite rating assigned by regulators after each examination—are confidential. The Texas Ratio is a public proxy for the supervisory judgment that a bank is approaching the zone where regulatory intervention becomes likely.

The 2023 regional bank stress: what the data showed

Silicon Valley Bank ($209 billion in assets), Signature Bank ($110 billion), and First Republic Bank ($229 billion) collectively represented the largest single-year asset volume entering FDIC receivership since the GFC. All three failures shared structural characteristics that were documented in public Call Report and SEC filings long before the spring 2023 runs.

SVB's year-end 2022 10-K disclosed $15.9 billion in unrealized losses on its HTM securities portfolio. The Call Report RC-B schedule showed the scale of the HTM book relative to total assets and to equity. The Tier 1 leverage ratio, at around 8%, looked adequate on the basis of book capital—but adjusting for the HTM unrealized losses would have reduced regulatory capital to near-zero or negative. This is the accounting asymmetry that allowed the problem to build: HTM unrealized losses flow through RC-B disclosure only, not through AOCI and not through the Tier 1 capital calculation.

Signature Bank's concentrated exposure to cryptocurrency-related deposits was visible in its filings, as was its rapid growth—total assets roughly doubled between 2020 and 2022 as crypto-sector deposits flooded in. Rapid asset growth funded by a single-industry deposit base is a classic concentration risk indicator. First Republic Bank's reliance on large, relationship-driven deposits from high-net-worth clients created a similar concentration vulnerability; once confidence eroded, the uninsured depositor base had both the motive and the means to exit quickly.

In all three cases, the deposit beta—the sensitivity of deposit costs to Federal Reserve rate increases—lagged behind the pace of rate hikes in 2022. This is visible in Call Report RI data: interest expense on deposits grew more slowly than the fed funds rate for most of 2022, improving NIM on paper while the competitive pressure to raise rates was building. When deposit repricing accelerated, the institutions' long-duration asset portfolios could not reprice upward quickly enough to compensate, compressing NIM and eroding the income buffer against credit and funding stress.

FDIC vs. Fed vs. OCC: data scope differences

Call Report data covers bank entities—FDIC-insured depository institutions. It does not cover their holding companies, broker-dealer affiliates, or insurance subsidiaries. Three parallel reporting systems cover the broader financial institution universe:

  • Federal Reserve FR Y-9C. The holding company analog to the bank Call Report, filed quarterly by bank holding companies (BHCs) and savings and loan holding companies with total assets above $3 billion. The FR Y-9C covers the consolidated holding company including non-bank subsidiaries. It is available through the Federal Reserve's National Information Center (NIC) and FRED. For most large bank analysts, the FR Y-9C is the primary data source because it covers the entity that issues public equity; the Call Report covers only the bank subsidiary.
  • OCC bank performance data. The OCC publishes its own quarterly compilation of financial statistics for national banks and federal savings associations in its “Bank Performance Report.” The data is largely derived from Call Reports but presented in the OCC's own format and includes OCC-specific commentary on industry conditions.
  • Federal Reserve FR Y-14. The capital plan and stress testing data submitted by large bank holding companies under the Dodd-Frank stress testing regime. FR Y-14 data includes loan-level granularity and forward-looking capital projections. It is not public; the published stress test results (DFAST) report only aggregate outcomes, not the underlying FR Y-14 inputs.

For comprehensive coverage of the US banking system, analysts typically combine FDIC Call Report data (bank-level balance sheets and income) with Fed FR Y-9C data (holding company consolidation) and, for public companies, SEC 10-K and 10-Q filings (audited financial statements, footnote disclosures, and risk factor narratives).

Python: community bank ratio analysis via BankFind API

The following script pulls all FDIC-insured institutions in a target state with total assets below $10 billion, fetches their most recent quarterly financial data from the BankFind API, and computes four key ratios: Texas Ratio, efficiency ratio, CET1 ratio, and Tier 1 capital ratio. Institutions are ranked by Texas Ratio descending to identify the most stressed in the peer group.

import requests
import pandas as pd

BASE = 'https://banks.data.fdic.gov/api'

# Step 1: Get all FDIC-insured institutions in a target state
# stname filter uses full state name; asset_conservatorship=0 excludes receiverships
def get_banks(state: str) -> pd.DataFrame:
    params = {
        'filters': f'STNAME:"{state}" AND ASSET:[1 TO 10000000]',  # assets < $10B (in thousands)
        'fields': 'CERT,INSTNAME,CITY,ASSET,REPDTE',
        'limit': 2000,
        'offset': 0,
        'output': 'json',
    }
    r = requests.get(f'{BASE}/institutions', params=params, timeout=30)
    r.raise_for_status()
    data = r.json()
    rows = [item['data'] for item in data.get('data', [])]
    return pd.DataFrame(rows)

# Step 2: Pull quarterly financials for a list of certificate numbers
def get_financials(certs: list, quarters: int = 4) -> pd.DataFrame:
    cert_filter = ' OR '.join(f'CERT:{c}' for c in certs[:50])  # batch 50 at a time
    params = {
        'filters': cert_filter,
        'fields': (
            'CERT,REPDTE,'
            'ASSET,LNLSNET,DEP,'           # total assets, net loans, total deposits
            'NETINC,'                       # net income
            'INTINC,EINTEXP,NIM,'           # interest income, interest expense, NIM
            'NONII,NONIX,'                  # noninterest income, noninterest expense
            'LNLSDEPC,'                     # allowance for loan losses (ALLL)
            'LNLSNTV,'                      # nonaccrual loans
            'P3ASSET,P9ASSET,'              # 30-89 day past due, 90+ day past due
            'OREO,'                         # other real estate owned
            'EQ,INTANG,'                    # equity capital, intangibles
            'RBCT1J,'                       # Tier 1 capital ratio
            'RBC1AAJ,'                      # CET1 ratio
            'LNLSGT'                        # gross loans
        ),
        'limit': 500,
        'output': 'json',
        'sort_by': 'REPDTE',
        'sort_order': 'DESC',
    }
    r = requests.get(f'{BASE}/financials', params=params, timeout=60)
    r.raise_for_status()
    data = r.json()
    rows = [item['data'] for item in data.get('data', [])]
    return pd.DataFrame(rows)

def compute_ratios(df: pd.DataFrame) -> pd.DataFrame:
    df = df.copy()

    # Convert string fields to numeric (FDIC API returns strings)
    num_cols = [
        'ASSET', 'LNLSNET', 'DEP', 'NETINC', 'INTINC', 'EINTEXP', 'NIM',
        'NONII', 'NONIX', 'LNLSDEPC', 'LNLSNTV', 'P3ASSET', 'P9ASSET',
        'OREO', 'EQ', 'INTANG', 'RBCT1J', 'RBC1AAJ', 'LNLSGT',
    ]
    for col in num_cols:
        if col in df.columns:
            df[col] = pd.to_numeric(df[col], errors='coerce')

    # Texas Ratio = nonperforming assets / (tangible common equity + ALLL)
    # Nonperforming assets = nonaccrual + 90+ day past due + OREO
    df['npa'] = df['LNLSNTV'].fillna(0) + df['P9ASSET'].fillna(0) + df['OREO'].fillna(0)
    df['tce'] = df['EQ'].fillna(0) - df['INTANG'].fillna(0)
    df['texas_ratio'] = df['npa'] / (df['tce'] + df['LNLSDEPC'].fillna(1))

    # Efficiency ratio = noninterest expense / (net interest income + noninterest income)
    # Net interest income approximated as INTINC - EINTEXP when NIM not directly available
    df['nii'] = df['INTINC'].fillna(0) - df['EINTEXP'].fillna(0)
    df['revenue'] = df['nii'] + df['NONII'].fillna(0)
    df['efficiency_ratio'] = df['NONIX'].fillna(0) / df['revenue'].replace(0, float('nan'))

    # Net interest margin: FDIC field NIM is already computed (annualized %)
    # CET1 ratio from RBC1AAJ (expressed as percentage)
    df['cet1_ratio'] = df['RBC1AAJ']
    df['tier1_ratio'] = df['RBCT1J']

    return df

# Main: pull Texas community banks under $10B, rank by Texas Ratio
if __name__ == '__main__':
    print("Fetching Texas community banks...")
    banks = get_banks('Texas')
    print(f"Found {len(banks)} institutions")

    certs = banks['CERT'].dropna().astype(int).tolist()

    # Fetch most recent quarter for all banks (batch in groups of 50)
    all_fin = []
    for i in range(0, min(len(certs), 200), 50):
        batch = certs[i:i + 50]
        try:
            fin = get_financials(batch)
            all_fin.append(fin)
        except Exception as e:
            print(f"Batch {i//50 + 1} failed: {e}")

    if not all_fin:
        print("No financial data retrieved.")
        exit(1)

    fin_df = pd.concat(all_fin, ignore_index=True)

    # Keep only the most recent quarter per institution
    fin_df['REPDTE'] = pd.to_datetime(fin_df['REPDTE'], errors='coerce')
    latest = fin_df.sort_values('REPDTE', ascending=False).groupby('CERT').first().reset_index()

    # Compute ratios
    latest = compute_ratios(latest)

    # Merge institution names
    banks['CERT'] = banks['CERT'].astype(str)
    latest['CERT'] = latest['CERT'].astype(str)
    result = latest.merge(banks[['CERT', 'INSTNAME', 'CITY']], on='CERT', how='left')

    # Rank by Texas Ratio descending
    result = result.sort_values('texas_ratio', ascending=False)

    display_cols = ['INSTNAME', 'CITY', 'texas_ratio', 'efficiency_ratio', 'cet1_ratio', 'tier1_ratio', 'NIM', 'ASSET']
    display_cols = [c for c in display_cols if c in result.columns]

    print()
    print("Texas community banks ranked by Texas Ratio (most stressed first):")
    print(result[display_cols].head(20).to_string(index=False))

    stressed = result[result['texas_ratio'] > 1.0]
    print(f"\nInstitutions with Texas Ratio > 100%: {len(stressed)}")
    print(f"Institutions with Texas Ratio > 50%:  {len(result[result['texas_ratio'] > 0.5])}")

The script batches certificate number requests in groups of 50 to stay within URL length limits. The BankFind API returns strings for numeric fields; the script converts them to numeric before computing ratios. The REPDTE field is the report date (YYYYMMDD format in the API), used to select the most recent quarter per institution.

Key calibration notes: assets are reported in thousands of dollars in the FDIC API, so the filter ASSET:[1 TO 10000000] selects institutions with assets between $1,000 and $10 billion. The Texas Ratio uses a floor of 1 in the denominator to avoid division by zero for institutions with zero or negative tangible equity plus reserves—a condition that itself signals extreme distress. Institutions with a Texas Ratio above 100% (expressed as 1.0 in ratio form) are the primary screening output; the 50% watch list adds institutions to monitor quarterly.


For the complete FDIC bank failure list—every institution that has failed since 1934, with resolution type, resolution cost, and acquiring institution data—and how failure waves map to macroeconomic cycles: FDIC Bank Failure Data: Every US Bank That Has Failed Since 1934 →

For the Federal Reserve H.8 statistical release—the weekly aggregate balance sheet for all US commercial banks—and how it revealed the 2023 regional bank deposit outflows in real time: Federal Reserve H.8: The Weekly Snapshot of Every US Commercial Bank's Balance Sheet →

For OCC enforcement actions against national banks—the public disciplinary record that often precedes or accompanies the capital deterioration visible in Call Reports: OCC Bank Enforcement Actions: Reading the Federal Regulator's Public Disciplinary Record →