Built a raw-material price forecasting model and a market analysis dashboard to support purchasing decisions as part of an AI master plan PoC.
Context
- Built a model and dashboard to forecast the price of a key raw material that LOTTE Fine Chemical purchases, as a PoC within its AI master plan.
Problem
- Purchasing staff relied on their experience to review supplier quotes and had no objective benchmark for a fair price.
- The existing forecast used a few fixed variables and missed external drivers, trends, and recurring cycles such as seasonality.
- Purchasing costs rose because buyers had no forecast to guide inventory decisions such as stocking up before prices rose.
My role
- Led the work end to end in a team of three, framing the business need as an ML problem, designing experiments, and building the models, pipeline, and dashboard.
Approach
- Set baselines first and agreed with the client on what counts as improvement. Targeted a MAPE of 10% or less for forecasts 1–4 weeks and 1–3 months ahead and compared them with the rule-based method.
- Reframed the time series as supervised regression with lag features, screening about 150 candidate attributes from sources with different update cycles.
- Ran independent experiments along seven axes, including feature selection, lags, direct vs. recursive forecasting, price vs. price-change targets, and models.
- Built a four-page dashboard where business users upload data, retrain models, and see SHAP-based drivers and Bollinger bands.
Experiment results
Scroll sideways to see the whole diagram
Final comparison on one test window. Δ: the model predicts the price change instead of the price.
| Configuration | MAPE | feature selection | lag features | price-change target | recursive forecasting | retraining | target interpolation |
|---|---|---|---|---|---|---|---|
| Persistence | 5.9% | rule, no model | |||||
| Linter-price rule | 9.7% | rule, no model | |||||
| Linear Regression | 13.3% | not used | not used | not used | not used | not used | not used |
| Random Forest | 6.3% | used | used | not used | used | used | not used |
| XGBoost | 7.0% | used | used | not used | used | used | not used |
| Random Forest, Δ | 2.5% | used | used | used | used | used | used |
| XGBoost, Δ | 1.3% | used | used | used | used | used | used |
Key decisions
| Decision | Why | Trade-off |
|---|---|---|
| Supervised regression over deep sequence models | With a short history, tree ensembles on lag features were more stable than deep learning. | The lag design limits which long-range dependencies the model can capture. |
| Benchmark before models | The team and the client agreed up front to measure improvement against persistence, a cotton-linter price rule, and linear regression. | Modeling started about two weeks later. |
| Seven independent experiment axes | Comparing one axis at a time instead of every combination showed why each part of the model configuration was chosen. | Testing one axis at a time left interactions between axes untested. |
Architecture
Scroll sideways to see the whole diagram
Components
- ~150 attributes: Raw-material prices, cotton, linter, viscose (External data); Cotton market, USDA (External data); Macro indicators, FRED: FX, SCFI, CPI (External data); Climate, NASA (External data)
- Training pipeline: Build dataset, merge, resample (Pipeline step); Lag features, X(t−2…t)→y(t+1…3) (Pipeline step); Preprocess, interpolate, scale (Pipeline step); Forecast model, XGBoost, RF, LR (Forecast model); Evaluate, MAE, RMSE, MAPE; Meets target?, MAPE ≤ 10%
- Dashboard for business users: Upload, data files; EDA, variable analysis; Training, settings, retrain; Dashboard, forecast, SHAP
Connections
- ~150 attributes to Build dataset
- Build dataset to Lag features
- Lag features to Preprocess
- Preprocess to Forecast model
- Forecast model to Evaluate
- Evaluate to Meets target?
- Meets target? back to Build dataset
- Meets target? to Dashboard
- Upload to Build dataset
- Upload to EDA
- EDA to Training
- Training to Dashboard
Service flow
Scroll sideways to see the whole diagram
Components
- Purchase plan, monthly revision; Quote request, quarterly; Quote review (Changed step); Adjust & confirm; Purchase order
- Quote review with forecasts: Raw-material prices, cotton, linter, viscose (Data source); Market and macro, USDA, FRED, SCFI (Data source); Climate, NASA (Data source); Forecast model, XGBoost (Δ price) (Forecast model); Forecasts and drivers, 1–4 wk, 1–3 mo, SHAP
Connections
- Purchase plan to Quote request
- Quote request to Quote review
- Quote review to Adjust & confirm
- Adjust & confirm to Purchase order
- Quote review to Forecast model
- Raw-material prices to Forecast model
- Market and macro to Forecast model
- Climate to Forecast model
- Forecast model to Forecasts and drivers
- Forecasts and drivers to Adjust & confirm
Outcome
- Cut forecast error (MAPE) from 5.9% with the rule-based method to 1.3%, well below the target ceiling of 10%.
- Moved from a single-point estimate to multi-horizon forecasts, 1–4 weeks and 1–3 months ahead.
- Shifted retraining and deployment from data scientists to business users, and put the forecasting model to use in quote reviews.