Skip to main content

dmoera

This is the engine behind Crypto-Strategies, packaged so you can run it yourself. Every bot in that corpus, the winners and the 700-odd corpses, was tested with the same simulation code you get when you install this. Same bar loop, same exit logic, same friction model, same 1000-bar context cap.

pip install dmoera
dmoera backtest strategies/weekend_season_eth_v6.py

The first run downloads candles once from Binance's public data and caches them in ~/.dmoera/cache. After that everything runs offline and instant. If Binance is unreachable from your network for any reason, point --csv at any OHLCV file and you're still in business.

The commands

dmoera backtest bot.py runs a bot over real candles and tells you what it did: trades, net return after friction, win rate, significance, drawdown. Add --export-trades trades.csv and you get the full trade list as a file.

dmoera grade trades.csv is the lie detector. It takes any trade log, yours or one of ours, and grades it S through F after realistic fees. It splits your results by market regime, runs 500 random-entry placebo bots against yours, and computes a deflated Sharpe so a lucky streak can't pretend to be skill. It reads TradingView, Freqtrade and Binance exports too, so you can bring results from other tools and still get a straight answer.

dmoera validate bot.py runs the 7 open validation stages on a bot: code safety, in-sample, out-of-sample, rolling walk-forward, randomized starts, slippage stress, and a holdout slice nothing is allowed to touch. These use public default thresholds. Passing here means your bot isn't obviously broken. It is not the real exam.

dmoera certify bot.py is the real exam. It uploads your code to dMoERA's servers, where the sealed version runs: the actual thresholds, the sealed holdout data, the attempt ledger that catches brute-forcing. You need an API key from dmoera.xyz Settings for this one, because it costs real compute. The verdict that comes back is bound to your code's hash, so you can put it in your README and anyone can verify it later.

The short version: backtest tells you what a bot did. grade tells you whether to believe it. validate tells you whether it holds up across windows it didn't pick. certify is the only result that counts.

Reproducing the corpus numbers

Every report card in the Crypto-Strategies repo came out of this engine. To check a card's claim yourself:

dmoera backtest strategies/<bot>.py --interval 5m --days 180
dmoera backtest strategies/<bot>.py --interval 5m --days 180 --export-trades t.csv
dmoera grade t.csv

Cross-asset strategies that read ctx.features work locally too. Open interest and positioning come from Binance's public metrics archive, and reference-asset returns (the btc_return_* family) are computed from the reference asset's own candles. If a feature can't be served locally, the run tells you which keys fell back to defaults instead of failing silently.

Why the numbers here mean something

Most local backtesters drift from whatever runs in production. Different fee handling, different exit logic, different context windows, and one day you notice your local results and the platform's results disagree. This package doesn't have that problem because the simulation engine was extracted verbatim from the dMoERA validation harness, the same code that produced every report card in the corpus. A number here is the same number there.

What the package deliberately leaves out is the sealed exam. The real thresholds, the holdout data, the seeds and the attempt ledger stay on dMoERA's servers. That is what makes certify worth something. The public stages tell you your bot isn't obviously broken. Only the sealed exam can tell you it's real.

For AI agents

The dmoera-mcp server exposes the platform to AI agents, and it uses the same API key this package uses for certify. One key, both tools.

License

MIT

Metadata

Release files for dmoera 0.3.0

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

Source distribution (sdist)

Source distribution for dmoera 0.3.0
File Size Uploaded Provenance Actions
dmoera-0.3.0.tar.gz 57.4 kB With provenance Details for dmoera-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 118.6 kB

Release files / dmoera-0.3.0.tar.gz

Download URL dmoera-0.3.0.tar.gz
Size 57.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0d71f1d9662e155fb982e2d90652081a9186c406c1b17de26d78c8ef99425ae9
BLAKE2b-256 checksum
How to use checksums
4ac05a68ea5347a858a69659d3e888336c0d2010b595aca1efbe671d55c3556f
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 10, 2026.

Transparency log

Release files / dmoera-0.3.0-py3-none-any.whl

Download URL dmoera-0.3.0-py3-none-any.whl
Size 61.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b156a9fc8997539181bf73f8adbc8d9680332ea28f8f1e7f3262a732f814af8
BLAKE2b-256 checksum
How to use checksums
19b905a81e8b804f2dbb106db2f2890c6206734cf3f74b6b6446dcf5d6f73294
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 10, 2026.

Transparency log

Security for dmoera 0.3.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dmoera-0.3.0.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 10, 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