SuperAPI AI Directory

analyze-us-bank-credit-deposit-decoupling

Data & analytics

View repository

Updated 10-15 21:41

About this skill

<essential_principles>

Under the traditional banking system, loans create deposits:

  • Bank issues loan → Borrower's account gains deposits
  • In theory: New loans ≈ New deposits

When this relationship "decouples":

  • Loans continue to expand, but deposits do not increase proportionally
  • This means some "force" is draining deposits from the system
  • In a QT environment, funds flow to money market funds, Treasuries, etc.

Key characteristics of the 2022-2023 QT cycle:

  1. Period of absolute deposit contraction(2022 Q2 - 2023 Q1)

    • Cumulative change in deposits once fell to -1.2 trillion USD
    • This means total deposits were 1.2 trillion less than the base period (June 2022)
  2. Period of deposit recovery(2023 Q2 to present)

    • Deposits are gradually recovering, but still far behind loan growth
    • Current cumulative change in deposits is about +0.5 trillion USD
  3. Continued decoupling

    • Cumulative increase in loans is about +2.1 trillion USD
    • The gap is about 1.6 trillion USD
Indicator Definition Significance
Cumulative change in loans loans(t) - loans(t0) Expansion on the bank asset side
Cumulative change in deposits deposits(t) - deposits(t0) Change on the bank liability side
Decoupling Gap Cumulative change in loans - Cumulative change in deposits Degree of decoupling
Maximum deposit drawdown min(Cumulative change in deposits) Severity of deposit contraction
Deposit drawdown recovery ratio (Current deposit change - Lowest point) / Lowest point
Deposit Stress Ratio Gap / Cumulative change in loans Deposit shortfall ratio per unit of new loans
Indicator FRED Series ID Description Public URL
Total bank loans TOTLL Loans and Leases in Bank Credit, All Commercial Banks https://fred.stlouisfed.org/graph/fredgraph.csv?id=TOTLL
Total bank deposits DPSACBW027SBOG Deposits, All Commercial Banks https://fred.stlouisfed.org/graph/fredgraph.csv?id=DPSACBW027SBOG

Data frequency: Weekly Alignment method: Based on the latest common date

</essential_principles>

Output three layers of signals:

  1. Cumulative Changes: Cumulative changes in loans and deposits
  2. Deposit Dynamics: Maximum drawdown, recovery degree, and current status of deposits
  3. Decoupling Assessment: Assessment of decoupling degree and macro interpretation

<quick_start>

Fastest way: Use FRED public CSV (no API Key required)

Step 1: Install dependencies

pip install pandas numpy requests matplotlib

Step 2: Run quick analysis

cd scripts
python decoupling_analyzer.py --quick

Step 3: Run full analysis (including visualization)

python decoupling_analyzer.py \
  --start 2022-06-01 \
  --output ../../output/decoupling_$(date +%Y-%m-%d).json

Step 4: Generate visualization charts (Bloomberg-style area chart)

python visualize_decoupling.py \
  --start 2022-06-01 \
  --output ../../output/credit_deposit_decoupling_$(date +%Y-%m-%d).png

Output example:

{
  "period": "2022-06 to 2026-01",
  "cumulative_changes": {
    "loans_billion_usd": 2070.5,
    "deposits_billion_usd": 506.8,
    "gap_billion_usd": 1563.7
  },
  "deposit_dynamics": {
    "max_drawdown_billion_usd": -1200.0,
    "max_drawdown_date": "2023-04-12",
    "recovery_from_trough_billion_usd": 1706.8,
    "recovery_ratio": 1.42
  },
  "assessment": {
    "decoupling_status": "severe",
    "deposit_stress_ratio": 0.755,
    "phase": "recovery_but_lagging"
  }
}

</quick_start>

  1. Quick check - View the latest credit-deposit decoupling status
  2. Full analysis - Run full analysis and generate visualization charts
  3. Methodology learning - Understand the accounting logic and macro significance of credit creation decoupling

Please select or directly provide analysis parameters.

After routing, execute the corresponding script and generate visualization charts.

Visualization output: Credit-deposit decoupling area chart

Adopting Bloomberg Intelligence style, Reference the native FRED chart design:

Chart Features:

  1. Area Chart: Clearly shows the volume of cumulative changes
  2. Blue Area: Cumulative change in loans (Loans & Leases)
  3. Red Area: Cumulative change in deposits (Deposits)
  4. 0 Axis Line: Clearly marks the baseline
  5. Value Annotations: The latest values are annotated on the right side of the chart

Color Scheme (Following Bloomberg Specifications):

  • Background:#1a1a2e(Dark Blue-Black)
  • Loans Area:#4a90d9(Blue)
  • Deposits Area:#d94a4a(Red)
  • Text:#ffffff(White)
  • Grid:#2d2d44(Dark Gray)

Quick Plot:

cd scripts
python visualize_decoupling.py \
  --start 2022-06-01 \
  --output ../../output/credit_deposit_decoupling_YYYY-MM-DD.png

Output Path:output/credit_deposit_decoupling_YYYY-MM-DD.png

Chart Interpretation:

  • The blue area continues to expand → banks continue to lend
  • The red area was once negative → absolute contraction in deposits (2022-2023)
  • The red area rebounds but lags behind the blue → decoupling persists

<input_schema>

</input_schema>

<output_schema> Complete Output Structure:

{
  "skill": "analyze_bank_credit_deposit_decoupling",
  "version": "2.0.0",
  "status": "success",
  "analysis_period": {
    "start": "2022-06-01",
    "end": "2026-01-07"
  },
  "data_sources": {
    "loans": {
      "series_id": "TOTLL",
      "url": "https://fred.stlouisfed.org/graph/fredgraph.csv?id=TOTLL"
    },
    "deposits": {
      "series_id": "DPSACBW027SBOG",
      "url": "https://fred.stlouisfed.org/graph/fredgraph.csv?id=DPSACBW027SBOG"
    }
  },
  "cumulative_changes": {
    "loans_billion_usd": 2070.5,
    "deposits_billion_usd": 506.8,
    "gap_billion_usd": 1563.7,
    "gap_trillion_usd": 1.56
  },
  "deposit_dynamics": {
    "max_drawdown_billion_usd": -1200.0,
    "max_drawdown_date": "2023-04-12",
    "current_vs_trough_billion_usd": 1706.8,
    "recovery_ratio": 1.42,
    "phase": "recovery_but_lagging"
  },
  "assessment": {
    "decoupling_status": "severe",
    "deposit_stress_ratio": 0.755,
    "interpretation": "每新增 $1 貸款,僅有 $0.24 形成存款"
  },
  "macro_implication": "銀行信貸與存款出現嚴重脫鉤..."
}

</output_schema>

<success_criteria> When the analysis is successful, it should produce:

  • Time series data for the two indicators: bank loans and deposits
  • Calculation of cumulative changes (starting from the base period)
  • Maximum Drawdown of deposits and its date
  • Deposit Recovery Ratio
  • Decoupling Gap and Deposit Stress Ratio
  • Bloomberg-style area chart(output/credit_deposit_decoupling_YYYY-MM-DD.png)
  • Actionable macro interpretation </success_criteria>

<scripts_index>

Script Command Purpose
decoupling_analyzer.py --quick Quickly check the latest signal
decoupling_analyzer.py --start DATE Full Analysis
visualize_decoupling.py --start DATE --output Generate a Bloomberg-style area chart
</scripts_index>