Skip to main content

nanobook Python bindings

Rust extension plus pure-Python research helpers. Build with uv sync --group dev from this directory.

Monte Carlo scenarios (Rust-backed, parity-safe)

nanobook.scenarios provides terminal price distributions for stress testing and forecasting. When the extension is built with the scenarios feature (default in wheels), int/None seeds delegate to Rust: NumPy PCG64 draws feed Rust math so results match the nanotrade/calc reference at tight tolerance. A pure-Python fallback remains for random.Random seeds and environments without numpy.

import nanobook

res = nanobook.monte_carlo_stock_valuation(
    "XYZ",
    74.0,
    version="advanced",
    n_paths=200,
    seed=42,
    gp_growth_mean=0.16,
    multiple_mean=22.0,
    macro_shock_mean=-0.03,
)
print(res)  # MonteCarloResult(..., median_price=86.36)
print(res.median_price, res.implied_median_annual_return)

paths = res.to_price_paths(4, method="linear")
# See examples/scenario_backtest.py for feeding paths into backtest_weights.

Regenerate frozen parity fixtures:

cd ../../nanotrade && uv run python ../nanobook/python/scripts/generate_scenarios_parity.py

Run scenario tests:

uv run pytest tests/test_scenarios*.py tests/property/test_prop_scenarios.py tests/reference/test_ref_scenarios.py -q

Download files

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

Source Distribution

nanobook-0.18.0.tar.gz (6.5 MB view details)

Uploaded Source

Built Distributions

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

nanobook-0.18.0-cp314-cp314-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.14Windows x86-64

nanobook-0.18.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

nanobook-0.18.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64

nanobook-0.18.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.6 MB view details)

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

nanobook-0.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

nanobook-0.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

nanobook-0.18.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.6 MB view details)

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

nanobook-0.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

nanobook-0.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

nanobook-0.18.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.6 MB view details)

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

nanobook-0.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

nanobook-0.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

nanobook-0.18.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.6 MB view details)

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

File details

Details for the file nanobook-0.18.0.tar.gz.

File metadata

  • Download URL: nanobook-0.18.0.tar.gz
  • Upload date:
  • Size: 6.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for nanobook-0.18.0.tar.gz
Algorithm Hash digest
SHA256 d4d1b2e543c69950cb3dddb2b73dd21e43bdbc8b13636f62483d49c6d2e8241f
MD5 661be67722a5d26b82a9df2a6a183e29
BLAKE2b-256 e69156de960b93515d21f16ce215c693e74f59db4f6095ed71d7bb67857ac993

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0.tar.gz:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: nanobook-0.18.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for nanobook-0.18.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 b646868df2503c05b0e612dce865ea31d24197702b99874424181a4fcc0add76
MD5 dbe6591bae502fa9b45e000f7df3a84a
BLAKE2b-256 52470e90a3b3fdb45bcd4efe986b23eb1f4de77cc7cfa98900e880c073d9adea

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp314-cp314-win_amd64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9e22265267a5230968a0e2821c3caa68ee42950748303b026d1ff6958101e058
MD5 34438d5a9b0bdd94b0c55a802c22d6eb
BLAKE2b-256 faadbc4a5d001446117a754332be64764cdcb0a3add4c917d507cbd2e5bef7eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f91f4c79d42c78eff45cd50eacc88911e02ac2f9ff3738d95ba6b39fc5882cb3
MD5 61352c2c9a81e70de2c71a5f7f2975bd
BLAKE2b-256 c2dc51f31d9609dcbb4d74e232af841beda6bedef173c40109e326e01ec14134

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 9a3aa91d045ff4d82cc661e63371c2bafa0a30f48d4d965c2d658ce6f0608148
MD5 62764d897a6efe0d44d15985662b782b
BLAKE2b-256 c4a587760e4452ccb5a7734770658ff9e2085f3780a9f9ffd45412e400731166

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ff6f316a0d6f2fc0f65af2aa8d4949630ff26b8410a0b3e3c8386a687315631b
MD5 66298868431957becf9a119337560e53
BLAKE2b-256 6681c9178720fe24ed6d7bcd5d0cf353355fe4ad26ec845226b13864ac1d31d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 63c75d3333ef30d1e9314c91a3a42b169df62367a2c1fd6aa658ef9166a6a788
MD5 3b6151f5f375186f0de56927dcfc7113
BLAKE2b-256 3598148fa3d75e7b9a11124fa153d230bc852a3c0e8c6c81439b48d9e0792915

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 620f52cb22379d25ab8941c11b2e3eed78bec02f6ccb9baf67cf34a8f23b6d3d
MD5 0487e70607bac0a116b8c525cbc9ba20
BLAKE2b-256 28ff24794fa7354f92b79899c02aee5f470ff053f4b79f7ae69bdf82479a5cbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 75a80b52cb3862d4bd38ca0d132c746641840bd739ef2b587c8a03fbafd7a6d8
MD5 86f9acf161ecd54ee75873298c9eb381
BLAKE2b-256 9029d23db5921f782d49c99404a745a0cff7c9a74f0484a9a26813ef499f4951

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f2b0d3f3af3d3cca714b81ae3f89d977275db52597e4c5148048fe7baae48c7d
MD5 624bdf277b734ac01ccc0ff20f22e90c
BLAKE2b-256 ac1a778a093778bd5357b2f3d909bb6a12628e8ea5311c79a79b87b07023c74f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 1d8447e9b18f34b06624db5d2a14f1f4f3dc6f3b66344c9d0ca3cf46c5eaa771
MD5 d0680ac532cf5f00c0845c0c4414dc29
BLAKE2b-256 54581cca1e54f6c2360f4250d67de48ca46fb812908527eab23acd896bf91f8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 94f800f063cd84e63b9cb3ab51c9260a479e841f301bfabee8919ceabd670fca
MD5 47b6ec337f41c585c5243306c69d6452
BLAKE2b-256 00964190d4ffe0286c5da8c090716a61e187fe568820263fe955677f5f2c3db3

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9c7652a1614695e04f40868a3b3c29e3862e6885c5de85ef23a37901afb8081c
MD5 d29c77969d7cf66ab8a8a9796a6b85fc
BLAKE2b-256 040dbd1ce857dd26adf358edcdd043af5222805a6179fc87ca5bb0ca5afcf2c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

File details

Details for the file nanobook-0.18.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for nanobook-0.18.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 1d75bbef01eb4b3b3a6892a52f1e6926bd9f0b28fa29f8e0a66d819a2ef1e226
MD5 67596344b656f5653e61e1eb1f616d8a
BLAKE2b-256 d39aa0f11382bf75fa5d3c13d37adefd801cd760f51c96bf5c469f4210120703

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.18.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

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

Release history Release notifications | RSS feed

This release

0.18.0 This release

14 files

0.17.2

14 files

0.17.1

14 files

0.17.0

14 files

0.16.2

14 files

0.16.1

14 files

0.16.0

14 files

0.15.1

14 files

0.13.0

14 files

0.12.0

15 files

0.11.0

14 files

0.10.0

14 files

0.9.3

14 files

0.9.2

11 files

0.9.1

11 files

0.9.0

2 files

0.8.0

2 files

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