nautechsystems / nautilus_trader
nautechsystems / nautilus_trader
平台支持 (Platform)
| Branch | Version | Status |
|---|---|---|
| master | 1.97.1 | nightly |
| develop | 3.12-3.14 |
- Linux (x86_64): 1.97.1 / 3.12-3.14
- Linux (ARM64): 1.97.1 / 3.12-3.14
- macOS (ARM64): 1.97.1 / 3.12-3.14
- Windows (x86_64): 1.97.1 / 3.12-3.14
文档: https://nautilustrader.io/docs/
官网: https://nautilustrader.io
支持: support@nautilustrader.io
简介 (Introduction)
NautilusTrader is an open-source, production-grade, Rust-native engine for multi-asset, multi-venue trading systems. The system spans research, deterministic simulation, and live execution within a single event-driven architecture, with Python serving as the control plane for strategy logic, configuration, and orchestration.
NautilusTrader 是一个开源、生产级、原生 Rust 编写的引擎,专为多资产、多交易场所的交易系统而设计。该系统在单一事件驱动架构内涵盖了研究、确定性模拟和实盘执行,并使用 Python 作为策略逻辑、配置和编排的控制平面。
This separation provides the performance and safety of a compiled trading engine with the flexibility of Python for system composition and strategy development. Trading systems can also be written entirely in Rust for mission-critical workloads. The same execution semantics and deterministic time model operate in both research and live systems. Strategies deploy from research to production with no code changes, providing research-to-live parity and reducing the divergence that typically introduces deployment risk.
这种分离方式既提供了编译型交易引擎的性能和安全性,又具备 Python 在系统构建和策略开发上的灵活性。对于关键任务负载,交易系统也可以完全使用 Rust 编写。研究系统和实盘系统采用相同的执行语义和确定性时间模型。策略从研究环境部署到生产环境无需更改代码,确保了研究与实盘的一致性,减少了通常会导致部署风险的差异。
NautilusTrader is asset-class-agnostic. Any venue with a REST API or WebSocket feed can be integrated through modular adapters. Current integrations span crypto exchanges (CEX and DEX), traditional markets (FX, equities, futures, options), and betting exchanges.
NautilusTrader 与资产类别无关。任何拥有 REST API 或 WebSocket 数据源的交易场所都可以通过模块化适配器进行集成。目前的集成范围涵盖加密货币交易所(CEX 和 DEX)、传统市场(外汇、股票、期货、期权)以及博彩交易所。
特性 (Features)
- Fast: Rust core with the mimalloc allocator and asynchronous networking using tokio. 快速: 核心采用 Rust 编写,使用 mimalloc 分配器,并通过 tokio 实现异步网络通信。
- Reliable: Type- and thread-safety backed by Rust, with optional Redis-backed state persistence. 可靠: 由 Rust 提供类型安全和线程安全保障,并支持可选的 Redis 状态持久化。
- Portable: Runs on Linux, macOS, and Windows. Deploy using Docker. 可移植: 可在 Linux、macOS 和 Windows 上运行,支持使用 Docker 部署。
- Flexible: Modular adapters integrate any REST API or WebSocket feed. 灵活: 模块化适配器可集成任何 REST API 或 WebSocket 数据源。
- Advanced: Time in force IOC, FOK, GTC, GTD, DAY, AT_THE_OPEN, AT_THE_CLOSE, advanced order types and conditional triggers. Execution instructions post-only, reduce-only, and icebergs. Contingency orders including OCO, OUO, OTO. 高级: 支持 IOC、FOK、GTC、GTD、DAY、AT_THE_OPEN、AT_THE_CLOSE 等有效期设置,以及高级订单类型和条件触发器。支持 Post-only、Reduce-only 和冰山订单等执行指令。支持包括 OCO、OUO、OTO 在内的关联订单。
- Customizable: User-defined components, or assemble entire systems from scratch using the cache and message bus. 可定制: 支持用户自定义组件,或使用缓存和消息总线从零开始组装整个系统。
- Backtesting: Multiple venues, instruments, and strategies simultaneously using historical quote tick, trade tick, bar, order book, and custom data with nanosecond resolution. 回测: 支持同时对多个交易场所、品种和策略进行回测,使用纳秒级精度的历史报价 Tick、交易 Tick、K 线、订单簿及自定义数据。
- Live: Identical strategy implementations between research and live deployment. 实盘: 研究环境与实盘部署采用完全相同的策略实现。
- Multi-venue: Run market-making and cross-venue strategies across multiple venues simultaneously. 多场所: 可同时在多个交易场所运行做市策略和跨场所策略。
- AI Training: Engine fast enough to train AI trading agents (RL/ES). AI 训练: 引擎速度足以支持 AI 交易智能体(强化学习/进化策略)的训练。
为什么选择 NautilusTrader? (Why NautilusTrader?)
Trading strategy research is often conducted in Python using vectorized approaches, while production trading systems are implemented separately using event-driven architectures in compiled languages. NautilusTrader removes this separation. A Rust-native core provides a deterministic event-driven runtime for both research and live execution, while Python serves as the control plane. The same architecture, execution semantics, and time model operate across both environments, allowing strategies to move from research to production without reimplementation.
交易策略研究通常使用 Python 进行向量化处理,而生产交易系统则通常使用编译语言通过事件驱动架构单独实现。NautilusTrader 消除了这种分离。其原生 Rust 核心为研究和实盘执行提供了确定性的事件驱动运行时,而 Python 则作为控制平面。两种环境采用相同的架构、执行语义和时间模型,使策略无需重写即可从研究环境迁移到生产环境。
集成 (Integrations)
NautilusTrader is modularly designed to work with adapters, enabling connectivity to trading venues and data providers by translating their raw APIs into a unified interface and normalized domain model.
NautilusTrader 采用模块化设计,通过适配器工作,将交易场所和数据提供商的原始 API 转换为统一接口和标准化的领域模型,从而实现连接。
(注:原文表格内容略,请参考官方文档获取最新集成列表)
路线图 (Roadmap)
The Roadmap outlines NautilusTrader’s strategic direction. Current priorities include stabilizing the Rust-native core, improving documentation, and enhancing code ergonomics. The open-source project focuses on single-node backtesting and live trading for individual and small-team quantitative traders.
路线图概述了 NautilusTrader 的战略方向。当前的优先事项包括稳定原生 Rust 核心、改进文档以及增强代码易用性。该开源项目专注于为个人和小型量化交易团队提供单节点回测和实盘交易功能。