Inferred Sales
Every composite inventory also writes
<oem>/<market>/composite/public_inferred_sales: the vehicles that left the market's
composite inventory, <oem>/<market>/composite/public_inventory, one row per sale. See
CompositeInventoryComponent for the composite.
What a partition holds
Partition S holds the sales dated S. A sale is dated on the vehicle's last present day.
The composite snapshots are taken at the start of each day, so a vehicle present on S and on
no later observed day of its look-ahead window left the lot on S.
Partition S reads the composite from S - look_back_days + 1 through S + look_ahead_days.
It depends on composite partitions after S, so the last partition is look_ahead_days days
before today.
Listed, present and observed
A composite row is listed when a counted source group is in its sources_present. Every source
group counts unless presence_sources is set; then only the groups it names count. A listed row
is present when a counted group lists it and does not report it sold, that is, when a counted
group is in sources_present and not in sources_reporting_sold; see
Reported sale. A vehicle that its counted sources report as
sold counts as absent, the same as a vehicle the sources no longer list.
A day is observed when at least one row is listed on it and no gaps range covers it. A day on
which no counted source collected anything is therefore not read as a day on which every vehicle
sold. The counts below use observed days only.
A sale date is an observed day, because presence is read on observed days only. A vehicle whose
last listed day falls in a gaps range is dated on its last present day before the gap.
An observed day is a day of the whole market. When one collection unit, such as a single dealer
website, fails for some days while the market's other units are collected, every vehicle that
only that unit lists is absent on those days and can be inferred sold. presence_sources set to
the OEM feed limits presence to a source collected as a whole.
Candidates and sales
A vehicle is a candidate on S when it is present on S and present on no observed day in
[S + 1, S + look_ahead_days]. A candidate is absent on every observed day of
its look-ahead window. It is a sale when both windows meet these conditions:
| Window | Days | Condition |
|---|---|---|
| Look-back | [S - look_back_days + 1, S], from the vehicle's first present day in it | At least min_look_back_present_days present days, and present / observed days at least look_back_threshold |
| Look-ahead | [S + 1, S + look_ahead_days] | At least min_look_ahead_observed_days observed days |
The look-back starts on the vehicle's first present day in [S - look_back_days + 1, S]. A
vehicle listed for fewer days than the look-back is therefore not penalized for the days before
it was first listed; min_look_back_present_days still requires it to have been present on that
many days.
min_look_ahead_observed_days keeps a look-ahead with few observed days, such as one partly
collected day after an outage, from deciding a sale on its own.
A vehicle that a counted source lists for a few more days with the sold flag and then stops listing is absent on all of those days. For example, in a 7-day look-ahead, 2 days listed as sold and 5 days unlisted are 7 absent days.
A vehicle that is present again inside its look-ahead window is not a candidate on S. Its sale,
if any, is dated on its later last present day, so one disappearance gives one sale. A vehicle
that returns after its look-ahead window and leaves again can have a second sale.
A vehicle reported sold on every observed day it is listed is never present, so it has no sale.
Output columns
The output holds no vehicle attributes beyond its key. The output has the same columns in every market.
| Column | Meaning |
|---|---|
_partition_date, inferred_sold_date | The sale date S |
vin | The composite's key |
first_absent_date | The first observed day after S |
dealer_code | The composite's dealer_code on S |
dealer_changed_in_look_back | True when the present look-back days show more than one dealer_code |
is_reported_sale | True when, on first_absent_date, a counted group listed the vehicle and reported it sold |
days_on_lot | S - arrival_date, from the composite's arrival_date on S. Null when arrival_date is null or later than S |
look_back_days, look_back_threshold | The configured look-back |
look_back_start | The vehicle's first present day in the look-back window |
look_back_observed_days, look_back_present_days, look_back_present_ratio | The look-back counts, from look_back_start through S |
look_ahead_days | The configured look-ahead |
look_ahead_observed_days | The observed days in the look-ahead window, on all of which the vehicle was absent |
presence_sources | The source groups whose listing counted as presence: presence_sources, or every source group when it is unset |
confidence | look_back_present_ratio. Every sale is absent on all its observed look-ahead days, so the look-back is the only ratio that varies |
Configuration
The sales settings are fields of the composite's own defs.yaml:
type: ai_dagster.components.CompositeInventoryComponent
attributes:
start_date: "2026-09-03"
look_back_days: 14
look_back_threshold: 0.7
min_look_back_present_days: 2
look_ahead_days: 7
min_look_ahead_observed_days: 4
# fields, source_groups, ...
The first sales partition is the composite's start_date plus look_back_days - 1 days, so
every partition's look-back lies within the composite.
| Field | Default | Description |
|---|---|---|
look_back_days | required | Length of the look-back window, including S |
look_back_threshold | required | Least present / observed ratio in the look-back, in (0, 1] |
min_look_back_present_days | required | Least number of look-back days on which the vehicle was present. At most look_back_days |
look_ahead_days | required | Length of the look-ahead window after S, in which a sold vehicle is absent on every observed day |
min_look_ahead_observed_days | required | Least number of observed look-ahead days. At most look_ahead_days |
gaps | empty | Inclusive start_date / end_date ranges whose composite partitions are not observed |
presence_sources | unset | Source groups whose listing counts as presence. Each must name one of the composite's source groups. Unset, every source group counts |