exchange rate time series API
Exchange Rate Time Series: Daily Dated Observations
A time series is only useful if every point carries the date it belongs to and the source it came from. Exchange-rate series are especially prone to silent corruption, because weekends and holidays create gaps, and a naive chart that interpolates across those gaps invents values that never existed. This page describes how to build a daily reference-rate series that stays honest about what is measured and what is missing.
Why daily, not monthly
Monthly averages hide exactly the movements people care about: a sharp move on a single day, a central-bank decision, or a brief spike. A daily series preserves those events, and a reader can always aggregate down to monthly afterwards. The reverse is impossible — an average cannot be decomposed back into its days.
The cost of daily data is that it exposes the gaps. That is a feature. A series that shows its gaps can be reasoned about; a series that has been smoothed cannot.
Handling business-day gaps
Reference rates are published on business days, so a calendar-day series will contain empty slots every weekend. There are three defensible ways to handle them, and one indefensible way.
Defensible: leave the gap empty and let the reader see it; carry the previous business day's value forward and mark it as carried; or resample to weekly. Indefensible: interpolate linearly between Friday and Monday and present the result as observed data. The interpolated values are fabrications that look like measurements.
Storing the series so it can be replayed
Each row should carry the pair direction, the observation date, the value, the source, and the retrieval timestamp. A series without provenance cannot be replayed, and an unreplayable series cannot be audited.
Keep the raw fetched payload alongside the parsed rows when the volume allows it. When a downstream number looks wrong, the raw payload is what lets you distinguish a parsing bug from a source revision.
Comparing series across sources
Different publishers quote different rates for the same pair on the same day. Before comparing two series, confirm that both use the same observation convention — a daily snapshot at a fixed time, or a daily average. Mixing conventions produces differences that look like data errors but are actually definitional.
When you must switch sources mid-series, record the switch as an explicit event in the series rather than splicing silently. A visible discontinuity is honest; an invisible one is a trap for whoever reads the chart next.
Charting without lying
Label the axis with the observation convention, not just the currency pair. A chart titled 'JPY/GBP' is ambiguous; a chart titled 'JPY/GBP daily ECB reference rate' is not.
Mark carried-forward points differently from observed points. If a chart cannot distinguish the two, a reader will assume everything on it was measured.
Deciding the sampling interval from the question
The right interval is determined by the question you are answering, not by what the endpoint happens to offer. A treasury review that asks whether a monthly exposure moved in an unfavourable direction needs month-end observations and a note about which day counts as month end. A reconciliation task that ties a specific invoice to a specific date needs daily observations around that date. A long-horizon comparison across several years can use monthly averages, provided the averaging method is stated.
Mixing intervals inside one analysis is where errors creep in. A series that is daily for recent months and monthly for earlier years will appear to change volatility at the boundary, and that change is an artefact of sampling rather than a market event. If you must combine intervals, split the analysis into segments and label each segment with its interval and aggregation rule. A reader who knows the interval can interpret a movement correctly; a reader who does not will over-read it.
Documenting the series so a reviewer can reproduce it
A time series is only useful for audit or review if someone else can rebuild it. That requires recording the request parameters, the retrieval time, the source identifier, the interval, and the treatment of missing dates. Without those, two analysts pulling "the same" series can produce different numbers and neither can prove which is correct. A short provenance block stored alongside the data costs little and prevents most reconciliation arguments.
Version your stored series rather than overwriting it. When a source revises a published value, an overwritten series loses the ability to explain why a previously reported figure changed. Keeping the retrieval timestamp and the source's own revision marker lets you distinguish a genuine market move from a data correction. This matters most in reporting contexts where a figure already went to a customer, an auditor, or a regulator.
Three ways to handle a missing business day
| Approach | Honest? | When to use |
|---|---|---|
| Leave the slot empty | Yes | Default; the gap is real information |
| Carry previous value, flagged | Yes, if flagged | When a consumer requires a value every calendar day |
| Linear interpolation | No | Never present it as observed data |
| Resample to weekly | Yes | When daily resolution is not the point |
Related currency workflows
Frequently asked questions
Should I interpolate missing weekend values?
No. Interpolated values are fabrications that look like measurements. Leave the gap, carry the previous value forward with a flag, or resample — but do not invent points.
Why do two sources disagree for the same day?
They may use different observation conventions (fixed-time snapshot versus daily average) or different underlying central-bank data. Confirm the convention before treating a difference as an error.
How far back does a reference-rate series go?
It depends on the publisher and can change over time — a source may extend its history. Pin the retrieval date alongside the query date so a series can be replayed as it existed.