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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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.6.0.tar.gz.
File metadata
- Download URL: ironcondor-0.6.0.tar.gz
- Upload date:
- Size: 388.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70b7c0dc7fdae621d9f4367a4ad384159b3be96a6b0ce127fc098c0b5e1a4c80
|
|
| MD5 |
ea93bc8bda8418a2d9986f51e3514ea4
|
|
| BLAKE2b-256 |
395c68352cf36158ea6d9b81f947f7351f97462488b3f8471b6f10ae142bf292
|
Provenance
The following attestation bundles were made for ironcondor-0.6.0.tar.gz:
Publisher:
release.yml on joaquinbejar/IronCondor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ironcondor-0.6.0.tar.gz -
Subject digest:
70b7c0dc7fdae621d9f4367a4ad384159b3be96a6b0ce127fc098c0b5e1a4c80 - Sigstore transparency entry: 2712970555
- Sigstore integration time:
-
Permalink:
joaquinbejar/IronCondor@7448d16e16ea360a9353a33f44c60193d8f9ee63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/joaquinbejar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7448d16e16ea360a9353a33f44c60193d8f9ee63 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ironcondor-0.6.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: ironcondor-0.6.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daf67d690f2991b6d9b95b935938efb6fe9c1f7534529e6b1931726c7dc69377
|
|
| MD5 |
0624fa87ab993b67a1fa397f1c0e0c86
|
|
| BLAKE2b-256 |
92843085ed8863e6a0275df118f399b4ada81d7a8606749b6947be164e5c0b76
|
Provenance
The following attestation bundles were made for ironcondor-0.6.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on joaquinbejar/IronCondor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ironcondor-0.6.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
daf67d690f2991b6d9b95b935938efb6fe9c1f7534529e6b1931726c7dc69377 - Sigstore transparency entry: 2712971211
- Sigstore integration time:
-
Permalink:
joaquinbejar/IronCondor@7448d16e16ea360a9353a33f44c60193d8f9ee63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/joaquinbejar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7448d16e16ea360a9353a33f44c60193d8f9ee63 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ironcondor-0.6.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: ironcondor-0.6.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fa66b0fe01e88b3cfe13d64424cc87ed03d738b027cf91e342511416b993b19
|
|
| MD5 |
ecea3a609c02766c528fccdba9d43bfd
|
|
| BLAKE2b-256 |
2187cc556decbe83660c348846613dd2cedeb9ee62f186f912cc363c522ffd9a
|
Provenance
The following attestation bundles were made for ironcondor-0.6.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on joaquinbejar/IronCondor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ironcondor-0.6.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
4fa66b0fe01e88b3cfe13d64424cc87ed03d738b027cf91e342511416b993b19 - Sigstore transparency entry: 2712971399
- Sigstore integration time:
-
Permalink:
joaquinbejar/IronCondor@7448d16e16ea360a9353a33f44c60193d8f9ee63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/joaquinbejar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7448d16e16ea360a9353a33f44c60193d8f9ee63 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ironcondor-0.6.0-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: ironcondor-0.6.0-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ce0c744bc6df8e3ce62d9dbfdef4f17feea626f0bcb401278bdbd08d2ef184f
|
|
| MD5 |
7c802b9651afc29aeba1d8b9758d6bc0
|
|
| BLAKE2b-256 |
8d341fe0db0b649dafd74ae44d5a9c3b23d7b17a9088cdfca686acd40288b8e4
|
Provenance
The following attestation bundles were made for ironcondor-0.6.0-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on joaquinbejar/IronCondor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ironcondor-0.6.0-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
8ce0c744bc6df8e3ce62d9dbfdef4f17feea626f0bcb401278bdbd08d2ef184f - Sigstore transparency entry: 2712971105
- Sigstore integration time:
-
Permalink:
joaquinbejar/IronCondor@7448d16e16ea360a9353a33f44c60193d8f9ee63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/joaquinbejar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7448d16e16ea360a9353a33f44c60193d8f9ee63 -
Trigger Event:
workflow_dispatch
-
Statement type: