Event-driven Rust-core engine with the strongest execution modelling in open source, gated to Python 3.12-3.14, where a wrong ts_init silently makes every bar visible one interval early. TRIGGER - import nautilus_trader, pip install nautilus_trader, BacktestEngine, BacktestNode, TradingNode, Strategy.on_bar, ts_init, ts_event, FillModel, prob_fill_on_limit, prob_slippage, LatencyModel, base_latency_nanos, RiskEngine, OmsType NETTING HEDGING, BookType.L1_MBP, bar_execution, bar_adaptive_high_low_ordering, high-precision build, ClientOrderId; "could not find a version that satisfies nautilus_trader", a Rust source build on an Intel Mac or Alpine. Memory is stale here: 1.231.0 shipped 2026-08-02, a 2.0 line is in release candidates that moves the fill model to nautilus_trader.execution, and the licence is LGPL-3.0-or-later. SKIP for choosing among engines generally (backtesting-engines). SKIP when the question is WHICH library to choose, or names no library at all - both belong to the domain skill.
Trending skills
7-day visitors to each skill page
Ships in fin-libraries. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The strongest execution modelling in open source, and the only engine where the same strategy object runs the backtest and the live session — but it will not even install on Python 3.11.
| pip / import | pip install nautilus_trader · import nautilus_trader |
| Version | 1.231.0 (2026-08-02) · ⚠️ a 2.0.0 line is in RC (v2.0.0rc4, 2026-09-02) |
| Licence | 🚨 LGPL-3.0-or-later (declared and classified), CLA required for contributors |
| Status | ✅ Very active, bi-weekly across develop/nightly/master. 28,367★, pushed 2026-09-04 |
🚨 ts_init must be the bar's CLOSE. Look-ahead protection here is structural — orders
submitted inside on_bar() arrive after that bar finishes processing — and that protection depends
entirely on this one field.
Vendor bars are very often timestamped at their open. Load them unchanged and every bar becomes visible one interval early. The engine does not complain; it silently makes bars visible early, and every metric looks better for it.
INTERVAL_NS = 60 * 1_000_000_000 # 1-minute bars, in nanoseconds
bar = Bar(
bar_type, Price(o, 2), Price(h, 2), Price(l, 2), Price(c, 2), Quantity(v, 0),
ts_event=ts_open, # when the bar's period began
ts_init=ts_open + INTERVAL_NS, # 🚨 the CLOSE — not ts_open
)
requires_python is >=3.12,<3.15 — wheels are cp312/cp313/cp314 only. On Python 3.11 pip install nautilus_trader does not warn, downgrade or degrade; it fails to resolve. Its neighbours are far more permissive (zipline-reloaded >=3.10, backtesting.py >=3.9), so an existing 3.11 research environment cannot simply add nautilus. Packaging edges verified from the file list:
manylinux_2_35 is a high glibc floor (Ubuntu 22.04-era); older distros fall back to the sdist.Two precision builds: high-precision (128-bit, 16 decimals — the default in the official wheels) and standard (64-bit, 9 decimals). High precision suits crypto quantities and tiny tick sizes; it is slower, and the two modes are not interchangeable at the ABI level.
FillModel defaults are optimistic✅ Read from nautilus_trader/backtest/models/fill.pyx at tag v1.231.0:
def __init__(self, double prob_fill_on_limit = 1.0, double prob_slippage = 0.0, random_seed: int | None = None)
| Parameter | Default | Meaning |
|---|---|---|
prob_fill_on_limit | 🚨 1.0 | Fill probability when the market touches but does not cross your limit. 1.0 means you are always at the front of the queue. |
prob_slippage | 🚨 0.0 | Probability of a one-tick adverse move — L1 only, and off by default. |
random_seed | 🚨 None | With prob_slippage > 0 fills are random; unseeded runs are not reproducible and two "identical" backtests disagree. |
It is a model you must configure, not one you inherit. ✅ 1.231.0's backtest.models already exports BestPriceFillModel, OneTickSlippageFillModel, ProbabilisticFillModel, LimitOrderPartialFillModel, SizeAwareFillModel, VolumeSensitiveFillModel, CompetitionAwareFillModel, MarketHoursFillModel, TwoTierFillModel, ThreeTierFillModel, plus FixedFeeModel / MakerTakerFeeModel / PerContractFeeModel — check before subclassing.
⚠️ 2.0 renames it. The base model becomes DefaultFillModel, imported from nautilus_trader.execution, and CompetitionAwareFillModel gains liquidity_factor (default 0.3). Parameter names and defaults are unchanged; 1.x imports will need updating.
LatencyModel — base_latency_nanos, insert_latency_nanos, update_latency_nanos (e.g. 5 ms base + 2 ms insert + 3 ms update). ✅ Real order-arrival latency inside a backtest is rare and valuable; nothing comparable exists in the other OSS engines.
RiskEngine validates price precision, quantity bounds, notional limits, margin and the trading state — ACTIVE / HALTED / REDUCING — before anything reaches the venue, in backtest and live. REDUCING (only position-reducing orders permitted) is the closest thing to a real kill switch any OSS engine ships.
OmsType NETTING vs HEDGING with ExecutionEngine reconciliation; contingency orders (OCO, OUO, OTO), post-only, reduce-only, iceberg, and a native TWAP algorithm with child-order tracking.
The docs say so outright: bars become "synthetic market updates for an L1 order book". Bar volume is split evenly across four price points, visited Open → High → Low → Close; bar_adaptive_high_low_ordering=True visits whichever extreme is nearer the open first. Requires venue bar_execution=True and BookType.L1_MBP. The docs call it "a deterministic heuristic, not a reconstruction of the actual trade sequence".
So a bar backtest here is better documented, not more truthful. The engine earns its reputation on tick and L2/L3 data. With OHLCV only, you are paying its learning curve for an approximation you could get elsewhere.
from nautilus_trader.backtest.models import FillModel # 2.0: DefaultFillModel, from ...execution
fill_model = FillModel(
prob_fill_on_limit=0.2, # default 1.0 = always at the front of the queue
prob_slippage=0.5, # default 0.0 = no slippage at all; L1 only
random_seed=42, # default None -> unseeded -> not reproducible
)
It cannot know how your order would have changed other participants' behaviour. Slippage modelling does not apply to L2/L3 — there the recorded book determines impact. Consumed liquidity per level is not tracked unless configured. No corporate actions and no settlement model.
Take it on when the strategy is latency- or microstructure-sensitive, spans venues, or is genuinely going live — the backtest→live code path and ClientOrderId reconciliation are the payoff. Do not take it on to backtest a daily moving-average cross.
../../../fin-core/skills/backtesting-engines/SKILL.md — engine choice../../../fin-core/skills/backtesting-engines/references/nautilus-trader.md — the source card../../../fin-core/skills/backtesting-engines/references/execution-realism.md — fill realism, ranked../../../fin-core/skills/broker-execution-apis/SKILL.md — why order-ID reconciliation mattersThis file is the deep dive on one library and assumes the choice is already made.
For which library to pick, how it compares with the alternatives, and the traps that span
several of them, the entry point is the domain skill backtesting-engines (../../../fin-core/skills/backtesting-engines/SKILL.md).
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
24 skills in this plugin
/lib-akshareakshare is the widest free Chinese-market scraper (1,103 public interfaces) and it purges its own PyPI history, so you cannot pin it. TRIGGER - akshare, "import akshare as ak", pip install akshare, stock_zh_a_hist, stock_zh_a_daily, index_stock_cons_csindex, stock_zt_pool_em, stock_zh_a_stop_em, adjust="qfq"/"hfq", 复权, 前复权, 后复权, 涨跌停, 东方财富, 新浪财经, A股数据, 沪深300成分股, "No matching distribution found for akshare==", akshare 报错, akshare 封 IP. akshare ships roughly 2.3 releases a week and deletes the old ones, so any signature, column name or version pin you remember is probably already gone. SKIP for lib-tushare, which is the skill for point-in-time fundamentals and dated index membership. SKIP when the question is WHICH library to choose, or names no library at all - both belong to the domain skill./lib-alpaca-pyAlpaca's current Python SDK, which defaults to the paper host but lets url_override silently send live orders from a client that believes it is in the sandbox. TRIGGER - import alpaca, pip install alpaca-py, TradingClient, StockHistoricalDataClient, CryptoHistoricalDataClient, submit_order, LimitOrderRequest, MarketOrderRequest, OrderSide, TimeInForce, client_order_id, url_override, paper=True, BaseURL.TRADING_PAPER, paper-api.alpaca.markets, bracket OCO OTO orders, trail_percent, IEX vs SIP feed, Algo Trader Plus, alpaca-trade-api, APCA_API_BASE_URL; an order rejected asynchronously for time-in-force or price precision. Memory is stale here: alpaca-trade-api was deprecated in 2024 and defaulted to LIVE, whereas alpaca-py 0.44.0 (2026-08-11) declares paper=True - the widely repeated warning is inverted. SKIP for Interactive Brokers and for the general order-safety patterns (broker-execution-apis). SKIP for choosing between libraries, or when no library is named - the domain skill's job./lib-alphalensalphalens-reloaded scores cross-sectional factors, and its forward return starts at date t's OWN price - it never lags your factor. TRIGGER - alphalens, alphalens-reloaded, "import alphalens as al", get_clean_factor_and_forward_returns, compute_forward_returns, factor_information_coefficient, mean_return_by_quantile, factor_returns, quantile_turnover, factor_rank_autocorrelation, create_full_tear_sheet, MaxLossExceededError, max_loss=0.35, cumulative_returns, information coefficient, IC decay, quantile spread, "pip install alphalens". The original quantopian package is dead at 0.4.0 (2020-04-27) and most snippets you recall target it or its removed pandas internals. SKIP for lib-qlib, which is the skill for the feature pipeline and model. SKIP when the question is WHICH library to choose, or names no library at all - both belong to the domain skill./lib-archThe reference GARCH implementation in Python, and the home of SPA/StepM/MCS - which all take LOSSES, so passing returns silently inverts the test and names your worst strategy as the best. TRIGGER - arch, arch_model, arch.bootstrap, arch.univariate, SPA, RealityCheck, StepM, MCS, optimal_block_length, StationaryBootstrap, superior_models, spa.pvalues, mcs.included, arch.unitroot, GARCH, EGARCH, GJR-GARCH, TARCH, APARCH, FIGARCH, HARCH, HAR-RV, skewt, conditional_volatility, or a GARCH fit emitting convergence warnings. Memory is stale on licence and version - it is 8.0.0 (2025-10-21) under NCSA, not one of the three usual permissive licences. SKIP for PSR and DSR (backtest-validation), for PBO and CPCV (lib-purgedcv) and for reporting Sharpe (lib-quantstats). SKIP for choosing between libraries, or when no library is named - the domain skill's job./lib-backtesting-pySingle-asset bar-loop backtester with honest next-open fills, an AGPL-3.0 licence, and an indicator API that computes over the entire series before slicing. TRIGGER - from backtesting import Backtest, Strategy; pip install backtesting, bt = Backtest(df, MyStrategy), bt.run(), bt.optimize(), self.I(), self.buy(), self.sell(), self.data.Close, trade_on_close, exclusive_orders, finalize_trades, commission, spread, backtesting.lib crossover, _OutOfMoneyError, "kernc"; wanting a portfolio, a universe or a second instrument inside it. Memory is stale here: it is alive at 0.6.6 (2026-07-22), it is AGPL-3.0-or-later rather than MIT, and trade_on_close fills at data.Close[-2] rather than the current bar's close. SKIP for multi-asset or cross-sectional work and for engine choice generally (backtesting-engines). SKIP when the question is WHICH library to choose, or names no library at all - both belong to the domain skill./lib-ccxtThe unified MIT client for 100+ crypto venues - and not a backtester, with an OHLCV endpoint that silently truncates and returns an unclosed final bar. TRIGGER - import ccxt, import ccxt.pro, import ccxt.async_support, pip install ccxt, fetch_ohlcv, fetchOHLCV, load_markets, fetch_markets, create_order, watchOrderBook, watchTicker, watchMyTrades, set_sandbox_mode, enableRateLimit, amount_to_precision, price_to_precision, exchange.has, options defaultType, parse8601, implicit methods like fapiPrivateGetPositionRisk, CCXT Pro subscription expiry, funding rate history; an order rejected on precision or min-notional, fewer candles returned than requested. Memory is stale here: CCXT Pro was merged into the free MIT package at v1.95, prediction markets landed at 4.5.66, and 4.5.77 shipped 2026-09-01. SKIP for equity and futures brokers (broker-execution-apis). SKIP when the question is WHICH library to choose, or names no library at all - both belong to the domain skill./fin-libraries:lib-nautilus-traderfrom fin-libraries
npx claudepluginhub howard-lynn-ye/fin-rsi --plugin fin-libraries