Skip to content

Public documentation

Product version
0.5.0
Docs revision
r0
State
Current · released
Deployment
not-deployed
Source
v0.5.0 · e2d18656f5e4

Documented release is not yet live

Economic Data

Checking that Economic Data is current

v0.5.0e2d1865

This page answers one question for someone who already uses Economic Data: is what I am looking at current, and how would I know?

It matters because of the way a data service fails. When collection pauses, the tools keep answering. Every request still returns a well-formed response with a plausible payload; nothing errors, and the data is simply older than you think. So the rule is simple: a successful response proves the tool works, and only a freshness check proves the data is current.

How often the data changes

Each part of Economic Data refreshes on its own rhythm, and knowing it tells you how often a request can return something new.

DataHow it refreshes
Economic calendar, actual figuresRelease-aware. Shortly after each scheduled release time the calendar starts checking for the new figures, once a minute, until they appear.
Economic calendar, scheduleA daily pass re-reads the past week and the next thirty days, picking up new, moved or corrected events.
US labour statistics historyUpdated as soon as the calendar records a new US actual for the matching series, usually within about a minute, with a weekly pass that catches anything missed.
St. Louis Fed database historyRefreshed daily, including revisions over the last two years.
Calendar-tier history, all thirteen economiesEvery actual the calendar records enters the history at the same time.
Quality checksRun at least once a day across the historical series.

In the calendar, a figure that has not printed yet is empty, never zero.

Check the data, not the tool

For a historical series

Use the quality check rather than judging the values by eye. Ask get_data_quality with check_name="freshness". It compares the age of the last observation with the expected lag for the series' frequency and grades the result:

ResultMeaning
okThe lag is at most the expected lag for that frequency.
warnThe lag is above the expected lag and at most three times it.
errorThe lag is more than three times the expected lag.

The expected lag is 3 days for daily series, 10 for weekly, 40 for monthly, 105 for quarterly and 400 for annual. A monthly series at ok can therefore be up to forty days old. That is the publication rhythm of the indicator, not staleness; read the threshold for the frequency before judging the number.

For a calendar-tier series you can also cross-check against the calendar: if the most recent release in the calendar carries an actual figure, the series should carry it too.

For calendar events

Ask for a window that ends now and look at the events whose scheduled time has passed. An event list that keeps growing while past events never gain an actual figure is the sign to look for: the schedule is being read, but results are not arriving. A well-populated list alone does not prove the calendar is current.

Make sure the request asks for current data

Before concluding that data is stale, check the request itself.

  • The window. A window entirely in the past correctly returns past data.
  • The name. An indicator or country the service does not carry returns an empty or narrow result. Use list_economic_history_catalog to confirm an indicator name before treating a thin result as staleness.
  • The case. Calendar country names are lowercase: united states, not United States. A capitalised name returns nothing, silently. The Euro Area is filtered as european union.
  • The filters. A narrow combination of filters can legitimately return nothing recent.

A worked check

text
1. request a window ending now, with the narrowest filter that answers the question
2. if the response is empty:
confirm the name through the catalog, then retry once
still empty -> report "no data", not "stale"
3. for a series, read the freshness check and the threshold for its frequency
for the calendar, look at past events that still have no actual figure
4. within your tolerance -> usable
beyond your tolerance -> stale; note which series or events are frozen, and since when

Choosing a tolerance

There is no single correct tolerance, because it depends on the question. A check of what is expected before a release tolerates an older calendar than a check of what printed after it. A series used as background tolerates more age than the same series used to catch a new print, and the expected lag differs by frequency. An automated workflow that acts on a release should never rely on a successful call alone; it should check recency explicitly every time.

State the tolerance you used when you report a result. "The calendar is current" is not a finding; "the calendar is current to within five minutes" is.

What not to do

Do not treat a healthy health_check as proof of fresh data. It reports that the server and its database are reachable, which is also what a paused collection looks like from outside.

Do not widen your tolerance to make an old result usable. If the data is too old for the decision, the right outcome is to say so.

Do not read a difference between the two history tiers as staleness. The official tier carries revisions and the calendar tier keeps the first release, so they can differ on the same period.