ironcondor (Python bindings)
Python bindings for ironcondor,
a high-performance options-strategy backtester with order-book-level fill
simulation, built on optionstratlib.
Status: v0.4, #39. The working backtest API —
BacktestConfig,run, andBundle— is wired over the same Rust engine. The typed exception hierarchy is #40 (errors currently surface asValueError/RuntimeError); PyPI wheels are a v0.4 deliverable and are not published yet — the distribution nameironcondoris unregistered on PyPI.
import ironcondor as ic
cfg = (
ic.BacktestConfig(seed=42, capital_cents=1_000_000) # $10,000, integer cents
.data_parquet("chains/spx_2025.parquet")
.strategy_iron_condor(
underlying="SPX",
underlying_price_cents=500_000,
short_call_strike_cents=510_000, long_call_strike_cents=520_000,
short_put_strike_cents=490_000, long_put_strike_cents=480_000,
expiration_ns=1_752_883_200_000_000_000,
quantity=1,
premium_short_call_cents=2_000, premium_short_put_cents=1_800,
premium_long_call_cents=800, premium_long_put_cents=700,
)
.exit_profit_percent(0.5) # optionstratlib ExitPolicy
.execution_naive(slippage_cents=5) # or .execution_realistic()
.fees(per_contract_cents=65, per_order_cents=100)
)
bundle = ic.run(cfg) # releases the GIL; runs the Rust engine AND
# atomically writes <output_dir>/<run_id>/
print(bundle.path) # the on-disk bundle directory run() published
equity = bundle.equity_curve() # -> pandas.DataFrame (needs the [pandas] extra)
metrics = bundle.metrics() # -> dict (from manifest.json)
reopened = ic.load_bundle(bundle.path) # validated through the hardened reader
Money crosses the boundary as integer cents (*_cents); the only floats are
the analytic exception (implied volatility, the two rates, ExitPolicy
percentages). Only what the engine wires end to end is exposed — a Parquet
source and the iron condor strategy; a CSV source and the short strangle are
not yet reachable through the binding.
DataFrame accessors (optional pandas extra)
bundle.fills(), .equity_curve(), .positions(), .greeks_attribution()
return pandas DataFrames read lazily from the on-disk Parquet. pandas (and
its pyarrow engine) is an optional soft dependency:
pip install ironcondor[pandas]
run(), load_bundle, metrics(), and bundle.path work without it — and
because the bundle is plain Parquet + JSON, polars / pyarrow can read
bundle.path directly instead.
Building locally
Wheels are built with maturin using the abi3
stable ABI, so one cp310-abi3 wheel per platform serves Python 3.10+. The
published wheel is a self-contained backtester — python (bindings) plus
orderbook (realistic execution) plus simulator (the synthetic-chain feed):
# from this directory (python/)
maturin build --release --features "python orderbook simulator"
# or, for an editable install into the current interpreter:
maturin develop --features "python orderbook simulator"
The crate manifest lives at the repository root; pyproject.toml points maturin
at it via manifest-path = "../Cargo.toml", and its [tool.maturin] features
already lists the same set (plus pyo3/extension-module), so a bare
maturin build --release produces the same wheel.
Releases and PyPI status
ironcondor is not published on PyPI yet — the distribution name is
unregistered, and publishing is a deliberate, owner-approved action
(docs/06 §8, CLAUDE.md).
- On every pipeline, CI (
.github/workflows/ci.yml, jobpython-wheels) builds andpytest-runs acp310-abi3wheel on Linux + macOS. - On a
v*tag, the release workflow (.github/workflows/release.yml) builds release-grade wheels — Linux (manylinux) + macOS x86_64 + macOS arm64 — plus an sdist, then publishes to PyPI via trusted publishing (OIDC, no token) — but only behind a manually-approved GitHubpypienvironment, and only once the owner has registered the name and its trusted publisher. Windows wheels are a deferred wishlist item, not a v0.4 target.
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 ironcondor-0.5.0.tar.gz.
File metadata
- Download URL: ironcondor-0.5.0.tar.gz
- Upload date:
- Size: 390.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f31ebd4fd48ef5e2181d1da7020fe51055c5418f479a42f674a900d9783cdbc9
|
|
| MD5 |
616ed5794b886a2d181f3b01e34a5df7
|
|
| BLAKE2b-256 |
f353fd0c14dcbb141eb2be462132c431b467df155152148dc0c378cf1aaabee4
|
File details
Details for the file ironcondor-0.5.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: ironcondor-0.5.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.6 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1592bf4b060d3cf8870749426520a4707b4c5cd468203999617d0cf8a5ece2ba
|
|
| MD5 |
5ab847e0cb2d0c300d437d753bba63e1
|
|
| BLAKE2b-256 |
b491b0caed0cf6e399d4f3bb4c95509b68d898e558e4ee49f0acf769203820a2
|