Compare to a benchmark
compare_to_benchmarkA model series beside a public benchmark series
Monthly model purchase spend (metric=spend, the default),
transactions or accounts — for everything, a category /
subcategory, or a set of merchant_ids, among cardholders in
geo — beside one public series (series_id, from the benchmark
catalog).
Both sides are aligned at the coarser frequency: against a
quarterly or annual series the model is summed over each complete
quarter or year (accounts are averaged); an incomplete one is
dropped. Each row carries both values, both indexed to 100 at the
first period where both exist, and both year over year
(percentage points for a series that is itself a percent). The
summary gives n_periods, the Pearson correlation of
period-over-period changes (null under 6 changes), mean_abs_gap
between the two indexes (index points) and mean_abs_yoy_gap
(percentage points).
The series is read at series_geo, by default geo when the
series is published there, else the geo's state, else the nation
(series_geo_fallback: true). deflate puts model spend in real
dollars of the newest CPI month. The model side is clamped
by the key's freshness tier; the public side never is.
Restaurants against a food services series (NAICS 722) carry
comparability_note: the model's restaurants are limited-service
chains, and 722 is every restaurant and bar. Say so beside the
comparison, every time.
Talk to the user in plain words: no tool, parameter or field names. Say "the American Spend model", never "panel" or a data source.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"series_id": "<series_id>"
},
"name": "compare_to_benchmark"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Last month, `YYYY-MM`. Default the last full month. At most 60 months in all. | |
| geo | No | Cardholder geography: `us` (default), `state:TX`, or `cbsa:19100` — a CBSA code, `NM-<state>` bucket or metro name (resolved as the breakdown's `location` is). | us |
| group | No | Restrict the model side to a merchant group's members, by slug or UUID (`find_groups` lists them). Wins over `merchant_id` and `category`; echoed under `merchant_group`. | |
| start | No | First month, `YYYY-MM`. Default eleven months before `end`. | |
| metric | No | Model measure. `accounts` is a monthly distinct-account count (averaged over a quarter or year). | spend |
| deflate | No | Adds real (inflation-adjusted) spend in base-month dollars, from CPI-U — the US city average (`cpi_u`) or the row's most specific published area (`cpi_regional`). The CPI item is the one the row's category maps to, all items otherwise. | none |
| category | No | Restrict the model side to one category. Category keys are lower-case and exact: `automotive`, `delivery`, `education`, `entertainment`, `financial_services`, `gifts_donations`, `government`, `grocery`, `healthcare`, `home_services`, `personal_care`, `pets`, `professional_services`, `restaurants`, `retail`, `subscriptions`, `tax_services`, `technology`, `travel`, `utilities`, `uncategorized`, plus older keys the data still carries (list every key with the breakdown, `group_by=category`). Any other name is a 400 `…/problems/category-unknown` whose `candidates` are the closest keys (`Groceries` → `grocery`). | |
| series_id | Yes | One id from the benchmark catalog. | |
| weighting | No | `raw` (the default): model volume, `weighted_cents` equals `total_cents`. `population`: the weighted fields reweight the model to the mix of US adults (for shares, comparisons and growth, not market size), with `effective_n`, `low_precision`, `suppressed` and a `weighting` object. A month has weights once it has been raked, from 2025-09 on. `same_account`: growth compares one set of accounts, those with spend in the model in both of two months, chained month by month, so accounts arriving or leaving can't move it. It is turnover-adjusted: each month also carries the merchant's or category's own balance of accounts arriving and leaving (the median over 12 months), which shared accounts alone miss. Levels and shares stay raw. A growth block gains `same_account_change_pct` and `same_account_yoy_pct`, or `same_account_unavailable` saying why not, and a monthly series carries chained dollars in `weighted_cents`. It needs whole, settled calendar months, the newest month waits for the month after it on the default `stable` accounts, and it is in validation (403 `same-account-weighting-forbidden` until open to the key). Omit it to get the response shape callers had before it existed. | raw |
| series_geo | No | The public series' geography, in the same form as `geo`. Defaults to `geo` when the series is published there, else its state, else the nation. | |
| merchant_id | No | Restrict the model side to these merchant UUIDs (comma-separated, max 50). Wins over `category`. | |
| subcategory | No | Restrict to one subcategory of `category`. Subcategory keys are lower-case and exact (`supermarket`, `fast_food`; list them with the breakdown, `group_by=subcategory`). Any other name is a 400 `…/problems/subcategory-unknown` whose `candidates` are the closest keys. Three `retail` keys: `wholesale_clubs` is warehouse clubs & supercenters (Costco, Sam's Club, BJ's, Walmart); `department_stores` is Macy's, Kohl's, Nordstrom and Target; `marketplaces` is eBay, Temu and TikTok Shop. |