Skip to main content

Monte-Neo

Monte-Neo logo

Fast local research for trading strategies on Apple Silicon
Fee-aware next-bar economics · Monte Carlo · paper OMS
MIT · Python 3.11+ · Metal / MLX / Numba

CI PyPI MIT license Latest release Python 3.11+ macOS Apple Silicon

Current: v0.17.4 · Docs site · Changelog · FAQ

What this is (and is not)

Job: on Apple Silicon macOS, build and verify trading-domain strategies very quickly with fee-aware next-bar economics you can re-check (export API + golden vectors).

Lanes: research bar (primary speed path) · Monte Carlo research · paper OMS (validation).

Not a goal: replace full event-driven production / live-bot platforms. Research sweep throughput is not an OMS event-loop claim.

Why Monte-Neo

Advantage What you get
Local Apple Silicon speed Metal economics + Numba (MLX optional for signals)
Fee-aware research bar Next-bar fills, costs (bps), SL/TP/trail, funding, sessions
Honest export API export_single / export_batch / export_sma_sweep + golden vectors
16GB-class memory planner plan_research_bytes + no-hang Metal size gate → cpu_numba fallback
Local research triage HeuristicPolicy after export → next action / promote / MC
Holdout check holdout_sma_sweep train→holdout gap (anti-overfit, no ML)
Clear non-goals macOS research tool first; paper OMS is a separate lane
MIT Use, fork, and ship without drama

Install

From PyPI (recommended):

pip install monte-neo                 # research-core (slim)
pip install "monte-neo[apple]"        # Metal / MLX (Apple Silicon)
pip install "monte-neo[plot]"         # charts
pip install "monte-neo[data]"         # Binance downloader / websocket
pip install "monte-neo[full]"         # kitchen-sink local parity

From git:

pip install "git+https://github.com/NeoZorK/Monte-Neo.git"
pip install "monte-neo[apple] @ git+https://github.com/NeoZorK/Monte-Neo.git"

In-repo (contributors):

git clone https://github.com/NeoZorK/Monte-Neo.git
cd Monte-Neo
uv sync --extra apple --extra plot --extra data --group dev

See PACKAGING.md · Export API · Policy triage.

Requirements: Python 3.11+. Best experience on Apple Silicon macOS. Numba CPU paths work more broadly; Metal/MLX are the [apple] extra.

Quick start

uv sync --extra apple --extra plot --extra data --group dev
uv run monte-neo
uv run pytest tests -n auto
# After an export_sma_sweep JSON:
# uv run monte-neo --policy-triage path/to/export.json
from monte_neo.backtest import (
    ExecutionModel,
    export_sma_sweep,
    synthetic_ohlcv,
)

ohlc = synthetic_ohlcv(100_000, seed=42)
model = ExecutionModel(commission_bps=5.0, slippage_bps=5.0, warmup_bars=50)
out = export_sma_sweep(
    ohlc["open"], ohlc["high"], ohlc["low"], ohlc["close"],
    combos=16,
    model=model,
    device="auto",  # Metal when safe; else cpu_numba (see fallback_reason)
)
print(out["device"], out.get("fallback_reason"), out["combos"])

Single bar backtest

from monte_neo.backtest import (
    ExecutionModel,
    frame_to_ohlc,
    run_bar_backtest,
    sma_signal,
    synthetic_ohlcv,
)

ohlc = frame_to_ohlc(synthetic_ohlcv(5_000, seed=42))
model = ExecutionModel(
    commission_bps=5.0,
    slippage_bps=5.0,
    size_fraction=0.25,
    sl_pct=1.0,
    tp_pct=2.0,
)
sig = sma_signal(ohlc["close"], fast=10, slow=40)
out = run_bar_backtest(
    ohlc["open"], ohlc["high"], ohlc["low"], ohlc["close"], sig, model=model
)
print(out["total_return"], out["metrics"]["max_drawdown"], len(out["trades"]))

More: docs/guides/quick-start.md · backtest engine · FAQ

How to use (research workflow)

  1. Load or synthesize OHLCV (synthetic_ohlcv / your frame → frame_to_ohlc).
  2. Set an ExecutionModel (fees, SL/TP, sessions, side mode).
  3. Sweep with export_sma_sweep / export_batch, or a single export_single.
  4. Check device, signal_device, and fallback_reason when using auto.
  5. Optional depth: equity_stride, journal, plan_research_bytes / memory on exports.
  6. Paper OMS (monte_neo.oms) only when you need event-lane validation — not for sweep cps claims.

Devices: auto · metal · cpu_numba (and MLX where signal paths allow). Oversized Metal jobs demote to Numba instead of hanging (v0.14.1+).

Features (honest)

Area Status
MC indicator / robustness workflows Available via CLI and library
Fee-aware research bar engine monte_neo.backtest
Research export + golden vectors export_* / verify_golden_vectors
Memory / no-hang accelerator gate plan_research_bytes / decide_research_accelerator
Paper OMS + venue adapters monte_neo.oms
Metal / MLX / Numba device select Best-effort on Apple Silicon; CPU fallbacks
Docker Supported for headless/CI-style runs

Project structure

Monte-Neo/
├── src/monte_neo/
│   ├── backtest/      # Research bar engine + export
│   ├── oms/           # Paper OMS + accel
│   ├── core/          # Generator / Metal bridges
│   ├── data/          # Market data downloaders
│   ├── monte_carlo/   # MC methods
│   ├── metrics/       # Trading metrics
│   ├── cli/           # Interactive CLI
│   └── visualization/
├── tests/
├── docs/
└── docker/

Screenshots / demos

SMA sweep demo

Memory plan demo

More under docs/assets/. Runnable script: examples/export_sma_sweep_quickstart.py.

Contributing

See CONTRIBUTING.md · docs.

License

MIT — see LICENSE.

Public repository: https://github.com/NeoZorK/Monte-Neo

Release files for monte-neo 0.17.4

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

Source distribution (sdist)

Source distribution for monte-neo 0.17.4
File Size Uploaded
monte_neo-0.17.4.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for monte-neo 0.17.4
File Interpreter ABI Platform
monte_neo-0.17.4-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / monte_neo-0.17.4.tar.gz

Download URL monte_neo-0.17.4.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
fe074a662402d8edd8e9a8bf6c88b26e082c749bda41e55487e90c5cbf35a748
BLAKE2b-256 checksum
How to use checksums
16db17466b67b637cf9e1a29f4a40759f892ce611f861ae5e7337257fa7a119c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / monte_neo-0.17.4-py3-none-any.whl

Download URL monte_neo-0.17.4-py3-none-any.whl
Size 267.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9f446f394810a76e23b7dbd98f5730c033c21fa7750af2bb6b04c2e3786eadb
BLAKE2b-256 checksum
How to use checksums
3a1c03d839d5556aac8d1eaf3155ee5144a7bf3f605bd0340d128e32f869d8d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release history Release notifications | RSS feed

0.17.7

2 release files

0.17.6

2 release files

0.17.5

2 release files

This release

0.17.4 This release

2 release files

0.17.3

2 release files

0.17.2

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.1

2 release files

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