Practical Approaches to Optimizing Budget in Marketing Mix Modeling

Slava Kisilevich28 Feb 2023

Problem

A marketing team has one budget and several channels: TV, out-of-home, print, Facebook and search. Each extra unit of spend brings less revenue than the previous one, and the diminishing returns differ by channel. Splitting it by habit leaves revenue unused.

A marketing mix model (MMM) gives each channel's response curve, but turning it into a recommended spend per channel is a separate step.

Example from the article: 208 weeks of revenue (2015-11-23 to 2019-11-11) and five paid channels, each allowed to move ±20% around its average spend.

Solution in brief

Fit an MMM with adstock, Hill saturation and ridge regression, then run a constrained optimizer (scipy, SLSQP) that maximizes total response at a fixed total budget with per-channel bounds. The objective is either the saturation curves alone or the full trained model, which also uses trend, seasonality and controls and can plan a future period.

Questions this case answers
  • How to allocate a fixed budget across several diminishing-return channels so that the modeled total response is maximal, when only aggregated weekly spend and outcome series exist
  • How to fit a regularized regression with saturating inputs so that the coefficients of the spend inputs stay positive when the library offers no sign constraint
  • How to split a fixed marketing budget across media channels to maximize the predicted response?
  • How to turn fitted saturation curves into a recommended spend per channel?

Tools and methods

  • Adstock transformation — carries the decaying effect of advertising into later weeks (decay 0<α<1).
  • Hill saturation transformation — models diminishing returns with a slope s>0 and a half-saturation point 0<k≤1.
  • Ridge regression (scikit-learn) — estimates media coefficients, checked by time-based cross-validation.
  • Optuna — tunes adstock and saturation parameters.
  • Prophet — removes trend, seasonality and holidays from revenue first.
  • SciPy optimize.minimize (SLSQP) — finds spend per channel under a fixed total budget.
Continue reading — it's free

Google or a one-time email code. No password.