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.2.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.2.0
File Size Uploaded Provenance Actions
dmoera-0.2.0.tar.gz 53.2 kB With provenance Details for dmoera-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 109.6 kB

Release files / dmoera-0.2.0.tar.gz

Download URL dmoera-0.2.0.tar.gz
Size 53.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d4175ba4a1db4820c280c2318fb7fd0dd97c7c4bb8df2fbb78a00145503f194e
BLAKE2b-256 checksum
How to use checksums
74d795eea2be19585de8c3f6d39a97dfdd1125b6b48239ab4253650bc9d31e08
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 9, 2026.

Transparency log

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

Download URL dmoera-0.2.0-py3-none-any.whl
Size 56.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b723b2c1834c682773f1501b2555373f8e2f34bdd7c6df92a4b81dea2884f9b6
BLAKE2b-256 checksum
How to use checksums
5b988a40ac014a7ac9d39a252abfa98a80107b20bcbbccc449b5baab5a3e28ac
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 9, 2026.

Transparency log

Security for dmoera 0.2.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.2.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 9, 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