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

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. Market data comes from Binance's public archive (data.binance.vision); Deptho is not affiliated with Binance.

Metadata

Release files for deptho 0.1.1

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.1
File Size Uploaded Provenance Actions
deptho-0.1.1.tar.gz 38.6 kB With provenance Details for deptho-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 77.8 kB

Release files / deptho-0.1.1.tar.gz

Download URL deptho-0.1.1.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8acd36b82057be832962acef8407344f90af48692a49785cb39c83dedf355216
BLAKE2b-256 checksum
How to use checksums
f879b20168df0bc9f3155cd0f6eafa47ae9038d563b54a3ed057fe72a4aece15
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 3, 2026.

Transparency log

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

Download URL deptho-0.1.1-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3e1e519f573b4bfdfb7a3b2d342d6d60310c843b706058655b50dee556bf1c2
BLAKE2b-256 checksum
How to use checksums
944cef9ebf4edfa7d7bc828a70d93bfa4925ed8f3f1a5e7d1021340c1ef978d8
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 3, 2026.

Transparency log

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

Select from 2 files

Attestation for deptho-0.1.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 Nov 3, 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