Skip to main content

deptho

Deptho is the tick-level reality check for any backtest. Bring signals from any backtester or custom code, and Deptho replays them against months of real trades from Binance's public archive, entirely on a local machine. The free library shows funding and fees by position; Deptho Pro handles tick data bigger than memory.

pip install deptho
python -m deptho.demo               # 90 days of BTCUSDT perp data from Binance's archive, a sample strategy, a report
python -m deptho.demo --synthetic   # same, offline

A tearsheet that shows what costs took

import deptho as dp

pnl = dp.pnl_from_positions(prices, positions, funding=funding_rates, fee_bps=4)
dp.tearsheet(pnl=pnl, benchmark=prices.pct_change(), title="BTC perp momentum").show()
  • Net vs gross equity, so you see exactly what costs took
  • Cumulative cost drag broken out into funding, fees and slippage
  • Funding charged to the position actually held at each funding time
  • Underwater (drawdown) curve, rolling Sharpe and Sortino, rolling alpha against a benchmark
  • Slippage distribution and slippage vs order size (pass fills=)
  • report.save("report.html") writes one self-contained HTML file that works offline
  • report.fill_gap_card("card") writes one shareable image (SVG, plus PNG with pip install "deptho[png]"): the bar-close return, the return with slippage measured by replaying the orders, and the gap between them in points

Cost attribution is lookahead-safe by default: a position decided at a bar's close earns from the next bar.

Inputs

argument shape
prices pd.Series of mark/close prices, DatetimeIndex
positions pd.Series exposure as a fraction of equity (1.0 = 1x long), decided at each bar's close
funding pd.Series of funding rates at funding timestamps (positive = longs pay)
fills pd.DataFrame with side, price, ref_price, optionally qty, depth

Tick trades come from Binance's public archive (dp.datasets.read_aggtrades) or from Tardis.dev trades files you've downloaded (dp.datasets.read_tardis_trades), in the same shape either way.

Large files

dp.load(path) reads CSV or Parquet with pandas. It first measures a small sample, and if the full file won't fit in memory it raises dp.MemoryWallError with an estimate, instead of letting pandas exhaust RAM and kill your kernel.

Privacy

Deptho runs entirely on your machine and collects no telemetry. The only network call is a data download you start yourself, which goes to Binance's public archive and prints the host first.

Deptho Pro

Pro is for when the free tools run out: replaying orders against every trade across months of tick data.

  • Sync months of Binance USD-M perpetual trades into one local, memory-mapped dataset that grows a day at a time and repairs itself after an interruption.
  • Replay a table of orders (time, side, quantity) from any backtester against every trade print, lookahead-safe by default. Fills are modeled from trade prints; order book depth is coming.
  • Sweep many order sets over the same dataset in tens of MB of memory.
  • License checked offline. Nothing is uploaded.

Benchmarks, method and pricing: deptho.io. Turn off in-library Pro mentions with dp.config.upgrade_prompts = False or DEPTHO_NO_PROMPTS=1.

License: Apache-2.0. The card's PNG uses the bundled Space Grotesk and JetBrains Mono fonts (SIL Open Font License 1.1, in deptho/fonts/). Market data comes from Binance's public archive (data.binance.vision); Deptho is not affiliated with Binance.

Metadata

Release files for deptho 0.1.2

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

Source distribution (sdist)

Source distribution for deptho 0.1.2
File Size Uploaded Provenance Actions
deptho-0.1.2.tar.gz 248.3 kB With provenance Details for deptho-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deptho 0.1.2
File Interpreter ABI Platform Actions
deptho-0.1.2-py3-none-any.whl Python 3 none any Details for deptho-0.1.2-py3-none-any.whl

Total release size: 492.0 kB

Release files / deptho-0.1.2.tar.gz

Download URL deptho-0.1.2.tar.gz
Size 248.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0d3e70eaf48bb1a9c30ffa5377f8e949bfa3ee894d28d397516b1286d81406f8
BLAKE2b-256 checksum
How to use checksums
14fdd24b90dc2b640c9474131eb901cd1b8d2f952a6461bd265c461c486a9755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 4, 2026.

Transparency log

Release files / deptho-0.1.2-py3-none-any.whl

Download URL deptho-0.1.2-py3-none-any.whl
Size 243.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4384695a4aac9ed25f8b212c94349a13bae2b447c297291bb69841f330c5140
BLAKE2b-256 checksum
How to use checksums
5b2d0b333229ef5e425eeeeaa11e24f9e1e339c935b7cafdf9aaf6f142b03a4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 4, 2026.

Transparency log

Security for deptho 0.1.2

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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for deptho-0.1.2.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 Nov 4, 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.

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