BACKTESTER (nanoback)
nanoback is a C++20 event-driven backtesting engine with Python APIs for research, paper trading, and production-grade validation workflows.
What's New (v1.0)
- Live bridge (
v0.6):PaperBrokerstreams real-time ticks into the same engine path as backtests - Safety reconciliation:
Reconcilerdetects and optionally auto-corrects engine-vs-broker position drift - Interactive reporting:
result.plot()equity + underwater drawdownresult.to_html("report.html")self-contained shareable reportresult.dashboard()Streamlit analytics panelsweep_result.heatmap(...)Plotly parameter robustness diagnosticswfo_result.plot()IS vs OOS Sharpe + OOS equity
- Release quality:
- Multi-platform wheel publishing through
cibuildwheel - Benchmark regression guard on CI merges to
main - Expanded edge-case regression suite
- Multi-platform wheel publishing through
Install
pip install nanoback
Optional extras:
pip install "nanoback[io,viz]"
Core Example
import numpy as np
import nanoback as nb
result = nb.run_backtest(
timestamps=np.array([1, 2, 3, 4], dtype=np.int64),
prices=np.array([100.0, 101.0, 99.0, 102.0], dtype=np.float64),
signals=np.array([1, 1, 0, -1], dtype=np.int64),
config=nb.BacktestConfig(max_position=2),
)
print(result)
fig = result.plot()
result.to_html("report.html")
Paper Trading Bridge (v0.6)
from datetime import datetime, timedelta, timezone
from nanoback.paper import PaperBroker, PaperTick
import nanoback as nb
class Feed:
def __init__(self, ticks):
self._ticks = list(ticks)
def next_tick(self, timeout_seconds=None):
return self._ticks.pop(0) if self._ticks else None
def fetch_positions(self):
return {"AAA": 0.0}
def submit_order(self, symbol, quantity_delta):
pass
def strategy(tick, state):
return {"AAA": 1}
broker = PaperBroker(
symbols=["AAA"],
strategy=strategy,
feed=Feed([PaperTick(timestamp_ns=1, symbol="AAA", price=100.0)]),
config=nb.BacktestConfig(max_position=2),
)
broker.run_until(datetime.now(timezone.utc) + timedelta(seconds=1))
Repo Layout
cpp/,include/nanoback/: core engine and bindingspython/nanoback/: analytics, live bridge, strategy, sweep/WFO/MC modulesbenchmarks/: latency/stress harnesses and baselinestests/: regression suite
Development
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e .[dev]
python -m pytest
Metadata
Release files for nanoback 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nanoback-1.0.1.tar.gz | 65.3 kB | With provenance | Details for nanoback-1.0.1.tar.gz |
Built distributions (wheels)
Total release size: 3.9 MB
Release files / nanoback-1.0.1.tar.gz
| Download URL | nanoback-1.0.1.tar.gz |
|---|---|
| Size | 65.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b426333492096ccd2e21f5f74f503b0494784da2206b95a93e46457afe8401f6
|
|
BLAKE2b-256 checksum How to use checksums |
b7fa67cd0303e97d8b4005ffa5f76873cce7812a93576c888f2368cee5540c64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp313-cp313-win_amd64.whl
| Download URL | nanoback-1.0.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 227.0 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
70683371996fd5b989b3a90d69a1330341d653c4a133ad41789bc9431ab85e19
|
|
BLAKE2b-256 checksum How to use checksums |
d46fdad3a989a45f44ed6c5cc9b3b60f0a0976cc183362086606887cbdcfe0bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nanoback-1.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 300.1 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
d23b3fd610a885db88350b76123cf680519555cbe6755917ac6254bcfbc5890a
|
|
BLAKE2b-256 checksum How to use checksums |
a6145655f4ccf2e3417b06bf3cdbe5cb96d6e99d084a27a1e70a1fc4df597318
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | nanoback-1.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 266.1 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
a7f6687c73ca32cbe18b94f4496938a12b1603fa865697553cf2ff8b123ffd4f
|
|
BLAKE2b-256 checksum How to use checksums |
513772a7fa476c227bb131244d08b5d1c64ca664fb22283aac09c90bb3f95dc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | nanoback-1.0.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 230.7 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4c15f4b9dce7ef97336f2b2c076ed1b3ba5132b279ee7a348f0c03dcfd7fd86f
|
|
BLAKE2b-256 checksum How to use checksums |
70c80f5696b782dcb4712fd6913cfdbcada5c64ca27dff783aa712cdd5be75e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp313-cp313-macosx_10_13_x86_64.whl
| Download URL | nanoback-1.0.1-cp313-cp313-macosx_10_13_x86_64.whl |
|---|---|
| Size | 250.2 kB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
81eb430e0d0a7f0571bbc594d554616418f1feae4e8d5833fb504416f64e8641
|
|
BLAKE2b-256 checksum How to use checksums |
6a2bbfb790d08aa9d6d1b8d7290166f61888262b604920592655a8a6f6fe9ae0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp312-cp312-win_amd64.whl
| Download URL | nanoback-1.0.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 227.0 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
134a9bc7bb7f3c2b10faac2e7cc27fe4e3812107999a5109de99bcc20ae9fa6c
|
|
BLAKE2b-256 checksum How to use checksums |
117e22ea84a9a7345f94bd41839e4b6b0a3ed6d0f26d0c897f2b1c86e4ad4024
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nanoback-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 300.2 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
bca09af4e0b53cb28e126d102415b14ccf44bff3368709c4ca30d6d9bd221e9d
|
|
BLAKE2b-256 checksum How to use checksums |
550363803ce2678234b56f6ca38fdac0db56fa2eab1e46f701984086d3183630
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | nanoback-1.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 266.4 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
9274c6e4b3f5e086aa2be3eed3d6d4490deb502bbab1c42c3b22c1ffebcc4b50
|
|
BLAKE2b-256 checksum How to use checksums |
65a0313ec9d82055e6dac25cc7020f842ab0b7205b80e914e66050d8ba2217dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | nanoback-1.0.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 230.6 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2a2dd097e07966df57dc45643d337aa58f675954568217b2bcb60e2df92a8bb3
|
|
BLAKE2b-256 checksum How to use checksums |
62f498b160f795a916d2dfb4b974d78dbf3fcd57df40642b9c09491407de5dde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | nanoback-1.0.1-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 250.2 kB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
ba96cbbd9abd7067942fb36b0541108658039453015df77e403dd0d683e41d14
|
|
BLAKE2b-256 checksum How to use checksums |
c583bd2ae9157a4083c141ed0dcc26bf87cda2c2c8824e81c53f348e9dd3deb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp311-cp311-win_amd64.whl
| Download URL | nanoback-1.0.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 225.6 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
84c3f641001e7d229be17a6f28bf8a85e2dbe876ddfa3720afec47a91a607e87
|
|
BLAKE2b-256 checksum How to use checksums |
7ffd1eebd9143ada2527825bfad3a79e67d207cfbb67aa17319545d1dfd35c03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nanoback-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 298.3 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
1499709a01ade651b021ebe4d99df6a2cf958d110f0396ba20e349f0a264e3d0
|
|
BLAKE2b-256 checksum How to use checksums |
f84ce39df94bc14801918e175afbb8c53d1fbb91e0e118015d666aef933353cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | nanoback-1.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 267.0 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
ad448699bb322abb7008d200511c12fc36f552bb8243a39c54e2322b46ab0985
|
|
BLAKE2b-256 checksum How to use checksums |
7ce2a60a2ccbbabf363779a788789c42116b7eebc2f4c90328b6ef2e5fec8ce5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | nanoback-1.0.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 228.7 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
89f8bbc73040ddaa65e57ad6e1dfa02dd712f899bff870caa3a13bfc24290863
|
|
BLAKE2b-256 checksum How to use checksums |
4948d567aa2f12479ee45160d1ac9b730463382b311787a9e43c074d4fcad10f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / nanoback-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | nanoback-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 246.2 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
b96872794e5777c60fec87d1b4a2139ff99308aa8f23cf0d84531cb2922be697
|
|
BLAKE2b-256 checksum How to use checksums |
17660d94d95cd7a5f9d7f709f8dec55abb6706fe000f79cd85b1519b424d246e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logSecurity for nanoback 1.0.1
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 16 files in this release have been uploaded with provenance metadata.
Attestation for nanoback-1.0.1.tar.gz
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 May 11, 2026.
Transparency logA 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.