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.16.0 · 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
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.

License

MIT — see LICENSE.

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

Release files for monte-neo 0.16.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 monte-neo 0.16.0
File Size Uploaded
monte_neo-0.16.0.tar.gz 1.1 MB Details

Built distribution (wheel)

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

Total release size: 1.3 MB

Release files / monte_neo-0.16.0.tar.gz

Download URL monte_neo-0.16.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
248a7578c457e59d11b586a577002ba51d93aa3f920450d6dc1bc90a1c8fedcb
BLAKE2b-256 checksum
How to use checksums
90936319792e54ae0ef38e15f71604fa20fccd9b2751361390dd3a08ce21e7a6
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.16.0-py3-none-any.whl

Download URL monte_neo-0.16.0-py3-none-any.whl
Size 261.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d722bfec24631c47cb75ebac50973d65da6701907fc94f89ad2f0c59c404ee8a
BLAKE2b-256 checksum
How to use checksums
d90a10447b23ae4e3a96cb1081d97d6f9837371aa4a24fd9a306dcf4b0733e10
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

0.17.4

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

This release

0.16.0 This release

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