Data Science

Why demand models must be monotonic in price: A deep dive into model choice for markdown optimization

Understanding why prescriptive pricing models must respect the law of demand, and how this fundamental constraint shapes our choice between GLMs and machine learning approaches

Cyril Noirot
By Cyril NoirotMarch 15, 20255 min read
Share on

In markdown optimization and retail pricing, one of the fundamental modeling constraints is that predicted demand must be a monotonically decreasing function of price.

This principle—though often taken for granted—has profound implications for model selection, interpretability, and the economic validity of downstream optimization. In this post, I’ll unpack why monotonicity matters, what models satisfy this requirement, and why this constraint often rules out the use of black-box machine learning methods in prescriptive pricing systems.


1. The monotonicity requirement: economic rationale

At the core of every pricing model lies a simple economic intuition:

When price increases, demand should not increase.

Formally, this means that the expected demand function

d(p)=E[D∣P=p]d(p) = \mathbb{E}[D \mid P = p]

must satisfy

∂d(p)∂p≤0\frac{\partial d(p)}{\partial p} \leq 0

In plain terms, the predicted demand curve should either stay flat or decline as price rises. This ensures that the model respects the law of demand and allows for consistent estimation of price elasticity, which is central to optimization and decision-making.


2. Implications for model selection

This requirement—simple in theory—has strong implications for the types of predictive models we can use in markdown optimization or dynamic pricing systems.

Excluded models

Most non-parametric machine learning models (like Random Forests, Gradient Boosted Trees, or Neural Networks) are not inherently monotonic. They may fit training data very well but can produce local violations of economic intuition (e.g., predicting higher demand at higher prices).
Such models therefore fail to satisfy the prescriptive requirements for optimization under economic constraints.

While some ad-hoc fixes exist—such as monotonic gradient boosting or isotonic regression post-processing—these often fail to provide stable and interpretable elasticity estimates, which are crucial in marginal analysis and sensitivity testing.


3. Models that satisfy the monotonicity criterion

To respect the monotonicity constraint and yield interpretable parameters (like elasticity), I narrows suitable models to two main families:

3.1 Discrete choice models (MNL-based)

These models—derived from Random Utility Theory , express each product’s utility as a linear function of attributes (including price):

Ui=αi−βipi+ϵiU_i = \alpha_i - \beta_i p_i + \epsilon_i

where βi>0\beta_i > 0 ensures decreasing choice probability with higher prices.
Demand (market share) is then modeled via the Multinomial Logit (MNL) formulation:

si=eUi∑jeUjs_i = \frac{e^{U_i}}{\sum_j e^{U_j}}

Pros:

  • Captures substitution effects between items.
  • Ensures monotonic response to price.

Cons:

  • Requires estimation of a no-purchase option, which is often unobservable.
  • Computationally heavy for large assortments.

3.2 Generalized Linear Models (GLMs)

GLMs offer a balance between interpretability and analytic tractability. They model demand as a stochastic function of explanatory variables—price, seasonality, promotions—while ensuring the expected demand remains monotonic in price.

Log-Linear Model (Canonical Form)

ln⁡d(p,t)=α+γt−βp+ε\ln d(p, t) = \alpha + \gamma_t - \beta p + \varepsilon

where

  • d(p,t)d(p, t) = expected demand at price pp and time tt,
  • α\alpha = baseline intercept,
  • γt\gamma_t = time or seasonality effects,
  • β>0\beta > 0 = price sensitivity (elasticity parameter).

Exponentiating both sides yields the familiar multiplicative form:

d(p,t)=s(t) α e−βpd(p, t) = s(t) \, \alpha \, e^{-\beta p}

with s(t)s(t) capturing temporal scaling factors.

Poisson / Negative Binomial GLMs

When modeling count data (transactions, units sold), GLMs with Poisson or Negative Binomial distributions maintain the same structure, using a log-link to ensure positive predictions:

E[D∣p,X]=exp⁡(α+Xθ−βp)\mathbb{E}[D \mid p, X] = \exp(\alpha + X\theta - \beta p)

where XX includes covariates like promotions, holidays, or competitor prices.

These models provide:

  • Closed-form elasticity: εp=−βp\varepsilon_p = -\beta p.
  • Stable monotonicity by construction.
  • Compatibility with stochastic optimization frameworks.

4. Why monotonicity matters for prescriptive analytics

In prescriptive pricing systems—such as markdown optimization, revenue management, or dynamic pricing under uncertainty—the optimization engine often relies on differentiable and convex demand functions.

If the demand model violates monotonicity:

  • Elasticity signs become unstable.
  • Gradient-based solvers (for profit maximization) may fail to converge.
  • Simulated scenarios can produce economically implausible results.

Hence, enforcing monotonicity isn’t a modeling aesthetic—it’s a structural safeguard that ensures the resulting optimization problem remains well-posed and interpretable.


5. Summary

RequirementRationaleCompatible Models
Monotonic demand w.r.t. priceEnsures negative price elasticity and valid optimizationGLM (log-linear, Poisson, NB), MNL
Interpretable elasticityEnables marginal analysis and scenario simulationParametric only
Convexity / DifferentiabilityRequired for prescriptive optimization solversGLM, MNL
Non-violation of economic lawsMaintains credibility and interpretabilityExcludes tree-based and deep learning models

Final thoughts

In the world of pricing and revenue management, respecting economic structure often matters more than achieving the lowest MSE or MAPE.

While ensemble or deep learning models can capture complex nonlinearities, prescriptive tasks like markdown optimization demand interpretable, monotonic, and elastic models.

That’s why, even in the age of large-scale machine learning, Generalized Linear Models and MNL-based frameworks remain the backbone of industrial-grade pricing systems—bridging the gap between econometric theory and business decision-making.


Next Post: I’ll extend this discussion by showing how to incorporate parameter uncertainty into markdown optimization using Bayesian GLMs and stochastic programming.

Solutions

Try the mechanics

About the author

Cyril Noirot

Cyril Noirot

Lead Data Scientist

Freelance data scientist. I design and ship decision systems — forecasting, pricing, marketing measurement, optimization.

Newsletter

Technical writing on forecasting, pricing, and decision systems. No fixed schedule, no spam.

Enter your email
Subscribe