Monte-Neo
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
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
Research export (recommended)
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)
- Load or synthesize OHLCV (
synthetic_ohlcv/ your frame →frame_to_ohlc). - Set an
ExecutionModel(fees, SL/TP, sessions, side mode). - Sweep with
export_sma_sweep/export_batch, or a singleexport_single. - Check
device,signal_device, andfallback_reasonwhen usingauto. - Optional depth:
equity_stride, journal,plan_research_bytes/memoryon exports. - 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
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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| monte_neo-0.17.2.tar.gz | 1.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| monte_neo-0.17.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / monte_neo-0.17.2.tar.gz
| Download URL | monte_neo-0.17.2.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e5f4ae6ac50a6785ed75781e32ddd9849184720ad9f182f11815648e57dd43a
|
|
BLAKE2b-256 checksum How to use checksums |
ac9ea8f4f7cd1ae95749bc67e6b0027fc22cc5210c862edc31e2fd207c68f804
|
| 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 logRelease files / monte_neo-0.17.2-py3-none-any.whl
| Download URL | monte_neo-0.17.2-py3-none-any.whl |
|---|---|
| Size | 267.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5fcefd1427cc2156ae8dfafcbd40b0f36259e582975e2bd714db82333cb0af9
|
|
BLAKE2b-256 checksum How to use checksums |
b4339267475afabfd2e1eea52018216b8281ec096377d8c9f8b9de6f549cc037
|
| 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