ironcondor (Python bindings)
Python bindings for ironcondor,
a high-performance options-strategy backtester with order-book-level fill
simulation, built on optionstratlib.
Status: v0.5.0, published. The backtest API (
BacktestConfig,run,Bundle) is wired over the same Rust engine, and the typed exception hierarchy landed with #40:IronCondorErroris the base, withConfigError,DataError,ExecutionError,StrategyError,BundleError, andEngineErrorbeneath it (ConfigErroris also aValueError;DataErrorandBundleErrorare alsoOSError), and no panic crosses the FFI boundary. The distribution is on PyPI asironcondor:pip install ironcondor. The 0.5.0 upload carries the macOSarm64cp310-abi3wheel plus the sdist; on Linux and macOSx86_64pip builds from the sdist for now, which needs a Rust toolchain.
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 published on PyPI; the name is registered and publishing
stays 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), behind a manually-approved GitHubpypienvironment. Windows wheels remain a deferred wishlist item. - Known gap at 0.5.0. The index carries only the macOS
arm64wheel and the sdist: the wheel matrix failed on the v0.5.0 tag run and the fix (bd7313d) landed after it, so the Linux and macOSx86_64wheels still owe a green release run.
Metadata
Release files for ironcondor 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ironcondor-0.8.0.tar.gz | 397.3 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ironcondor-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| ironcondor-0.8.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| ironcondor-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 9.5 MB
Release files / ironcondor-0.8.0.tar.gz
| Download URL | ironcondor-0.8.0.tar.gz |
|---|---|
| Size | 397.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e405bdff91b3c615b5fa693ded3933d4fb011903e7d6352306affc9d577729a8
|
|
BLAKE2b-256 checksum How to use checksums |
5f8ca01bec8cd428b5cd4dbe72bcfd342e44006a02619cda9394c0aeb94f740b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / ironcondor-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | ironcondor-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
721fe59be2f12c3188bbab3809e42c5dec7a56fa32860c50981312f47236c976
|
|
BLAKE2b-256 checksum How to use checksums |
2760cbb19dbaa18c55ce342c8fdfced6af91e70ee99641298358be4f1688033b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / ironcondor-0.8.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | ironcondor-0.8.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
75598ece9906919cb2f19fd1318112685a34c11fc3faf26f7aeab7849b5447b0
|
|
BLAKE2b-256 checksum How to use checksums |
7fb055b90d41fb92b786602c435b1d3023cbeaf5960fa45891200a18fca3b0eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / ironcondor-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | ironcondor-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
8072e3d5c9834f316122da3557c1ab7bd57f512141fb80b1150102a092044829
|
|
BLAKE2b-256 checksum How to use checksums |
9f28960201aa680e5f3542cc92f3eedb0c2d477850c00436020921850e6d2c24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency log