How we calculate the Index

The Canadian Food Inflation Index is a confidence-weighted blend of three independent inflation signals. The published reading is reproducible from the raw upstream data using only a browser and a spreadsheet. This page walks through the math step by step.

For the formal version with full notation, derivation matrix, and edge cases, see the methodology pillar (which links the ADR-numbered changelog).

1. The three sources

Each source contributes a base weight and a freshness timestamp.

Base weights sum to 1.00 — the blend re-normalizes against the actual contributing weights so a fallback or missing source does not under-weight the headline.

2. Freshness decay

A source loses weight as its most recent published value ages. The decay is exponential with a 30-day half-life — a source one publication cycle stale carries half its base weight. This is anchored to the monthly publication cadence of StatsCan and BoC.

freshness_decay = 2 ^ (-lag_days / 30)

3. Fallback factor

When a source could not refresh on its expected cadence (StatsCan outage, Valet timeout, fork pipeline operator self-hosting), it retains a small fraction of its base weight rather than zeroing out entirely. The fallback factor is 5% — bounds contamination from a wild stale value to less than 0.1 percentage points when 1 of 3 sources falls back.

effective_weight = base_weight × fallback_factor × freshness_decay

4. Blended value

The headline reading is the weighted average of each source's published value, weighted by the effective weights from above.

blended_value = Σ(value_i × effective_weight_i) / Σ(effective_weight_i)

5. Source agreement

Every reading carries a source-disagreement scalar between 0 and 1. Higher means tighter agreement across contributing sources; lower means the sources are telling different stories about the same period. The scalar is published alongside the blended value so a reader can decide how confident to be in the reading.

6. Try it yourself

The blended value is reproducible. Pick a period (canonical YYYY-MM) and a basket, then fetch:

GET https://canadianfoodindex.ca/api/v1/inflation-index/series?period=2026-04&basket=food_combined

The response carries the per-source values + each source's freshness timestamp + the effective weights. Multiplying through recovers the published blended value exactly.

Read next

Looking for something else?