Return to capability board
EY (Ernst & Young)

Data Analytics Intern

EY (Ernst & Young)·Jul 2025 to Sep 2025 (2 mos)·Industry·Tech Consulting (CNS - TC - AI & Data)
Tools:PythonFastAPIXGBoostLightGBMStreamlitPandasScikit-Learn
Domain
Professional

01 // CONTEXT & PROBLEM

Cash Flow & Multi-Target Forecasting

Who hurts:Commercial Planning & Finance Teams

Forecasting operating cash flow for European beverage distribution required tracking three related numbers: sales revenue, cost of goods sold, and sales volume in litres. Commercial teams needed forward-looking estimates that accounted for promotional calendars and seasonal shifts, paired with standard financial ratios to evaluate margins.

Core Bottlenecks

Revenue projections alone cannot approximate operating cash flow without paired cost and volume estimates
Promotional events and holiday periods create non-linear demand shifts that basic moving averages miss
Reporting dashboards needed a single API that returns both raw daily predictions and derived business metrics

02 // ACTIONS & OUTCOMES

Technical Deliverables

Deliverable 01
Tri-target pipeline

Action:Built the sales volume ML pipeline using XGBoost with lag features (1, 7, and 30 days), 7-day moving averages, and cyclical calendar transforms

Result:Added volume forecasting to existing sales and cost models, completing the tri-target prediction pipeline

Tools / Stack:Python, XGBoost, Scikit-Learn

Deliverable 02
13 KPIs

Action:Implemented 13 business KPIs in Python, covering gross profit margin, ASP per litre, COGS per litre, marketing spend ratio, and promo lift

Result:Converted raw model predictions into unit-level financial metrics for commercial evaluation

Tools / Stack:Python, Pandas, NumPy

Deliverable 03
5 REST endpoints

Action:Developed a FastAPI service with endpoints for basic forecasts, comprehensive segment summaries, and standalone KPI calculations

Result:Provided structured JSON responses for daily projections, holiday lifts, and model health checks

Tools / Stack:FastAPI, Pydantic, Uvicorn

Deliverable 04
0.87 Top R²

Action:Created automated holdout and rolling-window testing scripts that calculate MAE, RMSE, MAPE, and R², exporting results to Excel

Result:Benchmarked LightGBM (0.87 R²), XGBoost (0.85 R²), and Random Forest (0.82 R²) across segments

Tools / Stack:OpenPyXL, Scikit-Learn, Plotly

03 // PERFORMANCE & IMPACT

Evaluation Metrics

Model performance and deliverable metrics documented in the project report.

Top Model Fit (R²)

0

LightGBM regressor on European sales test data (XGBoost reached 0.85)

Business KPIs

0

Gross profit, ASP, COGS per litre, marketing ratio, and operating cash flow proxy

Forecast Targets

0

Net sales revenue, COGS, and sales volume in litres

* Evaluated on out-of-sample holdout test splits and verified in the internship technical report.

04 // ARCHITECTURAL TRADEOFFS

Engineering Decisions

Chose: LightGBM and XGBoost regressorsoverRecurrent neural networks / LSTMs

Rationale: Tabular sales data with calendar and lag features trained reliably and reached high accuracy on moderate sample sizes without the tuning overhead of deep models.

Resulting Impact: Training completed in 45 to 120 seconds with consistent performance across product categories.

Chose: FastAPI REST APIoverOffline batch script runs

Rationale: Exposing endpoints for basic and comprehensive forecasts allowed the Streamlit dashboard to request ad-hoc scenarios on demand.

Resulting Impact: Separated model inference and KPI calculation from the presentation interface.

05 // TAKEAWAY

What Stuck

What Was Investigated

How to structure forecasting pipelines so model outputs translate directly into standard financial metrics.

What Was Found

In commercial planning, predicting top-line revenue is not enough on its own. Teams need unit costs, volume, and derived margins before a forecast is actionable.

Core Takeaway

“Clean API schemas and deterministic KPI calculations matter just as much as model accuracy when building tools for finance and operations teams.”