Economic calendar
econ.calendar is one row per scheduled economic release, covering the G10 and more than 100 economies. It carries the schedule, the consensus forecast and the previous figure. The released figure is not available to scripts. Read it through a dataset handle.
const cal = dataset("econ.calendar", { where: { code: ["US.NFP", "US.CPI.YOY"] } });Fields
Field | Meaning |
|---|---|
| Stable release id |
| Indicator code, e.g. |
| Release name |
| Economy, two letters ( |
|
|
| How much it moves global markets: 1 low, 2 medium, 3 high |
| How much it matters for its own economy, 1 to 3: every economy's rate decision, headline CPI, GDP and unemployment are 3. Never below |
| The reference period, e.g. |
| Release time, unix seconds |
| Consensus forecast, once published |
| The previous period's figure as first printed |
| False for a later stage of the same period, such as a final after a flash |
|
|
| The new time when |
| False for speeches, minutes and statements |
Filters
Field | Operators |
|---|---|
| equals, any of |
| equals, any of, |
| equals, any of |
| equals, any of, |
| equals, any of, |
A calendar handle must filter on code or country. Codes are data: look them up with find_calendar_codes (agents and MCP) or GET /public/v1/datasets/econ.calendar/codes rather than guessing one. A code or economy the calendar does not have is refused.
Use localImportance on an instrument outside the major economies. Almost nothing outside the US, the euro area, the UK, Japan, Canada, Australia, New Zealand and Switzerland has importance 3, so importance: { gte: 3 } on a Taiwanese stock reads US releases only; localImportance: { gte: 3 } reads Taiwan's headline releases as well.
{ fromInstrument: true } resolves the chart's instrument to the economies that move it:
FX pairs give both currencies, and the euro gives the euro area plus Germany, France, Italy and Spain.
An index gives its home economy.
Metals, crypto and US stocks give the US.
The US is always included.
When things become visible
Fact | Visible from |
|---|---|
A release | When it was listed, and never more than 7 days before its time. Speeches and unscheduled central-bank decisions appear in history only at their own time |
Its forecast | When it was published. History holds only the final forecast, shown from one day before the release |
Its previous figure | When the previous period's figure was first printed |
A time change | When it was seen |
A withdrawal, postponement or cancellation | When it was seen live; in history, at the original time (the latest safe time) |
previous is always the prior period's first print, not a later revision, so it matches what the market knew before the release.
Patterns
Stand aside around news:
if (cal.within({ before: "15m", after: "30m" }).some((r) => r.state === "scheduled")) return;Act shortly before a high-importance release:
const n = cal.next;
if (n && n.localImportance === 3 && n.scheduledAt - ctx.time <= 3600) {
ctx.emit("pre_release", { code: n.code, forecast: n.estimate ?? null }, { label: n.name });
}React to a change in the schedule:
for (const u of cal.updatesThisBar) {
if (u.kinds.includes("rescheduled")) ctx.log.info(`${u.row.name} moved to ${u.row.rescheduledTo}`);
}The built-in Economic Calendar indicator draws these releases along the bottom of the chart, including upcoming ones to the right of the last bar. Its importance setting filters on localImportance.
