Explanatory Variables (Features): Definition and Role in Pricing

On this page

Does your forecasting model take your prices and promotions into account?

Let's plan an exchangeDiscover our sales forecasting software
Definition

Explanatory variables—known as “features” in data science—are the pieces of information provided to a model to predict an outcome: price, promotions, schedule, product characteristics, and events. They are added to the sales history. In pricing, the price must be included; otherwise, the model cannot simulate the effect of a price change.

The Essentials

  • An explanatory variable is a piece of information that the model uses to make predictions, in addition to past sales.
  • Without taking price and promotion into account, a model confuses underlying demand with the effect of a marketing campaign.
  • A variable is useful only if its value is known at the time the forecast is calculated.

In 6 Questions

What?

Information that helps the model make predictions.

Who is it for?

Data scientists, pricing managers, and sales teams who have the information.

When?

From the model's initial construction, and then with each subsequent update.

Where?

In the data on rates, promotions, the calendar, and the catalog.

Why?

Explain sales based on their causes, not just on their trend line.

How?

By selecting reliable data that is known in advance.

What explanatory variables can be used to forecast sales?

Useful variables can be grouped into several categories. Not all of them are necessary in every situation.

FamilyExamplesWhat it offers
Prices and PromotionsSelling price, discount rate, promotionThe Impact of Business Decisions
CalendarDays of the week, holidays, vacations, salesRepeating Rhythms
ProductFamily, brand, format, ageWhat Similar Products Have in Common
Retail locationArea, zone, customer typeLocal Differences
Recent SalesSales from the previous day, average for the past few weeksThe current level and momentum
External FactorsWeather, local events, competitors' pricesWhat Does Not Depend on the Brand

Recent sales variables are calculated based on the product's time series. They are sensitive to unusual days, which should be flagged.

External factors require the most work. Our article on exogenous events in sales forecasting explains which ones are worth the effort.

Why Price and Promotion Must Be Part of It

A model that ignores price sees a rise in sales without knowing the cause.

Without any mention of a promotion, it receives the same description for a regular week and for a week with a 30% discount. It concludes that underlying demand is higher than it actually is.

The issue goes beyond accuracy. A model that has never been given the input price cannot answer the central question of price modeling: What happens if I change this price?

That is what distinguishes a forecast that simply extends the past from machine learning that is useful for decision-making.

The Availability Rule

A variable may improve a model on paper but cause it to perform worse in practice.

The question to ask for each variable: Does this information exist, in this form, at the time the forecast is calculated?

The actual price paid—including discounts and loyalty benefits—is not known until after the sale. Before that, only the expected price is available. Training a model on the former and feeding it the latter skews the results.

This flaw has a name— data leakage—and can be identified through a carefully designed backtest.

More variables aren't always better

Every variable added comes at a cost: collection, verification, maintenance, and explanation.

  • Noise: an unreliable or redundant variable that obscures the signal rather than enriching it.
  • Fragility: If a source is interrupted, the model that depends on it breaks down without warning.
  • Readability: Twenty factors are harder to justify than five, which complicatesexplainable AI.
  • On-the-ground knowledge: The best variables often come from the teams, who are familiar with closures, construction projects, or local events.

Our belief is that the quality of the variables matters more than their number—and more than the choice of algorithm. This is the conclusion of our article on data quality, the “glass ceiling” of AI in pricing.

Our AI-powered sales forecast begins with this collaboration with your teams: what information they already use to make decisions, and what information is available in a timely manner.

Among this data, the lagged variables and moving averages provide an overview of recent sales of the product.

See also in the glossary:global model · unconstrained demand · ARIMA and exponential smoothing · temporal validation

Frequently Asked Questions

Short answers to the most frequently asked questions about explanatory variables.

What is an explanatory variable?

An explanatory variable is a piece of information provided to a model to help it predict an outcome. For a sales forecast, these might include, for example, price, the presence of a promotion, the day of the week, or the weather. The model learns, based on past data, how each of these factors affects sales. Data scientists also refer to these as features, predictors, or regressors. Without explanatory variables, a model can only extend the trend line of past sales.

What is the difference between an explanatory variable and a target variable?

The target variable is what we are trying to predict: sales volume, revenue, or the probability of a stockout. The explanatory variables are the information we have available to make that prediction. The model learns the relationship between the explanatory variables and the target variable. The same piece of data can play different roles depending on the question being asked: price is an explanatory variable when forecasting sales, and becomes the decision to optimize when determining the best price.

What is feature engineering?

Feature engineering refers to the process of preparing explanatory variables: selecting useful information, cleaning it, and transforming it so that the model can use it. Examples include converting a date into a day of the week, calculating the discount percentage based on two prices, or counting the number of days since the last price change. This is the stage where domain knowledge matters most, as it determines which information is worth feeding into the model.

What variables should be used to forecast sales?

There are generally six categories. Price and promotions, including the discount level and the type of promotion. The calendar, including holidays, vacation periods, and sales events. Product characteristics, such as product category, brand, or format. Point-of-sale characteristics, such as size or location. Recent sales of the product itself. And external factors, such as the weather or competitors’ prices, when they are available in a timely manner.

How many variables should be included in a model?

As much as necessary, and no more. Each additional variable must be collected, validated, and maintained over time. Redundant or unreliable variables introduce noise and make the model harder to explain. A sound approach is to start with a small set of variables—price, promotions, timing, and recent sales—and then add a variable only if it measurably improves the forecast over a test period and if it will be available on an ongoing basis.

Is the weather a useful variable?

This is true for certain categories and over certain time horizons. Beverages, ice cream, gardening, and seasonal textiles are clearly affected by temperature. But a variable is only useful if its value is known at the time of forecasting. For forecasts a few days out, we have reliable weather data. For forecasts several weeks out, we can only rely on seasonal averages, which the calendar already accounts for. Using actual observed weather data to train the model, and then relying on uncertain forecasts once the model is in operation, degrades the results.

How can you tell which variables are significant in a forecast?

Explanatory methods measure the contribution of each variable. The importance of the variables indicates what generally matters to the model. Other approaches break down, for an accurate forecast, the contribution of price, promotions, or timing. These analyses help verify that the model is based on factors that are plausible for the industry. An unexpected variable that dominates all others is a red flag: it may contain information that will not be available under real-world conditions.

Key Takeaways

  • Explanatory variables are the information provided to the model in addition to past sales data.
  • The price and promotion must be included in order to simulate a rate change.
  • A variable is meaningful only if it is known in advance, reliable, and consistent over time.

Would you like to know what data actually powers your forecasts?

Booper works with your teams to identify useful and timely information before building its forecasts.

Let's talk about your data →Discover our sales forecasting software

These articles can
interest you

This is some text inside a div block.
Booper illustration: an exogenous event (weather, calendar) affecting a forecast curve
External Events: How to Incorporate Them into a Sales Forecast

An exogenous event (weather, calendar, trend, competitor’s action) affects demand without appearing in the historical data. Not all of these events warrant inclusion in the model: their weight varies depending on the category and season.

Our position: An exogenous factor is only meaningful if it influences a decision—often a price. We use weather forecasts for the short term, adjust for movable holidays before making comparisons, and monitor trends and competitors.

August 20, 2026
Read the article →
This is some text inside a div block.
Impact of Data Quality on the Reliability of an AI Pricing Model
Data Quality: The Real Glass Ceiling in AI Pricing

AI is only as good as the data it’s fed, and a more powerful model trained on poor-quality data produces more convincing errors. Obvious errors are easy to spot; it’s the plausible errors—such as a purchase cost that’s off by a few percent—that erode the margin.

Waiting for perfect data is another way to fail. A broken data model is fixed before configuration; the rest is made reliable through use, starting with the data points that drive sales, with a manager assigned to each type of data.

August 21, 2026
Read the article →
This is some text inside a div block.
AI-Driven Sales Forecasting: Methodology and KPIs
Sales Forecasting Method: Data, MAPE, and KPIs

AI-based sales forecasting estimates demand for each product, store by store, by separating baseline demand from promotional demand. AI takes in more data points than a spreadsheet, but its value lies solely in the decisions it helps inform.

In retail, this decision is primarily about pricing or a promotion. A useful pricing forecast—one that estimates how much will be sold at each considered price—is evaluated based on its bias rather than its MAPE, and is validated against control stores.

May 31, 2026
Read the article →
Want to discuss your pricing strategy?
30 minutes with our teams, with no obligation.
Request an exchange