1- # Futures & Options Data Guide
1+ # Futures Data Guide
22
3- ** Asset Classes** : Futures contracts, Options on futures
4- ** Available Providers** : Databento (primary), Polygon
3+ ** Asset Classes** : Futures contracts
4+ ** Available Providers** : Databento (primary), Massive for listed options
55** Difficulty** : Advanced (requires understanding of derivatives mechanics)
66** Recommended For** : Institutional strategies, derivatives research, quantitative trading
77
88---
99
1010## Overview
1111
12- ML4T Data provides access to ** institutional-grade futures and options data** through Databento, the gold standard for derivatives market data. Futures markets have unique complexities:
12+ ML4T Data provides access to institutional-grade futures data through Databento.
13+ Futures markets have unique complexities:
1314
1415- ** Expiration & Rolling** : Contracts expire monthly/quarterly, requiring continuous contract construction
15- - ** Multiple Exchanges** : CME, CBOE, ICE, Eurex - each with different conventions
16+ - ** Multiple Exchanges** : CME, ICE, Eurex, and others each have different conventions
1617- ** Session Times** : Futures trade nearly 24 hours with complex session breaks
1718- ** Tick Data** : Ultra-high-frequency data (microsecond timestamps)
1819- ** Margin Requirements** : Leveraged instruments with daily mark-to-market
@@ -21,10 +22,12 @@ ML4T Data provides access to **institutional-grade futures and options data** th
2122
2223| Provider | Coverage | Free Tier | Data Quality | Best For |
2324| ----------| ----------| -----------| --------------| ----------|
24- | ** Databento** | CME, CBOE, ICE + more | ❌ Paid only | ⭐⭐⭐⭐⭐ Institutional | Professional futures trading |
25+ | ** Databento** | CME/ICE/Eurex futures; OPRA via native SDK | Paid only | Institutional | Professional futures trading |
2526| ** Polygon** | Limited futures | 5/min | ⭐⭐⭐ Good | Multi-asset portfolios |
2627
27- ** Important** : Futures data is ** NOT free** . Databento requires paid subscription (~ $30-50/month minimum for historical data).
28+ ** Important** : Futures data is not free. Databento requires a paid subscription
29+ for most historical workflows. First-class Databento OPRA option-chain and quote
30+ helpers are planned but not yet implemented in ml4t-data.
2831
2932---
3033
@@ -36,19 +39,19 @@ ML4T Data provides access to **institutional-grade futures and options data** th
3639- ✅ ** Normalized data** - Consistent schemas across all exchanges
3740- ✅ ** Continuous contracts** - Automatic front-month rolling (.v.0 notation)
3841- ✅ ** Tick-level precision** - Microsecond timestamps
39- - ✅ ** CME, CBOE, ICE, Eurex** - Major derivatives exchanges worldwide
40- - ✅ ** Multiple schemas** - OHLCV, trades, quotes, market-by-order
42+ - ✅ ** CME, ICE, Eurex** - Major futures exchanges worldwide
43+ - ✅ ** Selected schemas** - OHLCV plus direct access to native Databento schemas
4144
4245** Best for** : Quantitative futures strategies, high-frequency trading, institutional research
4346
4447### Quick Start
4548
4649``` python
47- from ml4t.data.providers import DatabentoProvider
50+ from ml4t.data.providers import DataBentoProvider
4851
4952# Get API key from: https://databento.com/
5053# NOTE : Requires paid subscription ($30-50/month minimum)
51- provider = DatabentoProvider (
54+ provider = DataBentoProvider (
5255 api_key = " your_databento_api_key" , # Or set DATABENTO_API_KEY env var
5356 dataset = " GLBX.MDP3" # CME Globex futures (default)
5457)
@@ -191,31 +194,33 @@ Databento provides data from multiple exchanges:
191194
192195``` python
193196# CME Globex (most futures)
194- provider = DatabentoProvider (dataset = " GLBX.MDP3" )
197+ provider = DataBentoProvider (dataset = " GLBX.MDP3" )
195198
196199# CME (all CME markets)
197- provider = DatabentoProvider (dataset = " CME.MDP3" )
200+ provider = DataBentoProvider (dataset = " CME.MDP3" )
198201
199- # CBOE Options (equity options)
200- provider = DatabentoProvider(dataset = " OPRA.PILLAR" )
202+ # OPRA options through the native client for advanced workflows
203+ provider = DataBentoProvider(dataset = " OPRA.PILLAR" )
204+ client = provider.client
201205
202206# US Equities
203- provider = DatabentoProvider (dataset = " XNAS.ITCH" ) # NASDAQ
204- provider = DatabentoProvider (dataset = " XNYS.TRADES" ) # NYSE
207+ provider = DataBentoProvider (dataset = " XNAS.ITCH" ) # NASDAQ
208+ provider = DataBentoProvider (dataset = " XNYS.TRADES" ) # NYSE
205209```
206210
207211** Available datasets** :
208212- ` GLBX.MDP3 ` - CME Globex (futures, options on futures)
209213- ` CME.MDP3 ` - CME (all markets)
210214- ` XCME.MDP3 ` - CME Crypto
211- - ` OPRA.PILLAR ` - CBOE Equity Options
215+ - ` OPRA.PILLAR ` - OPRA listed options (native client; first-class helpers planned)
212216- ` XNAS.ITCH ` - NASDAQ Equities
213217- ` XNYS.TRADES ` - NYSE Equities
214218- ` BATS.PITCH ` - BATS Equities
215219
216220### Schemas (Data Types)
217221
218- Databento supports multiple data schemas beyond OHLCV:
222+ Databento supports multiple data schemas beyond OHLCV. The wrapper exposes
223+ selected schema fetches and the native client for advanced workflows:
219224
220225``` python
221226# OHLCV aggregations
@@ -234,14 +239,14 @@ Databento supports multiple data schemas beyond OHLCV:
234239** Example: Fetching tick data** :
235240
236241``` python
237- provider = DatabentoProvider (dataset = " GLBX.MDP3" , default_schema = " trades " )
242+ provider = DataBentoProvider (dataset = " GLBX.MDP3" )
238243
239244# Fetch trade-by-trade data for ES
240245trades = provider.fetch_ohlcv(
241246 symbol = " ES.v.0" ,
242247 start = " 2024-11-04" ,
243248 end = " 2024-11-04" ,
244- frequency = " tick" # Uses default_schema=" trades"
249+ frequency = " tick" # requests Databento trades schema
245250)
246251
247252# Result: Every single trade with microsecond timestamps
@@ -288,7 +293,7 @@ Futures markets trade nearly 24 hours with session breaks:
288293# But in UTC: Monday 00:00 - Tuesday 22:00
289294
290295# Databento handles this with adjust_session_dates
291- provider = DatabentoProvider (
296+ provider = DataBentoProvider (
292297 dataset = " GLBX.MDP3" ,
293298 adjust_session_dates = True , # Align dates with session start
294299 session_start_hour_utc = 22 # 22:00 UTC = 5:00 PM CT (CST)
@@ -310,16 +315,16 @@ for symbol in symbols:
310315 # 50 symbols = 50 requests = completes in 0.5 seconds
311316```
312317
313- ** Live WebSocket** : Unlimited (within subscription limits)
318+ ** Live WebSocket** : Use Databento's native SDK directly.
314319
315320### Complete Example: Multi-Contract Strategy
316321
317322``` python
318- from ml4t.data.providers import DatabentoProvider
323+ from ml4t.data.providers import DataBentoProvider
319324import polars as pl
320325
321326# Initialize provider
322- provider = DatabentoProvider (
327+ provider = DataBentoProvider (
323328 dataset = " GLBX.MDP3" ,
324329 adjust_session_dates = True
325330)
@@ -375,7 +380,7 @@ except DataNotAvailableError as e:
375380
376381try :
377382 # Using expired API key
378- provider = DatabentoProvider (api_key = " expired_key" )
383+ provider = DataBentoProvider (api_key = " expired_key" )
379384except AuthenticationError as e:
380385 print (f " Authentication failed: { e} " )
381386 # Renew subscription or check API key
@@ -579,7 +584,7 @@ annual_roll_cost = roll_cost_dollars * annual_rolls * num_contracts
579584# Daily break: 4:00 PM - 5:00 PM CT
580585
581586# Use adjust_session_dates for proper date alignment
582- provider = DatabentoProvider (
587+ provider = DataBentoProvider (
583588 adjust_session_dates = True ,
584589 session_start_hour_utc = 22 # 5:00 PM CT = 22:00 UTC (CST)
585590)
0 commit comments