Nexus deep diveStep 1 · CaptureCompanion to the case study
Where every price comes from, how futures contracts become one continuous series, and how decades of history meet the broker's live feed.
A backtest inherits every shortcut taken with its data. Nexus keeps each vendor's prices as delivered and builds continuous futures by a rule it records. It joins exchange history to the broker's live prices at a seam that can be inspected. Simulation and the live book read the same series through the same code. This page shows what is held, how it is built, and where it still falls short.
Read on 2026-11-27 from the store's catalog estimates, its coverage cache, its dataset records and its reference tables. ≈ marks an estimate.
A mid-frequency system needs long daily history to test across many market conditions, and dense intraday bars to measure entries, exits and costs. Nexus holds both in one time-series store, so research, the simulator and the trader read from the same place.
| Source | What it supplies | Coverage | From | Resolution |
|---|---|---|---|---|
| Databento | Exchange futures from CME Globex and ICE US softs: the front and next contract for each market, every individual contract, and settlement, volume and open interest | 40 markets · 4,021 contracts | Jun 2010 (softs Dec 2018) | Hourly and daily; 1-minute for five index markets, Nov 2015 to Aug 2023 |
| Pinnacle Data CLC | Back-adjusted continuous futures, as the vendor builds them | 39 markets | Jan 1969 | Daily, to Jul 2026 |
| IG (live capture) | The broker's own bid, offer and mid for the markets the book trades, and more | 64 markets | Jul 2026 | 1-second and 1-minute; 5, 15 and 60-minute derived |
| Dukascopy | FX, commodity, index and rate prices, bid, ask and mid | 36 instruments | May 2003 | 1-minute |
| Cboe | The VIX family and individual VX futures contracts | 4 indices · 273 contracts | Jan 2004 | Daily |
| Yahoo Finance | Equities, ETFs, futures, FX and indices | 6,110 equities · 199 ETFs | Jan 1999 | Daily; hourly from Apr 2024; 5 and 15-minute from Feb 2026 |
| CCXT | Crypto pairs from exchange APIs | 558 pairs | Aug 2017 | Daily and hourly; 15-minute from 2020; 5-minute from 2023 |
| FRED | Interest rates, inflation, credit spreads and spot energy | 42 series | Jan 2000 | Mainly daily |
| STOXX, HSI | European and Hong Kong volatility indices | 1 each | 2016, 2026 | Daily |
11,325 tickers with stored bars, each counted once by its class in the instrument reference.
Futures: 40 markets with exchange data, by sector agriculturals 13, FX 7, equity indices 5, rates 5, energy 5 and metals 5. Commodities are four spot series and the broker's weekend US crude market. 51 calendars and 47 futures roll calendars.
Which equities and crypto coins belong to each universe, and since when, is set out in Reference data, with dividends, splits and calendars.
Catalog estimates. Bid, mid and offer are counted separately.
TimescaleDB, 129 GB on disk. Chunks compress after seven days: the compressed price data takes 34 GB instead of 386 GB, a ratio of 11.2 overall and 13.6 for 1-second bars. No price table has a retention policy, so nothing is aged out.
What can be tradedExecution today is through one broker, IG. Of its 64 captured markets, 37 are enabled for the live book and 27 are captured for research only. Everything else on this page is research data.
A trend book needs long, unbroken futures histories, but a futures contract expires every month or quarter. A continuous series joins the contracts together. Each choice in that join changes the backtest: which contract, when to switch, and how to close the price gap at the switch. Here is each choice Nexus makes.
Front and next, hour by hour
For each of 40 markets the exchange feed supplies two hourly series: the front contract and the contract after it. It also supplies every individual contract daily, 4,021 of them since 2010. The front contract is chosen by the vendor's published rule, not by hand.
Hourly and daily, for all 40 markets.
Volume for most, the calendar for rates
35 markets switch when the next contract trades more volume than the front. The five rates markets, four Treasury futures and three-month SOFR, switch on the calendar, the day after the front contract's last trade. In September 2026 the 10-year Treasury last traded on the 21st and switched on the 22nd. The E-mini S&P 500 switched on volume on the 16th, two days before its last trade.
Nexus also keeps its own roll calendar for 47 markets: 8,564 contracts from 1999 to 2031, each rolled five business days before its last trade. For Treasuries the calendar rolls five business days before an approximate first-notice date instead. It decides which contract the term-structure inputs use. It does not set the continuous price series.
Since 30 October 2026 a rule that ties every switch to the broker's last dealing date has built the series the platform serves for coffee, and since November for 25 more markets. Section 03 walks through it on coffee.
The broker-deadline rule builds the served series for 26 markets and the vendor's rule for the other 14. Since 26 October 2026, 3,735 of the house calendar's 8,564 contracts follow the exchanges' published rules and holiday calendars, and the rest keep their earlier dates (section 08).
Ratio back-adjustment
At a switch the next contract usually trades at a different price from the front, and that gap is not a return anyone earned. Nexus removes it by scaling older history by the ratio of the two prices at the switch, as section 04 shows.
On all 40 exchange markets.
The broker's contracts
The book trades the broker's contracts, not the exchange's. The broker's undated contracts never expire. Its dated ones, such as the Treasury contracts, move to the next contract around the last dealing date. When they do, the live series is re-anchored so the switch adds no return (section 07).
On the broker demo account.
Arabica coffee, traded on ICE US, shows every choice from the last section at work. It lists five contracts a year, March, May, July, September and December, and the broker stops dealing in each one before its delivery month. A continuous coffee series is a chain of those contracts, and each link has to move on before the broker's deadline.
Since 30 October 2026 the coffee series the platform serves is built by the rule below, and since 7 November the book and its simulation read it. Its first live switch, from December 2026 to March 2027, came at the close on 11 November.
Set by the broker, not the exchange
The book trades through the broker, so the deadline that matters is the broker's last dealing date, taken as an exact time: 11:25 in New York for coffee, as the broker published it. For September 2026 that was 19 August, two days before the exchange's first notice day and a month before its last trading day. The last session that closes before that time is the last one the series may hold September: 18 August.
The broker has published dates for four coffee contracts, September 2026 to May 2027. For every earlier contract, back to the end of 2018, the deadline is modelled: the contract's last trading day in the house roll calendar, moved earlier by 22 exchange sessions, the largest gap seen in the four published dates, so it sits at least as far before the last trading day as any published deadline does. Each stretch of the series records which kind of deadline it used. The house calendar's last trading days for coffee turned out to be too early. Dates from the exchange's published rules replaced them on 26 October 2026 (section 08), and the gap was measured on those dates before the series was first built.
Published dates for four contracts; modelled before them.
15 exchange sessions before the deadline
Trading may move the series only inside a window that ends at the deadline. For coffee it opens 15 exchange sessions earlier, counted on the session calendar the rule pins (section 08): on 29 July for the September contract and on 29 October for December. Each market group has its own window, set in advance from how early its trading has moved to the next contract in the past, and not tuned to results (table below). Coffee's was measured again on its repaired data before the series was first built, which shortened it from 25 sessions to 15. The other soft commodities' windows have been measured again on their repaired data and are not yet in use.
Window lengths fixed in advance, before the series is built.
Trading activity, judged only on days already complete
At each session close inside the window, the rule compares how actively the next contract trades with the held contract. It looks across several complete days rather than reacting to one. A tie, or a missing day for either contract, means no switch. Data from the session still trading is never used, so the decision could have been made at that close. Only on-exchange data counts, and days whose stored figures are known to be short are corrected or set aside, so a known-short figure cannot trigger a switch.
The series is built on coffee's stored data as repaired on 25 October 2026, apart from one bar (section 08). Of its 40 switches since the end of 2018, trading decided 36 and the backstop four.
Switches only at a session close.
The deadline wins if trading never moves
If trading has not moved the series by the last session before the deadline, it moves at that session's close anyway. It never moves back. The next contract is always the next one in the coffee cycle, never one picked by looking at later trading.
For the Treasury futures, the backstop is the change that matters. The calendar rule it replaced holds the delivering contract for the whole delivery month. Under the new rule, all four handed September 2026 over to December at the close on 26 August, by the backstop. Their series have been served from the rule since 5 November 2026.
No contract is held past the broker's deadline.
One ratio per switch
At the switch, older history is scaled by the ratio of the two contracts' prices in the last hour both traded in the switch session. Every coffee price before that switch is multiplied by that ratio, and by the ratio of every switch after it. September's moves keep their percentage size, and the series meets December with no jump.
Unlike the method in section 04, there is no fallback to prices from different hours. A switch with no shared hour waits for a later session, and if there is still none at the deadline, the series stops there and is marked blocked. It does not carry the old contract past the deadline or invent a ratio. Before coffee's stored history was repaired, some of its switches had no hour that passed the price checks. Built on the repaired history, none is blocked: two waited for a later session, in June 2024 and June 2025.
No fallback to prices from different hours.
| Markets | Window before the deadline |
|---|---|
| Currencies, Treasuries | 3 sessions |
| Gold, silver, copper, crude oil, Brent, natural gas | 5 sessions |
| Equity indices | 7 sessions |
| Corn, Chicago wheat, soybeans, soybean oil and meal | 10 sessions |
| Lean hogs, heating oil, gasoline | 15 sessions |
| Coffee | 15 sessions |
| Cotton | 20 sessions |
| Cocoa, sugar | 25 sessions |
Where the broker lists no dated contract, as for the five energy markets and two equity indices, the deadline falls back to the last session before the contract's last trading day in the house calendar, and the series is labelled as using it. For crude oil and natural gas that was measured as too late, so their deadline is modelled two sessions before the last trading day instead. Kansas wheat, platinum, palladium and three-month SOFR are outside the rule.
The deadlines, cutoff times, windows and contract cycles live in one versioned file per broker, not in the code. Every series built from it records which file and version it used. Connecting a second broker means building its file from that broker's published dates. The switching code stays the same.
The rule writes its own series and records beside the vendor's, which are kept, and the house roll calendar and the broker's contract records are untouched. A market moves across in two steps, each on its own sign-off and each reversible: first the series the platform serves, then the book's model inputs. Coffee and the four Treasury futures have made both steps. 21 more markets have been served from the rule's series since 8 November 2026, while the book's models still read the vendor's. Ten have no series from it yet, among them the other soft commodities.
For a trend bookA backtest should hold the contract the book could actually have held. Tying each switch to the broker's deadline, published or modelled, keeps the simulated position on a contract the broker would still have dealt in, and deciding only on complete days keeps that choice free of hindsight.
No way of joining contracts is neutral. Each method keeps one property and gives up another. Nexus picks a method per source, records it on every dataset, and checks that the result still agrees with the raw prices.
| Method | Keeps | Gives up | In Nexus |
|---|---|---|---|
| Ratio, backward | Percentage returns across each roll | Point-value moves in older years. It cannot span a negative price, and its fallback at a missing quote can misplace one bar's move. | Default All 40 exchange markets, hourly and daily, from 2010. The trend book and its simulation read it through the broker-blended series. |
| Difference, backward | Price changes in points | Percentage returns. Older prices can drift below zero. | Held The 39-market daily history from 1969, analysed as price differences, not returns. Used directly for one index market that has no exchange feed. |
| None (raw splice) | The prices that actually traded | Every roll shows as a jump that nobody earned | Kept Front and next contract, raw, for all 40 markets: the input to the adjusted series and its check. |
| Held contract with roll trades | The exact profit and loss of the contracts held, roll trades included | Needs dated contract specifications and an accounting reference for each contract | Not built Parked in October 2026. |
A roll is wherever the front contract changes. The ratio is the next contract's close over the front contract's close on the last bar before the switch, and all earlier history is scaled by the product of the ratios after it. Where the next contract has no price at that bar, the ratio falls back to the new front contract's first price over the old one's last. Those prices come from different bars, so the market's move between them is folded into the adjustment instead of kept as a return. A ratio outside 0.5 to 2 is flagged, and one outside 0.1 to 10 is not applied.
US crude oil settled at −$37.63 on 20 April 2020. A ratio cannot span a change of sign, so negative bars are left out of the ratio-adjusted series, counted and warned about rather than dropped in silence. A difference-adjusted variant for those markets is not built.
Each new window of exchange data is adjusted on its own, then scaled to the stored series at the latest bar both share. A new roll therefore never rewrites history. A join that moves more than 0.15 in log terms is refused and alerted, never written. Between full rebuilds, recent adjusted prices drift away from the traded contract price, while returns are unaffected.
Each market's dataset records the adjustment events found in its history, each with the time it takes effect and its ratio: 4,229 across 40 markets. They are detected afterwards from the steps between the adjusted and raw series, and refreshed in batches. Only 71 name the two contracts. A very small adjustment can fall below the detector's tolerance, and the recorded time is when the adjustment applies, not necessarily the vendor's roll date. They are not a complete roll ledger.
The data checks compare adjusted with raw. Three can fail a series: the latest adjusted level must anchor to the raw price, the adjustment must not crush the size of price moves, and the declared method must suit the data. Two more only warn: roll returns well beyond the market's own, and long-run drift between adjusted and raw. Details are in Validate and clean.
The adjusted series removes the gap but not the cost of rolling. On markets traded through dated contracts, the simulation charges a smoothed roll cost of four spreads a year.
For a trend bookA trend book sizes positions from percentage returns and their volatility. Ratio adjustment keeps those true across a roll where both contracts are quoted at the switch, which is why it is the default. Point-value history is still there in the raw contracts kept beside it.
Nexus keeps the raw and the derived together. Each dataset is tagged with its source, how it was built, its roll method and rule, its calendar, its time zone and how its prices are quoted. Any adjusted price can be traced back to what the vendor delivered.
| Series | What it holds | Held | How it changes |
|---|---|---|---|
| Vendor archive | Paid downloads as received, with checksums | every download since Oct 2026 | Write once. A series can be rebuilt from the archive; earlier downloads cannot be replayed. |
| Individual contracts | Each futures contract on its own, daily | 4,021 contracts · 1.16M bars | Insert-only |
| Front contract, raw | The front contract, joined at each roll, unadjusted | 40 markets · 3.09M hourly bars | Insert-only |
| Next contract, raw | The contract after the front, unadjusted | 40 markets · 2.45M hourly bars | Insert-only |
| Ratio-adjusted continuous | The front contract, ratio back-adjusted (section 04) | 40 markets · 3.09M hourly, 180K daily | Appended without rewriting; rebuilt only by a full reload |
| Difference-adjusted history | The vendor's own back-adjusted continuous series | 39 markets · 432K daily bars from 1969 | Held as delivered |
| Broker-blended continuous | Exchange history with the broker's live prices after it (section 07) | 36 markets · 2.82M hourly bars | Rebuilt every hour inside a window of at most 14 days. Before the join it is a byte-for-byte copy of the exchange series. |
| Live broker capture | Bid, offer and mid, as 1-second and 1-minute bars | from Jul 2026 | Each bar written once (section 06) |
| Contract observations | Settlement, volume and open interest for each contract | 40 markets · 33.9K rows from Dec 2025 | Append-only, enforced in the database. Each row carries three timestamps, a content hash and a revision number. |
And the clean layerThe cleaning engine does not edit these series. A clean copy is rebuilt from raw plus a log of operations, and every operation can be undone. That is step 3, Validate and clean.
The broker is both a data source and the venue. Capturing its own prices means the live book and its record see exactly what the broker quoted.
Every tick is stamped with Nexus's own UTC receipt time, because the broker's update time has no date. Bid, offer and mid are all kept.
A bar holds only the ticks inside its own interval and is finalised once. A tick that arrives late is dropped, never applied to a closed bar. 1-second and 1-minute bars go to the time-series store. A 1-second quote cache serves the trader, but it is not the record.
A second or a minute with no ticks stays empty, and no bar is ever made up. Each weekday night, gaps of 30 minutes or more from the last 14 days are fetched again from the broker's own price history. Which minutes should exist is learned from each market's last four weeks: a minute is expected if it appeared in at least 60 % of them. The refetch stays inside a fixed share of the broker's weekly data allowance.
5, 15 and 60-minute bars are rebuilt from the 1-minute bars every ten minutes. Only fully elapsed buckets are written, so a half-formed hour never reaches research.
The capture reconnects and alerts after 120 seconds without a connection, and after 300 seconds with no finished 1-minute bar while a market is open. A subscription that falls silent is renewed every 180 seconds, up to twice, before its connection is rebuilt, at most six times an hour. A sweep each morning pages operations about any hour with minute bars but no hourly bar. At 12:34 UTC on 15 October, 88 of 91 subscriptions were receiving.
Under the hoodThe broker's streaming protocol, and why a connection can report healthy while writing nothing, are in Three ways to stream.
Exchange history arrives twice a day, hours after the close, while the broker's prices arrive every second. Simulation needs the long history and a live book needs the latest hour. Nexus joins the two into one series, and simulation and the live book both read it.
Up to the last completed bar that both sources share, the blended series is an exact copy of the ratio-adjusted exchange series. The build checks that this prefix matches byte for byte, so the history a strategy is tested on is the exchange's.
Rebuilt hourly, with a full recompute every night as a check.
From the handoff on, the broker's mid-price returns are chained onto the last exchange level, with open, high and low scaled by the same factor. The handoff moves on every hourly run, so each exchange delivery replaces the broker's prices with the exchange's. Exchange data lands twice a day, about 14 hours after the bar at the median, so the broker tail is typically 4 to 13 hours long.
On dated broker contracts the broker and exchange prices differ by about zero. On the broker's undated contracts the gap is the funding rate. Outside grains, softs and energy, the error at the join is within 3.4 basis points.
For 36 markets.
When the broker moves a dated contract to the next month, its price steps by the calendar spread. Nobody made or lost that money. At the 27 August 2026 rates roll this step would have put four false returns, of 0.06 % to 0.38 %, into the series the live book trades from, each far too small for an outlier check to catch. The series is re-anchored at every broker roll so the seam return is exactly zero.
The bar at the seam loses its true move along with the false one.
A first broker-tail return beyond 0.05 in log terms, about 5 %, is refused, not written. A market refused six runs in a row is reported stale. The tail's age raises a warning at 36 hours of open market, not 36 hours of clock time, so a weekend is not an alarm.
A refused market is not updated on that run, and the refusal is logged.
Simulation and the live book cannot disagree about the data.
How new data reaches research.
For your firmA strategy is tested on exchange history and traded on the broker's prices, and the join between them is a rule you can read. The seam, its guards and its known limits are all on record.
Naming what is not built yet, and what is still being checked, is part of the method.
Sources, read 2026-10-15 unless noted: TimescaleDB catalog estimates and compression statistics, the store's coverage cache and the calendar reference table (refreshed 2026-11-27 for every count of bars, tickers, contracts and calendars, and for storage); the dataset, roll-calendar and contract reference tables; the logged cleaning and roll records; the data service's fetch, adjustment and splice code on its main branch; the capture service's status; and the work board for the open investigations. For section 03 and the related items above, read 2026-11-17: the rule's series, switch records and versioned broker file on the data service's main branch; its serving and model-input records; the broker's published dealing dates; the exchange's published expiry dates; the last-trading-day correction and its measurement; the soft-commodity repair runs; and their recorded checks on the work board.
I can load, roll and join the history your strategy needs, capture your broker's live prices, or audit the series you already use.