Skip to main content
Izrotech Logo

Hysteresis: Stock and Price Thresholds That Don't Flap

Learn how to stop a repricer flapping prices and stock: deadbands for price changes, separate on and off stock levels, and the rule that overrides both.

Izrotech

A repricer that reacts to every change in a supplier's price or stock looks diligent and behaves badly. Suppliers' prices wobble by a few cents, and stock counts bounce between one and three units as orders and restocks cross. React to each wobble and the listing changes price every check, goes out of stock and back several times a day, and burns through marketplace API calls doing it. Buyers see a price that will not sit still, and a listing that keeps disappearing. The engineering answer is an old one from control systems: hysteresis.

The problem, in numbers

Take a supplier whose price alternates between 24.99 and 25.09 on every two-hourly check for three days. With a profit rule of 5.00 over cost, a 0.40 fixed fee and a 13.6% fee, the listing price needed is 35.18 at one cost and 35.29 at the other. A repricer that pushes every change sends 35 updates of pure noise in those three days, and when the supplier really moves to 27.50 on the 37th check, that change is just the 36th update, indistinguishable from the rest.

Deadbands for prices

A deadband says: ignore a change smaller than some amount. With a 0.50 minimum price change, the 11-cent wobble never reaches the marketplace, and the only update in the same three days is the real move from 35.18 to 38.08: one update instead of 36.

Two details make a deadband safe rather than merely quiet:

  • Measure against the price that is live, not the last price you computed. Otherwise a slow drift of 0.10 per check never crosses the band, and the live price falls further and further behind.
  • Let losses override it. If the live price no longer covers cost and fees, the listing must be raised now, however small the change. A deadband exists to save noise, not to sell at a loss. DS Repricer, which Izrotech is building, works this way: a price that would sell at a loss is always raised to the target, whatever the minimum change and the allow-increase setting say.

Separate on and off levels for stock

Stock needs a different shape of rule. Here is a supplier's unit count over 18 checks:

3, 2, 1, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 2, 3, 5, 6, 5
  • Hold only at zero: the listing goes out of stock once and comes back once, 2 changes. But it stays live at one unit, where the last unit is often already sold.
  • Hold at 2 or fewer: safer, but the count keeps crossing that one line, and the listing flips 4 times.
  • Hold at 2 or fewer, restore only at 5 or more: the listing goes off once at the first dip and comes back once when stock is genuinely healthy, 2 changes, and it is never live on its last unit.

That last rule is hysteresis: two thresholds with a gap between them, so a value hovering near one line cannot keep toggling the state. The width of the gap is the trade-off: wider means fewer flips, but a listing that stays held a little longer after stock recovers.

DS Repricer, as it is planned for launch, has the first half of this: a minimum supplier quantity at or below which a listing is treated as out of stock and its eBay quantity set to zero. A separate, higher restore level is the refinement described here; it is a design we recommend, not a feature we are claiming.

Time as a second axis

Thresholds on value are one tool. Thresholds on time are another:

  • Require two consecutive observations before acting on a change that is not urgent. A single odd reading, such as a supplier page that briefly shows no offer, should not end a listing.
  • Count days out of stock. A listing that has been held for weeks is a different problem from one held for an hour, and deserves review rather than another automatic restore. DS Repricer tracks the days each listing has been out of stock for exactly this.

Do not apply a time delay to the urgent direction. Going out of stock and losing money are both things to act on at the first reading; it is coming back and getting cheaper that can wait for confirmation.

Picking the numbers

There is no universal setting, but there is a way to choose:

  • Price deadband: larger than the supplier's normal day-to-day noise, smaller than a change that matters to your margin. Looking at a week of a supplier's price history usually makes the noise level obvious.
  • Stock hold level: about the number of units that can sell between two checks. If you sell two a day and check every two hours, holding at one or two units is plenty.
  • Stock restore level: a few units above the hold level, so a restock has to be real before the listing returns.

Finally, log every decision with the value that triggered it. When a seller asks why a listing changed, or did not, the answer should be a line in a history table, not a guess. The fee side of every price these rules produce can be checked in the eBay Fees Calculator, and the pricing formula they feed is set out with worked numbers on DS Repricer's how it works page.