OptionChainAnalytics
OptionChainAnalytics provides point-in-time option-chain containers, feed normalisation, chain reconstruction, queries, and visualisation in Python for quantitative research.
It is the data-container layer: provider retrieval, pricing models, portfolio backtests, and
proprietary datasets remain separate. Pricing and implied-volatility inversion are delegated to
vanilla-option-pricers; generic time-series
and plotting utilities come from qis.
Install
OptionChainAnalytics requires Python 3.14 or newer.
Install the published package:
pip install option-chain-analytics
For development from a clone:
pip install -e .
Provider-specific integrations are optional:
| Extra | Capability |
|---|---|
vlad |
Local Arrow/Feather Vlad fitted-chain files |
deribit |
Deribit HTTP collection helpers |
yahoo |
Yahoo snapshots and the fitter used by that adapter |
ccxt |
CCXT market-data integration |
bloomberg |
Bloomberg retrieval through bbg-fetch |
fitters |
CVXPY-based quote fitting |
docs, dev, all |
Documentation, contributor tooling, or every optional integration |
For example, pip install "option-chain-analytics[vlad]" installs the Vlad file dependency without
installing unrelated network providers.
First success: no data or credentials
The authoritative offline example constructs a deterministic Black-Scholes-Merton option panel, reconstructs a historical chain, queries its front-expiry ATM strike and volatility, and selects a weekly roll maturity:
python examples/first_success.py
Expected evidence:
ticker=SYNTH
observation_times=2
contracts_at_first_time=30
expiries=['12Jan2024', '19Jan2024', '16Feb2024']
first_expiry_atm=100.00, vol=0.2057
weekly_roll_expiries=['12Jan2024']
See examples/first_success.py for the executable source. The
documentation includes that file directly, so the tutorial cannot drift into a second
implementation.
Data model
OptionsDataDFsholds an option-observation panel (chain_ts) plus an aligned spot-price frame.SlicesChainreconstructs all available expiries at one exact observation time.ExpirySliceprovides call/put, ATM, delta-strike, volatility, open-interest, and execution-price queries for one expiry.SliceColumndefines the common option-feed schema, including source time, contract, forward, discount factor, strike, expiry, quote, implied volatility, Greeks, volume, and open interest.
Observation and expiry timestamps are timezone-aware. A point-in-time reconstruction performs an
exact timestamp lookup; it does not silently use a later observation. Volatilities are decimals
(0.20 means 20%), time to maturity is in years, and each adapter must preserve and document its
price/multiplier convention.
Empirical feeds
Local adapters cover Deribit/Tardis crypto histories and SPX/VIX Vlad fitted-chain files. These
datasets are not distributed. Set OCA_DATA_PATH to an ignored local data root; generated output
uses OCA_OUTPUT_PATH. Vlad files can be mapped with:
from option_chain_analytics import OptionsDataDFs
from option_chain_analytics.ts_loaders import load_local_vlad_options_data
options_data = OptionsDataDFs(
**load_local_vlad_options_data(
ticker='SPX',
start='2023-01-03',
end='2023-01-03',
is_compute_bid_ask_iv=True,
)
)
Vlad data supplies implied forwards but no independent spot series. Pass spot_data, or use
is_use_front_forward_as_spot=True only for visualisation; a forward proxy is not a valid spot
return series for backtesting.
The Bloomberg BVOL-to-synthetic-option mapping remains a TODO: it must define maturity rolling and price generation before BVOL surfaces can be represented as option panels.
Documentation and development
Start with the documentation site, then read the schema contract, point-in-time reconstruction, and data-source guide.
pytest -q
ruff check src tests examples tools docs/conf.py
sphinx-build -W -b html docs docs/_build/html
python -m build
The installable package lives under src/option_chain_analytics/; repository-only scripts live in
examples/. Local datasets, agent reports, and generated outputs live in ignored data/, agents/,
and outputs/ directories.
Research and licensing boundary
OCA can provide a public, auditable input layer for empirical studies and replication. Strategy logic and the QF-paper backtests remain in SigmaStrats, and a public example is not expected to reproduce results computed from a private production dataset exactly.
The software is released under the MIT License. Dataset licences and access terms are
separate from the software licence. Citation metadata is provided in CITATION.cff,
and contribution guidance is provided in CONTRIBUTING.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file option_chain_analytics-2.0.0.tar.gz.
File metadata
- Download URL: option_chain_analytics-2.0.0.tar.gz
- Upload date:
- Size: 80.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10bceb7b97e2488c9713f7a468354f663116f6ee7d6c000bb6ea59484bec1728
|
|
| MD5 |
1c24bc6b03f8f586d8358549fc3facac
|
|
| BLAKE2b-256 |
5e1cb9b6a5336ca9463864fbdaec0c49cfbddca65593b6c7eba82eaf6ba7734a
|
File details
Details for the file option_chain_analytics-2.0.0-py3-none-any.whl.
File metadata
- Download URL: option_chain_analytics-2.0.0-py3-none-any.whl
- Upload date:
- Size: 69.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5b0007c5bfbd658cfd209c437236cc9c3a746c70aa5b572cda734800fb09993
|
|
| MD5 |
6f5b392c48d672fa27fa367a42d31e84
|
|
| BLAKE2b-256 |
105bc7cce35662ff54e9f27de64f5373b7c9e1aaf3b17c48ab6d0a66135c798f
|