Skip to main content

accel — PowerBridge native kernel extra

Optional PyO3 extension. Stable names (do not change):

thing name
extra accel
native extension module _accel
import pl_transpiler._accel

The crate lives in this directory (accel/ at the repo root), not inside pl_transpiler/.

The crate contains a native bar loop and FillEngine core: next-bar market, limit, and stop orders; this-bar-on-close queuing; long/short position state; PnL; open-relative intrabar ordering; money-management stop, target, breakeven, percent-trailing, and session-exit path walks. Rust unit tests exercise those pieces without crossing into Python.

Strategy-semantics policy: fail-loud fallback

The crate deliberately chooses the allowed fail-loud fallback approach. run validates and marshals all seven columns in one FFI call, then raises NotImplementedError with an ACCEL_FALLBACK_REQUIRED prefix. It never returns an empty or partial trade list.

The stable call has no EL source, AST, strategy identifier, instrument configuration, or Data2 column. The reference strategy itself needs aligned Data2 closes. Consequently, this call cannot distinguish two strategies over the same tape. Hard-coding the reference strategy or silently running no strategy would violate the fail-loud contract. The Python wiring owner must catch this refusal and run the existing Python path. A future owner-approved strategy-bearing contract can connect a generated Rust strategy to the already-native loop.

Build

System Python is PEP 668-blocked. Use a venv; do not pip install into system Python.

cd accel
python3 -m venv .venv
source .venv/bin/activate          # Windows: .venv\Scripts\activate
# cargo / rustc / maturin on PATH (~/.cargo/bin)
maturin develop --release
# Import from a cwd that is NOT the repo root: the real `pl_transpiler`
# package on the repo path would otherwise shadow this extra unless the .so
# is installed next to it.
python -c "import pl_transpiler._accel as a; print(a.ping())"  # 42

cargo build --release from accel/ also compiles the cdylib. On macOS that needs the dynamic_lookup rustflags in .cargo/config.toml (maturin passes the same flags).

python/pl_transpiler/ is a PEP 420 namespace marker so maturin 1.15 places the extension at pl_transpiler/_accel*.so. It has no __init__.py and must not grow a second Python implementation.

Exports

  • ping() -> int — trivial FFI probe. Always returns 42.
  • run(open, high, low, close, volume, date, time) -> list[dict] — stable bars-in / trades-out signature. It validates equal-length numeric columns, then raises the fail-loud fallback described above because no strategy is present. It never returns a computed result under the current contract. The implemented native fill conversion matches FillEngine.fills exactly / pl_oracle: {type, signal, date, time, price, contracts}.

One FFI call per run is the only viable shape. A per-bar callback is forbidden: it destroys the gain this extra exists to capture.

Native numeric model

Kernel arithmetic is stored as Rust f64. In the implemented trade/fill fields, narrow_f32 is called only at the corresponding Python f32() sites: fill normalization, weighted-entry intermediates/results, conditional and on-close fill prices, remaining FIFO average entry, short-close price, tick snapping, and a newly stored maximum drawdown. Rust unit tests include a regression vector where naïve all-f32 arithmetic differs from these explicit call sites.

Still required for an active native strategy

  • An owner-approved way to supply strategy semantics and required auxiliary data without changing or ambiguously overloading the stable call.
  • Python-side fallback wiring and packaging, owned outside this crate.
  • Closed-position/GTA6 introspection ledgers, which are not needed by the currently implemented explicit-order fill list but would be required by a native strategy that reads those reserved words.
  • Differential trade-list fidelity for any strategy implementation before enabling it. The reference strategy's full-tape oracle has not been run against this call.

Metadata

Release files for powerbridge-accel 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for powerbridge-accel 0.13.0
File Actions
powerbridge_accel-0.13.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for powerbridge_accel-0.13.0-cp39-abi3-win_amd64.whl
powerbridge_accel-0.13.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for powerbridge_accel-0.13.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
powerbridge_accel-0.13.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for powerbridge_accel-0.13.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
powerbridge_accel-0.13.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for powerbridge_accel-0.13.0-cp39-abi3-macosx_11_0_arm64.whl
powerbridge_accel-0.13.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for powerbridge_accel-0.13.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 3.3 MB

Release files / powerbridge_accel-0.13.0-cp39-abi3-win_amd64.whl

Download URL powerbridge_accel-0.13.0-cp39-abi3-win_amd64.whl
Size 550.3 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e66ec693ee0cb3eff941ac1990fb6385091b942f712f96bac5fb0b05d8206a82
BLAKE2b-256 checksum
How to use checksums
f1c5d9705f73b4a8cd4bf721a68ec86035e14498e1c20d5d0c82e6b285a11393
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 30, 2026.

Transparency log

Release files / powerbridge_accel-0.13.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL powerbridge_accel-0.13.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 725.7 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
48fb9e25ca3a66a2896e923a3d91584b5c0920b9cc7651eb4d878fe30099349f
BLAKE2b-256 checksum
How to use checksums
d22c4a8433092d2375d276eafecc02ea10dc627b4368c079683b37f3e80f4d43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 30, 2026.

Transparency log

Release files / powerbridge_accel-0.13.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL powerbridge_accel-0.13.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 695.6 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
4f3bf7b372fff321f9e83704aee7f67bed39b7d3838c355b614598503bab7981
BLAKE2b-256 checksum
How to use checksums
a161eca3e299efe8bdb37538200b871f39fa73f2d53ec2579b560d9f410e17ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 30, 2026.

Transparency log

Release files / powerbridge_accel-0.13.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL powerbridge_accel-0.13.0-cp39-abi3-macosx_11_0_arm64.whl
Size 635.6 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7110bcb7bc46e2c16849c8c3c8cb73608ef6f90fa2485e4b8895d2099440eab5
BLAKE2b-256 checksum
How to use checksums
de206221a345bf7d12abc14b1a06b05ac517d25449189fc3109095e2362d18f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 30, 2026.

Transparency log

Release files / powerbridge_accel-0.13.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL powerbridge_accel-0.13.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 659.3 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
db3598b2a6cf16356e58344792dfa274f88a350dd6522b978ec01b3a7162d584
BLAKE2b-256 checksum
How to use checksums
d3f0940e5192300dfaf986ab3666bf63ea7b036fb624e267cdf82e9b7abaa96b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 30, 2026.

Transparency log

Security for powerbridge-accel 0.13.0

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.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for powerbridge_accel-0.13.0-cp39-abi3-win_amd64.whl

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 Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.13.0 This release

5 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page