Financial Calculations & Valuation Intermediate

CAMELS Bank & NBFC Fundamental Financial Analyzer (CAR, GNPA, NIM, CASA, ROE) in Python

Evaluate banking and NBFC stocks in Python using the regulatory CAMELS framework (Capital Adequacy CRAR, Asset Quality GNPA/NNPA, NIM, ROA, and Liquidity).

#pandas#numpy

Problem Statement

Standard corporate metrics like Current Ratio, EV/EBITDA, or Altman Z-Score fail completely on banks and NBFCs. Evaluating financial institutions requires scoring Capital Adequacy (CRAR), Net Interest Margin (NIM), GNPA/NNPA, Provision Coverage Ratio (PCR), and Cost-to-Income.

Formula / Core Logic

NIM = (Interest_Earned - Interest_Expended) / Avg_Earning_Assets PCR = Total_Provisions / Gross_NPA Composite score weights Capital, Asset Quality, Efficiency, Earnings, and CASA Liquidity.

Installation

pip install pandas numpy
camels-bank-nbfc-financial-rating-analyzer-python.py
def evaluate_bank_camels(crar_pct, tier1_pct, gnpa_pct, nnpa_pct, pcr_pct, cost_to_income_pct, roa_pct, nim_pct, casa_pct):
    score = 0
    score += 20 if crar_pct >= 15.0 else (12 if crar_pct >= 12.0 else 5)
    score += 25 if nnpa_pct <= 0.8 and pcr_pct >= 70.0 else (15 if nnpa_pct <= 1.5 else 5)
    score += 15 if cost_to_income_pct <= 45.0 else (10 if cost_to_income_pct <= 52.0 else 4)
    score += 25 if roa_pct >= 1.5 and nim_pct >= 3.8 else (15 if roa_pct >= 1.0 else 5)
    score += 15 if casa_pct >= 42.0 else (10 if casa_pct >= 30.0 else 5)
    
    grade = 'TIER_1_FORTRESS_BANK' if score >= 85 else ('STABLE_LENDER' if score >= 65 else 'ASSET_QUALITY_WATCH')
    return {'CAMELS_Composite_Score': score, 'Institution_Grade': grade}

Get the Complete 100+ Python Quant & Automation Bundle

Instant lifetime access to all production-ready scripts, valuation models, and trading bots ($19).

Buy Full Bundle on Gumroad ($19) →

Frequently Asked Questions

Q: What ROA (Return on Assets) is considered strong for an Indian bank?

An annualized Return on Assets (ROA) above 1.50% combined with Net NPA below 0.80% indicates top-decile underwriting and profitability.