Option Valleypowered by Riptide, The World's Leading AI Research Lab
Documentation · v1.0

Connectors

Reading your quotes, rates and dividends: the quote schema, file formats, feeds and vendor adapters.

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

columntypemeaning
underlying, root, symbolstringunderlying (SPX, AAPL, ES); option root or trading class (SPXW); the vendor's own symbol, kept for joins
expiry, expiry_tsdate, ns UTCexpiry 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, settlementfloat, C/P, A/E, AM/PMstrike 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, lastfloatNaN when missing
quote_tsns UTCquote time
underlying_price, underlying_kind, multiplierfloat, equity/index/future, floatspot, index level or futures price at quote time
r, q, forwardfloatcontinuously compounded rate and dividend yield to expiry; forward when it is known (futures, parity, discrete dividends); set by rates.apply_rates
sourcestringconnector 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

sourcecallnotes
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 / Featherread_arrow(path, mapping)pyarrow
Newline-delimited JSONread_ndjson(lines, mapping, select=...)select drops heartbeats and other messages
StreamsNdjsonStream(mapping, batch=10_000, latest_only=False)micro-batches; latest_only=True keeps the last quote per symbol
WebSocketawait 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.

vendorcallwhat it readsstatus
Databento OPRA.PILLARread("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 productsynthetic; untested against live feed
ThetaDataread("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_v1synthetic; untested against live feed
Cboe DataShop / LiveVolread("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 ignoredsynthetic; untested against live feed
OptionMetrics IvyDB USoptionmetrics.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 ratessynthetic; untested against live feed
Interactive Brokers TWS / IB Gatewayibkr.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 NaNsynthetic objects; untested against live feed
Alpacaread("alpaca", snapshots_json, contracts=contracts_json)options snapshots and latest quotes; style and size from /v2/options/contractssynthetic; untested against live feed
Tradierread("tradier", chain_json, underlying_price=...)/markets/options/chains (one option as an object handled)synthetic; untested against live feed
Schwab Trader API / TD Ameritraderead("schwab", chain_json)callExpDateMap / putExpDateMap; ISO or ms expirations; the chain's interestRate only with use_chain_rate=Truesynthetic; 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 handlersynthetic; 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.

inputcallterms 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 curverates.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 Programrates.h15_curve(csv, date)Federal Reserve Board data
NY Fed SOFR and SOFR Averagesrates.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 / IDXDVDrates.read_ivydb_zero_curve, read_ivydb_distributions, read_ivydb_index_dividendyour IvyDB licence
Discrete dividendsrates.load_dividends_csv(path): underlying, ex_date, amountyours
Put-call parity (no curve needed)apply_rates(q, parity=True): forward and discount factor per underlying, expiry and minute, fitted from the chainderived 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

0solved
1no two-sided quote (no mid)
2no underlying price or forward
3expired, or no quote time
4no rate
5no volatility reproduces the price (outside no-arbitrage bounds, or on the exercise boundary)

Start a paid pilot Request the evaluation pack