Retail Sales Portfolio Analysis
Reproducible Python pipeline over 150,000 retail transactions: input checks, financial reconciliation, segment analysis, an executive PDF report and an Excel dashboard.
Problem
Where is revenue at risk, which customers matter most, and what actions does the available evidence actually support?
How it works
Source extract
150,000 transaction records kept immutable in data/.
Approach
A pipeline that validates the data contract, defines metrics explicitly (reported sales, return exposure, return-adjusted sales), checks effect size with Cramér’s V before reading anything into small segment differences, and exports tables, a report and a dashboard.
Testing and verification
- I re-ran src/retail_portfolio_pipeline.py in October 2026. It rebuilt the ten analysis tables and reproduced the $735.0K and 8.1% return figures.
Results
- Returns represent $735.0K, or 8.1% of reported sales.
- High-frequency customers generate 35.1% of return-adjusted sales.
- Coupon users differ from other customers by only $0.16 in average order value, so the report avoids implying a causal effect.
- 10.0% of ratings are missing, and the report recommends monitoring coverage instead of imputing them.
Limitations and next steps
- The data cannot establish margin impact, the root cause of returns, or causal coupon lift without additional fields and an experimental design.