Dev.to WebDev 🛠 Dev 👁 0 📖 4 min read

When Will This Deal Come Back? Modeling Price Cycles from Historical Data

Every deal site can tell you a price dropped. The harder question — the one shoppers actually ask — is when it will drop again. A $39.97 Oral-B Pro 1000 on November 6, back to $49.94 a week later: is that a price to wait

Every deal site can tell you a price dropped. The harder question — the one shoppers actually ask — is when it will drop again. A $39.97 Oral-B Pro 1000 on November 6, back to $49.94 a week later: is that a price to wait for, or a one-off that will not repeat before Christmas? Answering that well takes more than a price history chart. It takes a model of how prices cycle.

What the raw data actually looks like

On Savlume we log price observations the same way we verify them: each observation carries a timestamp, a retailer, a price, and a verification status (retailer-verified or source-reported). A typical product accumulates a handful of observations a week, not a continuous stream. That sparsity is the first design constraint. Any model that assumes hourly data will starve; the model has to work with sparse, irregularly spaced points and be honest about the gaps.

The second constraint is that prices are not a random walk. Retailers move prices in steps: long flat stretches at a regular price, punctuated by short promotional dips. The pattern that repeats across our catalog is a flat line, a dip of 15–30% lasting days to a couple of weeks, then a return to the flat line. The signal is in the timing of the dips, not in the noise between them.

Four features that predict a return

  1. Time since the last dip, against that product's own history. Some products dip every three weeks; some dip twice a year. The single most predictive feature we have found is the product's own dip interval, not the category average. A toothbrush that dipped in late October and again on November 6 has a short cycle; a robot vacuum that dipped once in six months does not. The model should learn per-product intervals and widen its confidence band when the history is thin — a product with one dip in its history gets a wide "maybe" window, not a fake-precise date.

  2. The calendar. Promotional dips cluster hard around retail events: Prime Day, Black Friday week, end-of-quarter clearances. A dip that happened during Black Friday week is more likely to repeat at the next event than on a random Tuesday. Encoding "days to the next known retail event" as a feature captures most of this, and it is cheap to compute. The trap is overfitting to last year's calendar: events move, and a model that memorized "November 6" instead of "the week before Black Friday" will be wrong the year the calendar shifts.

  3. The depth of the last dip. Deep dips (30% or more) repeat less often than shallow ones. A retailer that cut a $59.99 brush to $39.97 — a 33% cut — is unlikely to do it again next week; the margin cost is too high. Shallow 10–15% dips, by contrast, recur frequently and are often just a coupon or a Lightning-style promotion. Depth is a proxy for how expensive the promotion was for the retailer, and expensive promotions are rarer.

  4. Stock and listing churn. A listing that keeps changing sellers, or that disappears and reappears, is a weak candidate for a clean repeat: the "deal" may have been one seller clearing stock, not the retailer repricing. We treat seller changes and listing gaps as a discount on the prediction confidence, not as features with a sign of their own — the data is too sparse to say more than "less certain."

How to present the prediction without lying

The output of this model should never be a date. A date implies a precision the data does not support, and a wrong date is worse than no prediction — it is exactly the kind of false claim that gets a deal site flagged for misrepresentation.

What we ship instead is a band and a basis:

  • "Likely to return within 2–4 weeks" — when the product's own history shows a short cycle and the next retail event falls inside that window.
  • "No pattern yet" — when the history is one dip or less. This is a valid answer and the honest one.
  • The last deal price, with its date. "$39.97 on Nov 6" is a fact; "wait for $39.97" is advice built on a stated basis. Keeping the two visibly separate is what makes the advice trustworthy.

Every prediction also carries its verification status. A price the model is reasoning about that was source-reported rather than retailer-verified gets flagged in the output, because a predicted return of a price that was never confirmed is doubly uncertain.

What we do not model

We do not model competitor-driven repricing — one retailer cutting a price because another did — because we do not have reliable cross-retailer causality in our data, and guessing at it would produce confident-sounding nonsense. We do not model inventory levels directly, because retailers do not publish them reliably. And we do not predict prices for products with no deal history at all: a product that has never dipped has no cycle to model, and saying so is better than inventing one.

The honest version of "when will this deal come back" is a distribution with wide bands, a stated basis, and a willingness to say "we don't know yet." Shoppers can work with that. What they cannot work with is a precise date that turns out to be fiction.

Savlume tracks real prices against retailer pages and labels every price retailer-verified or source-reported. More on how we verify prices: https://savlume.com/

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.