Skip to content

Atri2-code/Merchant-Base-Analyzer-Revenue-Retention-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

merchant-analytics (Commercial Finance)

Contracted merchant base analysis — utilisation scoring, churn risk flagging, pricing opportunity identification, and renewal forecasting from a single CSV input.

Built to mirror the core workflow of a commercial finance analyst: interrogate the contracted base, surface risks and opportunities, and produce a clean report for stakeholder review.


Quick start

git clone https://github.com/YOUR_USERNAME/merchant-analytics.git
cd merchant-analytics
python src/analyze.py --input data/samples/merchants.csv --output reports/

No dependencies beyond the Python standard library.


What it produces

Console summary

merchant-analytics
────────────────────────────────────
  Merchants analysed :  15
  Total contract value: €1,071,000
  Avg utilisation    :  67.5%
  Unused value       :  €349,905
  High churn risk    :  4 merchants
  Expiring <90d      :  3 merchants
  Pricing opps       :  4 merchants

Markdown report sections

  • Executive summary — key metrics at a glance
  • High churn risk — low-utilisation merchants ranked by exposure
  • Pricing opportunities — merchants with discounts that no longer reflect usage
  • Contracts expiring within 90 days — renewal pipeline sorted by urgency
  • Full merchant base — complete ranked view with trend indicators

Input format

Standard CSV with one row per merchant:

merchant_id,name,segment,contract_value_eur,contract_start,contract_end,
avg_monthly_utilisation_pct,last_month_utilisation_pct,payment_volume_eur,
payment_success_rate,renewal_discount_pct,churn_risk
M001,Acme Retail,SMB,24000,2023-01-01,2025-01-01,72,65,1440,97.2,0,low

Scoring logic

Signal Derived metric
Avg vs last month utilisation util_trend: growing / stable / declining
Contract value × (1 − utilisation) unused_value_eur
Discount > 0 AND utilisation ≥ 80% pricing_opportunity
Contract end within 90 days expiring_soon

Project structure

merchant-analytics/
├── src/
│   └── analyze.py          # Load → enrich → score → report
├── data/samples/
│   └── merchants.csv       # Sample merchant base (15 merchants)
├── reports/                # Generated output (gitignored)
└── README.md

Skills demonstrated

Finance competency Implementation
Contracted base analysis Utilisation scoring per merchant
Risk identification Churn risk flagging with trend analysis
Pricing analysis Discount vs utilisation mismatch detection
Forecasting inputs Renewal pipeline with days-to-expiry
One source of truth Single CSV in → structured report out

Roadmap

  • Google Sheets integration for live data pull
  • Month-over-month utilisation trend charting
  • Segment-level P&L roll-up
  • Automated email digest for renewals due within 30 days

License

MIT

About

Contracted merchant base analysis tool built in Python. Scores utilisation trends, flags churn risk and pricing discount anomalies, surfaces the renewal pipeline, and generates a structured report — replicating the core workflow of a commercial finance analyst interrogating a recurring revenue base.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages