2024-2025

Seasonality Compensator in oRTB

Intra Day and Inter Day Seasonality in oRTB

On the surface, pacing a daily budget in programmatic advertising looks simple: spend this much money, smoothly, over 24 hours. Under the hood, it’s either a reinforcement learning or a control problem running inside a highly dynamic system: user activity, auction pressure, and conversion rates all change over time, often in predictable patterns.

This is where seasonality compensation project comes in. This model translates a daily budget into a sequence of intra-day budget grants—small spend targets for each control interval (for example, every x minutes). Those grants act as a reference signal or trajectory for the spend control system:

  • If observed spend in a given interval is below the grant, the controller increases pacing pressure (in layman’s terms, increases bid prices) to win more impressions.
  • If observed spend is above the grant, the controller backs off (reduces bid prices) to avoid over-delivery.

Instead of thinking “I want to spend $X per day,” the system now thinks “I want to spend $uᵣ(tₖ) between tₖ and tₖ₊₁,” where each grant is aligned to a server-side reference time. That structure allows the platform to make fine-grained, controlled adjustments throughout the day.

From a business perspective, seasonality compensation is the quiet brain that makes the difference between:

  • Chaotic pacing that overspends early and starves later, and
  • Stable, predictable delivery with healthy performance and fewer surprises.

To add more complexity, advertisers can impose additional constraints through daypart targeting, also known as dayparting.

Dayparting: A Simple Switch That Complicates Everything

Most advertisers are familiar with dayparting: configuring the hours of the day or days of the week when ads are allowed to serve. It’s a natural way to align spend with business insight:

  • “Don’t show my B2B ads at 3am.”
  • “Focus my restaurant campaign around lunch and dinner.”
  • “Avoid late-night impressions that rarely convert.”

There are two main flavors, and they behave very differently from a budget delivery standpoint.

Server-side dayparting

With server-side dayparting, the platform interprets allowed hours in server time. For example, a setting of 10am–3pm server-side dayparting means:

  • The Seasonality Compensator allocates zero budget during those five hours in server time.
  • All remaining hours must still sum to the daily budget.

The resulting intra-day budget profile is intuitive:

  • A seasonality-shaped curve outside 10am–3pm.
  • A hard, flat zero during the dayparted window.

The system “loves” this structure because it cleanly encodes “no spending allowed” in those intervals.

Client-side dayparting

With client-side dayparting, the constraint is defined in user local time:

  • If the campaign is client-side dayparted from 10am–3pm, no user whose local time is between 10am and 3pm should see the ad.

For a campaign spanning multiple time zones, this creates a more intricate pattern:

  • At any given server time, some users are within the restricted window, others are not.
  • The effective eligible supply ebbs and flows as different time zones rotate into and out of 10am–3pm locally.

On a budget allocation curve, instead of a sharp zero, the system should produce partial reductions in certain server-time intervals and smoother transitions at the edges, based on historical user patterns in different time zones. This nuance is precisely what the Seasonality Compensator must respect to avoid:

  • Overly aggressive bidding when a big chunk of the audience is actually ineligible.
  • Under-utilization of high-value windows in regions that are currently allowed.

The key business takeaway:

Client-side dayparting is more intuitive to advertisers, but substantially more complex to support while maintaining stable, efficient pacing—especially for global campaigns that target multiple time zones (e.g., a European advertiser targeting Germany, France, India, Italy, and Spain).

What “Optimality” Really Means

From a business outcome perspective, optimality means the system allocates budget across time in a way that maximizes performance for the same daily spend.

  • If the system over-allocates to a given interval:
    The system is forced to push bids up to hit the aggressive target. It risks overpaying for impressions, increasing CPMs and hurting CPA/ROAS.

  • If the system under-allocates:
    The system keeps bids too low, even if valuable opportunities exist, and incurs an opportunity cost—missed conversions and revenue that were available but unfunded.

The “right” allocation depends on three underlying drivers:

  1. Available supply – How many eligible impressions are available at each time of day?
  2. Competitive intensity – How much are other buyers willing to pay in those windows?
  3. Impression value – How well do impressions in that window convert or drive downstream business metrics?

In practice, platforms capture these effects in a normalized seasonality profile—a curve that describes the relative weight of each intra-day (and sometimes inter-day) interval under non-dayparted conditions.

The challenges this project addresses are multi-faceted:

  • How do we estimate the “optimal” profile for each campaign, given its attributes?
  • How do we transform that ideal profile to respect dayparting rules and changing daily budgets, while still aligning with those underlying economic realities?

Fourier Series-Based Modeling

“The more things change, the more they stay the same.” — Richard Sutton

One effective way to tackle this problem in a modern technical stack is to model the periodic behavior using a truncated Fourier series. Fourier series is a classical method that has been used for mission-critical systems for more than a century to model seasonality and periodic behavior. This representation makes the system interpretable, easy to maintain, and extremely lightweight, which is crucial for low-latency oRTB environments.

Instead of storing a large number of raw time-bucket weights, the system:

  • Represents both intra-day and inter-day seasonality as a combination of a small number of sine and cosine terms.
  • Achieves a smooth, interpretable curve where each harmonic captures a different pattern (e.g., daily cycle, weekly cycle).
  • Uses far fewer parameters, reducing the model’s footprint and making it easier to maintain and reason about.

In practice, this approach has been used to build a seasonality compensator using truncated Fourier series to optimize bidding and allocation with high interpretability, shrinking model size by ~6× and cutting CPA by up to 20%—a rare case where you get better performance and a simpler, more transparent model.