Adstock Methodology

Back to Dashboard

Technical documentation for data scientists, analytics leads, and methodology reviewers.

This document is intended for technical evaluation of Adstock's modeling methodology. For business-level interpretation of results, see the main dashboard.

1. Methodology Overview

Adstock uses a frequentist Marketing Mix Modeling (MMM) framework built on Ridge regression with geometric adstock transformations. The methodology follows the same foundational econometric approach used by Google's Meridian and Meta's Robyn, adapted for speed-to-insight and accessibility.

The model ingests daily time-series data of marketing spend and revenue, applies carryover (adstock) transformations to capture lagged advertising effects, and fits a regularized linear model with non-negativity constraints to decompose revenue into channel-level contributions.

2. Data Requirements

Deployment flexibility: Adstock can be deployed within a client's own cloud environment (Azure, GCP). Marketing data never needs to leave the client's infrastructure, satisfying enterprise security and data governance requirements.

3. Adstock Transformation (Carryover Effect)

Note: In the Adstock dashboard, adstock is referred to as “carryover” — a plain-English term for the same concept. The industry-standard term “adstock” is used throughout this methodology page for consistency with academic literature and frameworks like Google Meridian and Meta Robyn.

Advertising impact is not instantaneous. An ad exposure on day t can continue to influence consumer behavior on days t+1, t+2, ... with diminishing effect. The adstock transformation models this carryover using geometric decay:

x'[t] = x[t] + α · x'[t−1],   where α ∈ [0, 1)

Each adstocked column then enters the standardized feature matrix described in section 5, alongside the seasonality and trend controls described in section 4, before being passed to Ridge regression.

This is the industry-standard geometric adstock formulation used in both Google Meridian and Meta Robyn. See: Robyn Analyst's Guide, Google Meridian documentation.

4. Seasonality and Trend Controls

Marketing spend is rarely the only driver of revenue variation. Without explicit controls for time effects, the model can misattribute trend, weekly cycles, and annual seasonality to whichever marketing channel happens to correlate with them. v2 adds four control families to the design matrix that are estimated jointly with the marketing coefficients:

Fourier term: sin(2πk·t / P),   cos(2πk·t / P),   for k = 1…order

Fourier seasonality is the same approach used by Facebook's Prophet library and is standard practice for smooth periodic effects. Estimating these controls jointly with marketing features — rather than applying a pre-detrending step — lets the Ridge penalty arbitrate between competing explanations for any given week's revenue.

5. Feature Standardization

The Ridge L2 penalty λ∑jβj² treats every coefficient on the same scale. If one feature is measured in dollars (with values in the thousands) and another is a unit-bounded Fourier sine wave, the penalty effectively shrinks the dollar-scale coefficient much harder — not because that feature is less important, but because a coefficient producing the same revenue impact is much smaller in raw units. This is the classic scale-bias problem in regularized regression.

v2 corrects this by z-scoring every feature in the design matrix before fitting:

zj[t] = (xj[t] − μj) / σj

Ridge then sees features on a common scale, and the penalty is applied uniformly. After fitting, the standardized coefficients are back-transformed to original feature units so that contribution math (βj × xj[t]) and ROI calculations remain in spend dollars and revenue dollars:

βj(orig) = βj(std) / σj
β0(orig) = β0(std) − ∑j βj(std) · μj / σj

The intercept absorbs the mean shift so predictions are unchanged. End users see coefficients and contributions in the same units they always did; the standardization is a numerical-stability layer that lives entirely between adstock and Ridge.

6. Ridge Regression Model

Model Specification

Revenue = β₀ + β₁·Channel₁_adstocked + β₂·Channel₂_adstocked + … + βₙ·Channelₙ_adstocked + ε

Why Ridge over OLS

Marketing channels are frequently collinear — spend moves together during peak seasons, promotions, and campaign flights. Ordinary Least Squares (OLS) produces unstable, high-variance coefficient estimates in the presence of multicollinearity, often yielding negative coefficients or wildly inflated values. Ridge regularization shrinks unstable coefficients toward zero, producing more reliable and interpretable estimates.

See Google Meridian documentation and Meta Robyn Analyst's Guide for comparative discussion of regularization approaches in MMM.

7. Two-Stage Residualized Fit

The positivity constraint described in section 6 (βj ≥ 0) is appropriate for marketing features — we don't want the model claiming that spending money on Facebook destroyed revenue. But it is the wrong constraint for the trend and seasonality controls: a downward trend or a negative weekend coefficient is meaningful information that the model should be free to discover.

scikit-learn's Ridge applies positive=True to all coefficients or none. To allow positive-only marketing coefficients alongside unconstrained controls, v2 uses a two-stage residualized fit:

The two coefficient sets are then combined and back-transformed jointly to original units. This pattern — sometimes called residualization or partialling-out — is also used in Meta Robyn for the same reason.

Tradeoff

Marketing coefficients are estimated only on the signal that survives after the controls have absorbed everything they can. If a channel's spend pattern is strongly correlated with the trend or with annual seasonality, some of its true effect will be absorbed by the control terms in Stage 1, and Stage 2 will produce a downward-biased marketing coefficient. This is a known property of two-stage approaches and the reason a fully joint Bayesian fit (planned for v3) is preferred when computational budget allows.

8. Attribution and Revenue Decomposition

For each observation (day), total revenue is decomposed into the following components:

Predicted Revenue = β₀ + ∑j βj · Hill(x'j[t]; Kj, Sj) + Controls[t]

By explicitly framing seasonality as an exogenous structural control rather than an unexplained residual, Adstock ensures that cyclical surges (such as Q4 holiday spikes or weekend shopping lifts) are not misattributed to contemporaneous marketing spend or discarded into residual variance. The residual gap thus represents purely unmodeled variance after accounting for structural seasonality and marketing effects.

9. ROI Calculations & Budget Reallocation

10. Model Evaluation Metrics

Note: While r2_in_sample governs model evaluation thresholds, the main dashboard abstracts raw R² values into intuitive confidence badges and MAPE-based accuracy, ensuring executive stakeholders interpret reliability without statistical misinterpretation.

11. Lookback Window Analysis

12. Credibility and Industry Context

The foundational methodology — adstock transformation + regularized regression + positive constraints — is shared with Google's Meridian and Meta's Robyn, the two most widely adopted open-source MMM frameworks.

Key Difference from Google Meridian

Meridian uses a Bayesian hierarchical framework with geo-level partial pooling, prior specification on parameters, and posterior sampling via MCMC. This produces credible intervals on all estimates but requires significantly more computational resources and analyst expertise. Adstock uses a frequentist approach optimized for speed-to-insight and accessibility.

Key Difference from Meta Robyn

Robyn uses Nevergrad for multi-objective hyperparameter optimization, evaluating thousands of model candidates across a search space of adstock parameters, saturation curves, and regularization strengths. This produces a Pareto-optimal set of models but requires significant computational time and analyst judgment to select a final model. Adstock uses a single-model specification with analyst-validated parameters.

Structural Independence

As an independent measurement platform with no media inventory to sell, Adstock has no structural incentive to bias attribution toward any channel. This is a meaningful differentiator: Google and Meta's open-source MMM tools, while methodologically rigorous, are developed by organizations with inherent conflicts of interest as both media sellers and measurement providers.

Comparison to Enterprise MMM Vendors

For enterprise MMM vendors (Nielsen Marketing Cloud, Analytic Partners, Measured), engagements typically require 3–6 months and $200K–$500K+ annually. Adstock delivers comparable foundational methodology at a fraction of the cost and timeline.

13. Model Evaluation & Confidence Badges

Adstock translates econometrically rigorous parameter estimates into actionable, risk-managed reallocation decisions through canonical evaluation schemas and a standardized CMO confidence framework.

Canonical Evaluation Metrics

Three-Tier CMO Confidence Framework & Badges

To protect client capital from noisy point estimates, Adstock evaluates parameter stability across 5 overlapping 80% bootstrap subsample time folds. The resulting stability statistics map directly to five standardized badges across the dashboard:

High Confidence High Parameter Stability (CV < 0.40 and fold min > 0): Marketing signal is consistent and robust across all subsample time folds. Safe to scale spend proportionally up to the maximum allowable boundary (standard bounds, up to 150%–200% spend).
Moderate Confidence Moderate Signal Variation (0.40 ≤ CV < 0.60 and fold min > 0): Channel is profitable above breakeven, but estimation variance fluctuates across periods. Budget growth is capped at a strict +5% exploratory ceiling to safeguard capital while gathering further observations.
Needs Testing Insufficient Confidence / Hard Gate (fold min ≤ 0.0 or CV ≥ 0.60): The non-negativity constraint was actively binding or variance is unacceptably high. Real marketing lift vanished on certain time folds. The channel is subject to an absolute $0 budget expansion hard gate (spend held flat), prompting an empirical incrementality test before deploying expansion capital.
Unverified Missing Subsample Folds: New channels or datasets lacking sufficient historical depth to run bootstrap time folds default conservatively to 50% shrinkage and a +5% exploratory cap rather than failing open to unearned high confidence.
Trim Spend Sub-Breakeven Marginal Return (mROI < 1.00): Every additional dollar spent is losing money. Budget is reduced toward a 10% floor to harvest donor capital for reallocating into verified, high-return channels.

Active in Production

Targeted for Future Releases

Back to Dashboard

Methodology v2.1 | Last updated September 2026