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.17.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.17.0-cp314-cp314-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.14Windows x86-64

nanobook-0.17.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.17.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.17.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.5 MB view details)

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

nanobook-0.17.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.17.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.17.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.5 MB view details)

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

nanobook-0.17.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.17.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.17.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.5 MB view details)

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

nanobook-0.17.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.17.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.17.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.5 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.17.0.tar.gz.

File metadata

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

File hashes

Hashes for nanobook-0.17.0.tar.gz
Algorithm Hash digest
SHA256 5acf02db1383a8e09b6f96f6d45522b1a33f031b02c0753ce9d1ddb41397715d
MD5 369b802a5360041dc5c551759f8b9c80
BLAKE2b-256 7c69947d3694356b46b434491762354fd8a9c0647983cdfa2c12247b3be5310b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: nanobook-0.17.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for nanobook-0.17.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 94a141796f766153f7658834ffc629dc418b974199b87b1acd999f0d8a507360
MD5 e90291c48cea64de4b8c775803f423d3
BLAKE2b-256 a8a91d755861052ad1a375d6ac37b48d703a9c24f515870d9a35b3bac6c80061

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c9855fe13363848ced6598354bd71e70030c7826d6acf90dbd338212c8edc7c
MD5 737760dc3fcd961804cc513a2abd58e5
BLAKE2b-256 28dc51127ab9c51acfced62f92698cd42b334549e216891a958553909b2245db

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e022740f0555a092bf60630f0de5380959a23c9473a11b8c8cd460051bd6f0c4
MD5 3ea45b8e7b00f3a4dd0700f5a1bb7894
BLAKE2b-256 23b0013614ae5bbf60a1bf1d6c96d2311d7f48e2e23cae8124dcf2984fee416d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.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.17.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 ac3e45dd36aa92df1756ea6f4130bf00e9b272295d0bec1a9cc1ecdd14bef695
MD5 74e1470f2108482743c5b56d51de0081
BLAKE2b-256 54d77aa1ac473903a094294da4418d5f4361632c9cbe9c5884823018574fb44a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fd5e84bc62bb50276e5f564dedcc3a7f585cdf5a7e0e1681c76a1cb9d6f72ffe
MD5 7213dd4f286126d99d97058d4a6a4876
BLAKE2b-256 3f0f42345ae65e8a17a6b9770ec49a8f3095872f8e74f5636f70ad7dc9f4e918

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d5ae5ac173fd3d773e268294d357d137b689fce2a42b5573efaf1670f30468c4
MD5 e9681c6542418252e6678d49e820ea89
BLAKE2b-256 bc706433b48aaa3573d8a6a17b883b6e3805ba4168062de69b605331c1b8b063

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.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.17.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 f13a2b4d3f658a5c9497d423ec8bb75191438a50c9efdd87366135b02b33261a
MD5 00ea3c7092cf0bd36f74c6356d4c3875
BLAKE2b-256 7d0f72bc4c1051adf7bfbbe1f12bf67fa8ce9b276a8f79810e6f0889fb158142

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 43eb17d6d7330e316266d0d599276d3571eddc9b6073fd2468e2a4bddbd97f68
MD5 6295dc269d0730ba212b2f09dcd089bf
BLAKE2b-256 4320d887cda46dcba7757b96a340c052ba9bdaa331153260c641cf81699f5616

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0a459ac689667d814c3d1c6df5a6da45b07af819caa5626f2686f5afcd7cac5a
MD5 052ccf57a6dded2a034111975a62d361
BLAKE2b-256 d9cf6fbcf92300d3f5dee5655d8dfb3eb49c507f06407c7e89c150d4b6a3a1bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.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.17.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 504bb2acefb8d22f0233a1ddb7b7dc9a2be12a43f4bafcc432edb66babd94b3a
MD5 4017a2ef403b24cce5b74264a9efdc8f
BLAKE2b-256 00e92ac1f16575ec76cdb4b74c5a0671ff74d2cde3a29e3ac342c31bbffcf116

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 90a0ef3fd235ae270cc8bc27c912a680cdf60e7e10e6838f6dd108dc5a8fa3f5
MD5 fd3e7a60f040bfe1aa6cbe00ff42e305
BLAKE2b-256 d278b27fe83cf3c3dd9079cd2dd41e586061fc784565abc2ae289d1760bb6124

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 208355a0ad628e7dcdff1cfe47dc435457b4e3424b873f6fa7914800513c82e5
MD5 b78a3426eb9e2758a560f732b5d9d961
BLAKE2b-256 96b3f6b56587dad9abf308b196844cefa5d6eb87eb33b3541f94029f8bcb47ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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.17.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.17.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 beccf89b46296fa060d24bf830a3aec79d63baf3f5791c30441e23a2d396ca50
MD5 39dc3acaca9cb92bf7b763da8f18ff03
BLAKE2b-256 3dc296a2ac772e34a4f122e0d3115b0cca03093d92a04ea143f120cb1f4d5eb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.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

0.18.0

14 files

0.17.2

14 files

0.17.1

14 files

This release

0.17.0 This release

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