Skip to main content

Powerful and flexible SDE simulation library with Rust-accelerated Monte-Carlo

Project description

sde-sim-rs: Flexible stochastic differential equation simulation library written in Rust

Release PyPi Release Crate

sde-sim-rs is a high-performance library for simulating stochastic differential equations (SDEs), which are foundational in fields like quantitative finance, physics, and biology. By leveraging the speed and memory safety of Rust, the project provides a fast and flexible core while offering seamless bindings for use in Python and Rust. This project is ideal for researchers, data scientists, and developers who need to run complex SDE using Monte-Carlo and quasi Monte-Carlo simulations with remarkable efficiency and reliability, while bridge the gap between high-performance compiled languages and the scientific computing ecosystem of Python.

Features

High Performance: The implementation in Rust provides bare-metal performance, which is critical for time-sensitive and computationally intensive simulations. The language's zero-cost abstractions and memory-safe concurrency models allow for the efficient handling of large datasets and provide the potential for parallelizing simulation tasks, offering a significant speed advantage over purely interpreted solutions.

Flexibility: The library's design and modular architecture allows for the creation and integration of custom SDE models to suit specialized research or application needs.

Multiple Simulation Methods: The library includes both Monte Carlo (MC) simulation, using pseudo-random numbers, and Randomized Quasi-Monte Carlo (RQMC) simulation, using Sobol sequences randomized by scrambling (random XOR) to provide an unbiased estimate with better sample coverage.

Multiple Integration Schemes: The library also implements several integration schemes, including Euler-Maruyama and Runge-Kutta first order.

Python Integration: A user-friendly and comprehensive Python interface via maturin allows you to utilize the Rust core without leaving your Python environment. This means data scientists and researchers can leverage the speed of a compiled language for the most demanding parts of their code, with bindings designed for seamless function calls and data exchange between the two languages.

Setup

Python

Install the latest sde-sim-rs version with:

pip install sde-sim-rs

Requires Python version >=3.11,<3.15.

To build the package locally for, you'll first need to compile the Rust package for local development. The project is set up to use maturin and uv. This command builds the Rust library and creates a Python wheel that can be used directly in your environment.

uv build

After the compilation is complete, you can run the example to see how the library works. This command uses uv to execute the Python example script.

uv run examples/example.py

Rust

You can take latest release from crates.io, or if you want to use the latest features / performance improvements point to the main branch of this repo.

sde-sim-rs = { git = "https://github.com/Aschii85/sde-sim-rs", rev = "<optional git tag>" }

An example file for using the crate can be found in examples/example.rs, which can be run using cargo run -r --example example.

Links

Contributing

We welcome contributions from the community! If you'd like to contribute, please feel free to open an issue to discuss a feature or a bug fix, or submit a pull request with your changes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sde_sim_rs-0.5.1.tar.gz (42.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

sde_sim_rs-0.5.1-pp310-pypy310_pp73-manylinux_2_28_armv7l.whl (19.0 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARMv7l

sde_sim_rs-0.5.1-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl (19.1 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

sde_sim_rs-0.5.1-pp39-pypy39_pp73-manylinux_2_28_armv7l.whl (19.0 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARMv7l

sde_sim_rs-0.5.1-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl (19.1 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

sde_sim_rs-0.5.1-cp310-abi3-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.10+Windows x86-64

sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_x86_64.whl (19.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_i686.whl (20.5 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_armv7l.whl (19.2 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_aarch64.whl (19.2 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_x86_64.whl (18.9 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_i686.whl (21.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ i686

sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_armv7l.whl (19.0 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARMv7l

sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_aarch64.whl (19.1 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

sde_sim_rs-0.5.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (35.8 MB view details)

Uploaded CPython 3.10+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file sde_sim_rs-0.5.1.tar.gz.

File metadata

  • Download URL: sde_sim_rs-0.5.1.tar.gz
  • Upload date:
  • Size: 42.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sde_sim_rs-0.5.1.tar.gz
Algorithm Hash digest
SHA256 e540c1c8aa11173f8d8cf2970eaddedf0c6699145437fa6d0b9d21ceda10048d
MD5 d5aa6e1c197247c30b16957fda49d12a
BLAKE2b-256 5a0d5608971c5858c4569b4f1034194c1e9095a41550e108adfec38ea821e767

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1.tar.gz:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-pp310-pypy310_pp73-manylinux_2_28_armv7l.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-pp310-pypy310_pp73-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 02037a5421f8122ebbb6f6ba7233578f3270bf65b25e2d30eaa7b76daa1c8df9
MD5 2fb35e013642449665fb507b700cea39
BLAKE2b-256 5ff7fc0bff6d1c1cfda7e7810024f7c53265613b807480eb00061ba4d1601b50

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-pp310-pypy310_pp73-manylinux_2_28_armv7l.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8f072fb7037e0f70bb145f26330acd3211f371bd770ccdfce7475cb25f9e2e27
MD5 d9b6065f0659ba61ee3294343274b4df
BLAKE2b-256 7ec91acbb804e589c29537a7a4f4241389473ec81d4e92fb094346bca53640ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-pp39-pypy39_pp73-manylinux_2_28_armv7l.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-pp39-pypy39_pp73-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 138bba720ecadd87ac54fb0aaf5c4e00c53b96f09ecc584c9626c0de7c22a1a1
MD5 9a604233529d8b4323ff30aa5087db81
BLAKE2b-256 f7b86c5c86e7d6c49a52426186163b87ef7e1e9dd77690c3c284b6b774fb4b14

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-pp39-pypy39_pp73-manylinux_2_28_armv7l.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1b62dd0ae6ab5d1ebacc4183a32410206fd65e70c0fa58fec77d69974cf3eb9a
MD5 b10efba8051b8c42fca15acf12e084ce
BLAKE2b-256 7f40bf49c63c15eb30bce1c573bc2236920e3acc8f55161b47e7bf6f04ea78ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: sde_sim_rs-0.5.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sde_sim_rs-0.5.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 de7209ea9c48165e42049b286adb3ec597bad15ed423a79b6314047fadb4e6eb
MD5 c09c730bb37350f5f593bade5ed6ab65
BLAKE2b-256 b4ea4e19f75e554921f9823d50187b0702fd9d150c8a707fb16cce67d9d5397a

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-cp310-abi3-win_amd64.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4de67d170af2e977e71ca7ced770b9019b0fffe8081e2f102eddbeee4669aebe
MD5 f9207505ff89da5bf662dbb033389965
BLAKE2b-256 1c999b139c455e36904df39b1427b3f85dbd958f2d583b143e574913730c0ccd

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 bc8774c4254104791a6697d027a9f038e09cc105a5e13fc6e6aae9729f24cfc8
MD5 cdcb130b70c196774fd197e2f8445ddd
BLAKE2b-256 de8adcba4186f7ff48ea40fb582e5bd38b47ddb35725f4d1cdd384afe613cc15

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_i686.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 f496a6e73dfe2c9b99c5455c6d2bdb7be70463c1d8c91b2923c03111fd2010e3
MD5 537765b0049feda1eb71936ad042496b
BLAKE2b-256 5f12ad21511ce1a908594ccbddbed9d39858158d79737e422ca26f2a6c632dbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_armv7l.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 2ae66041ec4a6151f678c068f743d3af2248e3869254946f471491beecb03582
MD5 60fbb145a8073d1c8eefdab80ceebb1e
BLAKE2b-256 5f5e8540fe9df95c3fe18f8a65d0315446ae90c81b642cf2352a711bc0969780

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d2349e52c31a369692755afa6e081007bf0b3572955bc229be3e2ba288d45ab4
MD5 4d4212ee83f375d0bf86e2dae10c91f4
BLAKE2b-256 ef78b478fcdc2402d2645ea0a163ac913269b20a1d3a63c1f0c0c76ab1801638

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_x86_64.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 de4e7eb3659777126a62e8a697c0027477106748d555aae7dc0c4a12db2c2cad
MD5 63faa16de43002831bc29c7e7753dd14
BLAKE2b-256 1c413734c70e4576be822d99167cc0fd7d311f9d3f96c0cdcc77375b86842e92

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_i686.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_armv7l.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 931b01c6865ebc315ad7b0e63a15cdf9a8022563ccd68a9914b4923ed04f1230
MD5 c2473890e6a134de116898f8e47f3920
BLAKE2b-256 f330a3afd3b4a1fa8cb213a25c24e98e292bbef1e7c048997e479fa51d4eceea

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_armv7l.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 00565680bc15fe32c6079f2e30cd96171f04d77c1ecbc9e9880a4e92819b8663
MD5 a9921a2a0bb367bf65dd829535036a14
BLAKE2b-256 73e7f9035599d996474cc64c85090f61a5760e6e45129727c851ecb9f9eacccb

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-cp310-abi3-manylinux_2_28_aarch64.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sde_sim_rs-0.5.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for sde_sim_rs-0.5.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 0eb3d4ed3b9b2fdb865cba1eeaa2cf69dcc4b1e710852050fa4c85421e5b464d
MD5 c630df0551af9ebd647992d44d6ab3ae
BLAKE2b-256 aacd183823559d56b570cd34fd0c9532b76abf7c814d80ebb19a43b0db29ef81

See more details on using hashes here.

Provenance

The following attestation bundles were made for sde_sim_rs-0.5.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: Release PyPi.yml on Aschii85/sde-sim-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page