Financial Calculations & Valuation Beginner

MSME Classification (Micro, Small, Medium) & Export Turnover Exclusion Checker in Python

Classify enterprises into Micro, Small, or Medium (MSME) in Python based on composite Plant & Machinery investment and net turnover (excluding export turnover).

#pandas

Problem Statement

Priority Sector Lending (PSL) classification and MSME credit guarantee (CGTMSE) eligibility depend on the composite criteria of Net Plant & Machinery Investment and Net Domestic Turnover (after deducting Export Turnover).

Formula / Core Logic

Net_Turnover = Total_Turnover - Export_Turnover Micro: Inv <= 1Cr & Turn <= 5Cr Small: Inv <= 10Cr & Turn <= 50Cr Medium: Inv <= 50Cr & Turn <= 250Cr

Installation

pip install pandas
msme-classification-composite-investment-turnover-checker-python.py
def classify_msme_enterprise(plant_machinery_cr, total_turnover_cr, export_turnover_cr=0.0):
    net_turnover_cr = max(0.0, total_turnover_cr - export_turnover_cr)
    
    if plant_machinery_cr <= 1.0 and net_turnover_cr <= 5.0:
        category = 'MICRO_ENTERPRISE'
    elif plant_machinery_cr <= 10.0 and net_turnover_cr <= 50.0:
        category = 'SMALL_ENTERPRISE'
    elif plant_machinery_cr <= 50.0 and net_turnover_cr <= 250.0:
        category = 'MEDIUM_ENTERPRISE'
    else:
        category = 'LARGE_CORPORATE (Non-MSME)'
        
    return {
        'Net_Plant_Machinery_Cr': round(plant_machinery_cr, 2),
        'Net_Qualifying_Turnover_Cr': round(net_turnover_cr, 2),
        'MSME_Classification': category,
        'PSL_Eligible': category != 'LARGE_CORPORATE (Non-MSME)'
    }

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 happens if an enterprise crosses the Investment limit for Micro but stays within the Turnover limit?

Under the composite criteria, crossing EITHER the investment ceiling OR the net turnover ceiling moves the unit to the next higher category.