Option Valley never supplies market data. The connectors read the quotes you already license from your vendor or broker, on your machine, into one quote schema. Then they attach your rates and dividends and run the engine. They keep nothing: no caches, no telemetry, and no network calls except the ones you make to your own vendor.
pip install optionvalley-connectors-1.0.0-py3-none-any.whl # numpy only pip install "optionvalley-connectors-1.0.0-py3-none-any.whl[all]" # + pyarrow (Parquet / Arrow) and websockets python -m optionvalley_connectors list # every connector and how it was tested
The pipeline in five lines
import optionvalley as ov
from optionvalley_connectors import read, rates, engine, attach_underlying
ov.init() # your licence
q = read("cboe-eod", "UnderlyingOptionsEODCalcs_2026-12-01.csv")
rates.apply_rates(q, curve=rates.treasury_par_curve("par-yield-curve-2026.csv", "2026-12-01"),
dividends=rates.load_dividends_csv("my_dividends.csv"), parity=True)
res = engine.compute(q, greeks=True) # res["sigma"], res["delta"], ..., res["reason"]
From the command line, with a signed certificate:
python -m optionvalley_connectors databento opra-cbbo-1s.csv out.parquet --underlying SPX=6047.15 \
--curve my_ois.csv --yield SPX=0.0128 --compute --greeks --certificate "EOD 2026-12-01"
# writes out.parquet (quotes + sigma + Greeks), out.parquet.ovcert.json, .inputs.npz, .outputs.npz
The quote schema
| column | type | meaning |
|---|---|---|
| underlying, root, symbol | string | underlying (SPX, AAPL, ES); option root or trading class (SPXW); the vendor's own symbol, kept for joins |
| expiry, expiry_ts | date, ns UTC | expiry date; the expiry instant used for time to expiry: 16:00 New York for PM-settled, 09:30 for AM-settled (SPX, NDX, RUT monthlies; ES quarterlies) |
| strike, right, style, settlement | float, C/P, A/E, AM/PM | strike in price units; exercise style: US index roots (SPX, SPXW, XSP, NDX, RUT, ...) are European, US equity and ETF options American, CME weeklies and EOM European, ES quarterlies American |
| bid, ask, bid_size, ask_size, last | float | NaN when missing |
| quote_ts | ns UTC | quote time |
| underlying_price, underlying_kind, multiplier | float, equity/index/future, float | spot, index level or futures price at quote time |
| r, q, forward | float | continuously compounded rate and dividend yield to expiry; forward when it is known (futures, parity, discrete dividends); set by rates.apply_rates |
| source | string | connector name |
Time to expiry is act/365 to the nanosecond, from quote_ts to expiry_ts. QuoteBatch.validate() reports missing fields, crossed quotes, non-positive strikes and quotes after expiry. to_parquet, to_arrow and to_csv write the schema, and the generic readers read it back.
Generic sources
| source | call | notes |
|---|---|---|
| CSV / TSV (gz, zstd with pyarrow) | read_csv(path, mapping, defaults) | mapping: schema column → your column name, a dotted path, or a function of the columns; "osi": "col" parses OCC symbols |
| Parquet (file or dataset) | read_parquet(path, mapping, filters=[("underlying","=","SPX")]) | pyarrow |
| Arrow IPC / Feather | read_arrow(path, mapping) | pyarrow |
| Newline-delimited JSON | read_ndjson(lines, mapping, select=...) | select drops heartbeats and other messages |
| Streams | NdjsonStream(mapping, batch=10_000, latest_only=False) | micro-batches; latest_only=True keeps the last quote per symbol |
| WebSocket | await websocket_stream(url, mapping, on_batch, subscribe=..., headers=...) | connects to your feed with your credentials; tested against a local server, not against a vendor's live feed |
m = {"underlying": "ticker", "expiry": "exp", "strike": "k", "right": "cp", "bid": "b", "ask": "a",
"quote_ts": "time", "underlying_price": "spot"}
q = read_csv("my_chain.csv", m, defaults={"style": "A"}, tz="America/New_York") # naive times in New York
Vendor formats
Each adapter was built from the vendor's public documentation and tested on synthetic files in the vendor's layout (tests/synth.py). Untested against live feed means the adapter has not been run against a live account or a purchased file yet. Please send us the first error you see (no data needed, only the column names) and we aim to ship a fix within two business days.
| vendor | call | what it reads | status |
|---|---|---|---|
| Databento OPRA.PILLAR | read("databento", path) | MBP-1, BBO-1s/1m, CBBO-1s/1m, TCBBO, CMBP-1 as CSV or JSON (prices fixed-point or decimal, timestamps ns or ISO); OSI symbols; databento.read_dbn(path) for .dbn/.dbn.zst (needs the databento package) | synthetic; untested against live feed |
| Databento GLBX.MDP3 (CME, ES) | databento.read(path, definitions=databento.read_definitions(defs), dataset="GLBX.MDP3") | quotes joined to the definition schema on instrument_id (CME raw symbols carry no expiry); style, settlement and multiplier per product | synthetic; untested against live feed |
| ThetaData | read("thetadata-v2", json), read("thetadata-v3", csv) | v2 REST JSON (header.format + ticks, bulk and single contract; strikes in 1/1000) and v3 CSV (New York times) | synthetic; untested against live feed |
| Massive (Polygon) | read("massive-snapshot", json), "massive-quotes", "massive-dayaggs" | chain snapshot, flat-file quotes_v1 (sip_timestamp ns), day_aggs_v1 | synthetic; untested against live feed |
| Cboe DataShop / LiveVol | read("cboe-eod", path, at="1545"), read("cboe-quotes", path) | Option EOD Summary (15:45 snapshot or EOD quotes; underlying mid, active or implied price), Option Quotes intervals; "^SPX" becomes SPX; Cboe's IV and Greek columns are ignored | synthetic; untested against live feed |
| OptionMetrics IvyDB US | optionmetrics.read_opprcd(opprcd, secprd=secprd) | OPPRCD with headers (WRDS export layout; strikes / 1000; best_bid / best_offer; am_settlement; Saturday exdates moved to Friday), SECPRD closes (negative = bid/ask mid, abs taken); ZEROCD, DISTRD and IDXDVD in rates | synthetic; untested against live feed |
| Interactive Brokers TWS / IB Gateway | ibkr.from_tickers(tickers); class W(ibkr.TwsCollector, EWrapper) | ib_async / ib_insync Ticker objects (OPT and FOP), or raw ibapi tickPrice / tickSize / tickOptionComputation (live and delayed tick types); -1 sentinels become NaN | synthetic objects; untested against live feed |
| Alpaca | read("alpaca", snapshots_json, contracts=contracts_json) | options snapshots and latest quotes; style and size from /v2/options/contracts | synthetic; untested against live feed |
| Tradier | read("tradier", chain_json, underlying_price=...) | /markets/options/chains (one option as an object handled) | synthetic; untested against live feed |
| Schwab Trader API / TD Ameritrade | read("schwab", chain_json) | callExpDateMap / putExpDateMap; ISO or ms expirations; the chain's interestRate only with use_chain_rate=True | synthetic; untested against live feed |
| CME settlement files (ES) | read("cme-settle", path) | daily settlement file (BizDt, Sym, SecTyp OOF / FUT, StrkPx, SettlePrice, UndlyID ...): settlement as mid, futures settlement as forward; MDP 3.0 binary is not decoded: take it through Databento GLBX or your own handler | synthetic; untested against live feed |
Your vendor agreement still applies. Most vendor and exchange terms (OPRA, Cboe, IBKR, Alpaca and others) allow internal use and restrict redistribution. Option Valley runs inside your environment, so your data stays covered by your own agreement. If you send quotes to the hosted evaluation API, they must be delayed, end-of-day or synthetic, or you need OPRA's approval for real-time data.
Rates and dividends
Rates and dividends are inputs you choose. Option Valley ships no curve.
| input | call | terms of the public source (checked 2026-12-02; not legal advice) |
|---|---|---|
| Your own curve (OIS, SOFR swaps, deposits) | rates.load_curve_csv(path): columns tenor (1W, 3M, 2Y) or days / years, rate, optional compounding (continuous, annual, semiannual, quarterly, simple, act360) | yours |
| US Treasury par yield curve | rates.treasury_par_curve(csv, date), bootstrapped to zero rates; rates.fetch_treasury_par_csv(year, path) | US government work, no copyright |
| FRED H.15 series (DGS1MO ... DGS30) | rates.fred_curve([csv, ...], date); rates.fetch_fred_csv("DGS3MO", path) | FRED API Terms of Use: commercial use allowed. Show rates.FRED_NOTICE. Series marked "Copyright" need their owner's permission |
| Federal Reserve H.15 Data Download Program | rates.h15_curve(csv, date) | Federal Reserve Board data |
| NY Fed SOFR and SOFR Averages | rates.sofr_curve(json, date) (short end, act/360); rates.fetch_sofr_json(path) | newyorkfed.org Terms of Use: keep rates.NYFED_NOTICE with the data if you redistribute it. CME Term SOFR is licensed by CME and is not supported |
| OptionMetrics ZEROCD / DISTRD / IDXDVD | rates.read_ivydb_zero_curve, read_ivydb_distributions, read_ivydb_index_dividend | your IvyDB licence |
| Discrete dividends | rates.load_dividends_csv(path): underlying, ex_date, amount | yours |
| Put-call parity (no curve needed) | apply_rates(q, parity=True): forward and discount factor per underlying, expiry and minute, fitted from the chain | derived from your quotes; European roots only (for American equity options parity is only an approximation) |
Curves interpolate flat-forward (linear in r·t). Discrete dividends give the forward F = (S − PV(dividends)) erT, plus the equivalent continuous yield that the American engine takes (the standard escrowed-dividend approximation). Futures options use the futures price as the forward and set q = r (Black-76).
Same bits on every machine
A certificate's result digest matches across machines when the engine's inputs match, so preprocessing has to be reproducible too. The connectors prepare inputs reproducibly and send every row to the engine in spot terms, and the engine computes the forward and the discount factor itself. In our end-to-end test, the same raw vendor files gave identical certificate digests on Intel Xeon and AWS Graviton4, and each machine re-verified the other's certificates bit for bit (as did Apple M4 and Windows). If you write your own preprocessing, follow the same rule: pass S, r and q, and let the engine compute e−rT.
Reason codes
| 0 | solved |
| 1 | no two-sided quote (no mid) |
| 2 | no underlying price or forward |
| 3 | expired, or no quote time |
| 4 | no rate |
| 5 | no volatility reproduces the price (outside no-arbitrage bounds, or on the exercise boundary) |