Skip to content

Releases: nautechsystems/nautilus_trader

NautilusTrader 1.196.0 Beta

05 Jul 11:53
Compare
Choose a tag to compare

NautilusTrader 1.196.0 Beta

Released on 5th July 2024 (UTC).

Enhancements

  • Added request_order_book_snapshot method (#1745), thanks @graceyangfan
  • Added order book data validation for BacktestNode when a venue book_type is L2_MBP or L3_MBO
  • Added Bybit demo account support (set is_demo to True in configs)
  • Added Bybit stop order types (STOP_MARKET, STOP_LIMIT, MARKET_IF_TOUCHED, LIMIT_IF_TOUCHED, TRAILING_STOP_MARKET)
  • Added Binance venue option for adapter configurations (#1738), thanks @DevRoss
  • Added Betfair amend order quantity support (#1687 and #1751), thanks @imemo88 and @limx0
  • Added Postgres tests serial test group for nextest runner (#1753), thanks @filipmacek
  • Added Postgres account persistence capability (#1768), thanks @filipmacek
  • Refactored AccountAny pattern in Rust (#1755), thanks @filipmacek
  • Changed DatabentoLiveClient to use new snapshot on subscribe feature
  • Changed identifier generator time tag component to include seconds (affects new ClientOrderId, OrderId and PositionId generation)
  • Changed <Arc<Mutex<bool>> to AtomicBool in Rust network crate, thanks @NextThread and @twitu
  • Ported KlingerVolumeOscillator indicator to Rust (#1724), thanks @Pushkarm029
  • Ported DirectionalMovement indicator to Rust (#1725), thanks @Pushkarm029
  • Ported ArcherMovingAveragesTrends indicator to Rust (#1726), thanks @Pushkarm029
  • Ported Swings indicator to Rust (#1731), thanks @Pushkarm029
  • Ported BollingerBands indicator to Rust (#1734), thanks @Pushkarm029
  • Ported VolatilityRatio indicator to Rust (#1735), thanks @Pushkarm029
  • Ported Stochastics indicator to Rust (#1736), thanks @Pushkarm029
  • Ported Pressure indicator to Rust (#1739), thanks @Pushkarm029
  • Ported PsychologicalLine indicator to Rust (#1740), thanks @Pushkarm029
  • Ported CommodityChannelIndex indicator to Rust (#1742), thanks @Pushkarm029
  • Ported LinearRegression indicator to Rust (#1743), thanks @Pushkarm029
  • Ported DonchianChannel indicator to Rust (#1744), thanks @Pushkarm029
  • Ported KeltnerChannel indicator to Rust (#1746), thanks @Pushkarm029
  • Ported RelativeVolatilityIndex indicator to Rust (#1748), thanks @Pushkarm029
  • Ported RateOfChange indicator to Rust (#1750), thanks @Pushkarm029
  • Ported MovingAverageConvergenceDivergence indicator to Rust (#1752), thanks @Pushkarm029
  • Ported OnBalanceVolume indicator to Rust (#1756), thanks @Pushkarm029
  • Ported SpreadAnalyzer indicator to Rust (#1762), thanks @Pushkarm029
  • Ported KeltnerPosition indicator to Rust (#1763), thanks @Pushkarm029
  • Ported FuzzyCandlesticks indicator to Rust (#1766), thanks @Pushkarm029

Breaking Changes

  • Renamed Actor.subscribe_order_book_snapshots and unsubscribe_order_book_snapshots to subscribe_order_book_at_interval and unsubscribe_order_book_at_interval respectively (this clarifies the method behavior where the handler then receives OrderBook at a regular interval, distinct from a collection of deltas representing a snapshot)

Fixes

  • Fixed LIMIT order fill behavior for L2_MBP and L3_MBO book types (was not honoring limit price as maker), thanks for reporting @dpmabo
  • Fixed CashAccount PnL calculations when opening a position with multiple fills, thanks @Otlk
  • Fixed msgspec encoding and decoding of Environment enum for NautilusKernelConfig
  • Fixed OrderMatchingEngine processing by book type for quotes and deltas (#1754), thanks @davidsblom
  • Fixed DatabentoDataLoader.from_dbn_file for OrderBookDeltas when as_legacy_cython=False
  • Fixed DatabentoDataLoader OHLCV bar schema loading (incorrectly accounting for display factor0), thanks for reporting @faysou
  • Fixed DatabentoDataLoader multiplier and round lot size decoding, thanks for reporting @faysou
  • Fixed Binance order report generation active_symbols type miss matching (#1729), thanks @DevRoss
  • Fixed Binance trade data websocket schemas (Binance no longer publish b buyer and a seller order IDs)
  • Fixed BinanceFuturesInstrumentProvider parsing of min notional, thanks for the report @AnthonyVince
  • Fixed BinanceSpotInstrumentProvider parsing of min and max notional
  • Fixed Bybit order book deltas subscriptions for INVERSE product type
  • Fixed Cache documentation for get (was the same as add), thanks for reporting @faysou

NautilusTrader 1.195.0 Beta

17 Jun 12:59
Compare
Choose a tag to compare

NautilusTrader 1.195.0 Beta

Released on 17th June 2024 (UTC).

Enhancements

  • Added Bybit base coin for fee rate parsing (#1696), thanks @filipmacek
  • Added IndexInstrument with support for Interactive Brokers (#1703), thanks @rsmb7z
  • Refactored Interactive Brokers client and gateway configuration (#1692), thanks @rsmb7z
  • Improved InteractiveBrokersInstrumentProvider contract loading (#1699), thanks @rsmb7z
  • Improved InteractiveBrokersInstrumentProvider option chain loading (#1704), thanks @rsmb7z
  • Improved Instrument.make_qty error clarity when a positive value is rounded to zero
  • Updated installation from source docs for Clang dependency (#1690), thanks @Troubladore
  • Updated DockerizedIBGatewayConfig docs (#1691), thanks @Troubladore

Breaking Changes

None

Fixes

  • Fixed DataFusion streaming backend mem usage (now constant mem usage) (#1693), thanks @twitu
  • Fixed OrderBookDeltaDataWrangler snapshot parsing (was not prepending a CLEAR action), thanks for reporting @VeraLyu
  • Fixed Instrument.make_price and make_qty when increments have a lower precision (was not rounding to the minimum increment)
  • Fixed EMACrossTrailingStop example strategy trailing stop logic (could submit multiple trailing stops on partial fills)
  • Fixed Binance TRAILING_STOP_MARKET orders (callback rounding was incorrect, was also not handling updates)
  • Fixed Interactive Brokers multiple gateway clients (incorrect port handling in factory) (#1702), thanks @dodofarm
  • Fixed time alerts Python example in docs (#1713), thanks @davidsblom

NautilusTrader 1.194.0 Beta

31 May 11:31
Compare
Choose a tag to compare

NautilusTrader 1.194.0 Beta

Released on 31st May 2024 (UTC).

Enhancements

  • Added DataEngine order book deltas buffering to F_LAST flag (#1673), thanks @davidsblom
  • Added DataEngineConfig.buffer_deltas config option for the above (#1670), thanks @davidsblom
  • Improved Bybit order book deltas parsing to set F_LAST flag (#1670), thanks @davidsblom
  • Improved Bybit handling for top-of-book quotes and order book deltas (#1672), thanks @davidsblom
  • Improved Interactive Brokers integration test mocks (#1669), thanks @rsmb7z
  • Improved error message when no tick scheme initialized for an instrument, thanks for reporting @VeraLyu
  • Improved SandboxExecutionClient instrument handling (instruments just need to be added to cache)
  • Ported VolumeWeightedAveragePrice indicator to Rust (#1665), thanks @Pushkarm029
  • Ported VerticalHorizontalFilter indicator to Rust (#1666), thanks @Pushkarm029

Breaking Changes

None

Fixes

  • Fixed SimulatedExchange processing of commands in real-time for sandbox mode
  • Fixed DataEngine unsubscribe handling (edge case would attempt to unsubscribe from the client multiple times)
  • Fixed Bybit order book deltas parsing (was appending bid side twice) (#1668), thanks @davidsblom
  • Fixed Binance instruments price and size precision parsing (was incorrectly stripping trailing zeros)
  • Fixed BinanceBar streaming feather writing (was not setting up writer)
  • Fixed backtest high-level tutorial documentation errors, thanks for reporting @Leonz5288

NautilusTrader 1.193.0 Beta

24 May 12:11
Compare
Choose a tag to compare

NautilusTrader 1.193.0 Beta

Released on 24th May 2024 (UTC).

Enhancements

  • Added Interactive Brokers support for Market-on-Close (MOC) and Limit-on-Close (LOC) order types (#1663), thanks @rsmb7z
  • Added Bybit sandbox example (#1659), thanks @davidsblom
  • Added Binance sandbox example

Breaking Changes

  • Overhauled SandboxExecutionClientConfig to more closely match BacktestVenueConfig (many changes and additions)

Fixes

  • Fixed DataFusion backend data ordering by ts_init when streaming (#1656), thanks @twitu
  • Fixed Interactive Brokers tick level historical data downloading (#1653), thanks @DracheShiki

NautilusTrader 1.192.0 Beta

18 May 09:07
Compare
Choose a tag to compare

NautilusTrader 1.192.0 Beta

Released on 18th May 2024 (UTC).

Enhancements

  • Added Nautilus CLI (see docs) (#1602), many thanks @filipmacek
  • Added Cfd and Commodity instruments with Interactive Brokers support (#1604), thanks @DracheShiki
  • Added OrderMatchingEngine futures and options contract activation and expiration simulation
  • Added Sandbox example with Interactive Brokers (#1618), thanks @rsmb7z
  • Added ParquetDataCatalog S3 support (#1620), thanks @benjaminsingleton
  • Added Bar.from_raw_arrays_to_list (#1623), thanks @rsmb7z
  • Added SandboxExecutionClientConfig.bar_execution option (#1646), thanks @davidsblom
  • Improved venue order ID generation and assignment (it was previously possible for the OrderMatchingEngine to generate multiple IDs for the same order)
  • Improved LiveTimer robustness and flexibility by not requiring positive intervals or stop times in the future (will immediately produce a time event), thanks for reporting @davidsblom

Breaking Changes

  • Removed allow_cash_positions config (simplify to the most common use case, spot trading should track positions)
  • Changed tags param and return type from str to list[str] (more naturally expresses multiple tags)
  • Changed Order.to_dict() commission and linked_order_id fields to lists of strings rather than comma separated strings
  • Changed OrderMatchingEngine to no longer process internally aggregated bars for execution (no tests failed, but still classifying as a behavior change), thanks for reporting @davidsblom

Fixes

  • Fixed CashAccount PnL and balance calculations (was adjusting filled quantity based on open position quantity - causing a desync and incorrect balance values)
  • Fixed from_str for Price, Quantity and Money when input string contains underscores in Rust, thanks for reporting @filipmacek
  • Fixed Money string parsing where the value from str(money) can now be passed to Money.from_str
  • Fixed TimeEvent equality (now based on the event id rather than the event name)
  • Fixed ParquetDataCatalog bar queries by instrument_id which were no longer returning data (the intent is to use bar_type, however using instrument_id now returns all matching bars)
  • Fixed venue order ID generation and application in sandbox mode (was previously generating additional venue order IDs), thanks for reporting @rsmb7z and @davidsblom
  • Fixed multiple fills causing overfills in sandbox mode (OrderMatchingEngine now caching filled quantity to prevent this) (#1642), thanks @davidsblom
  • Fixed leaves_qty exception message underflow (now correctly displays the projected negative leaves quantity)
  • Fixed Interactive Brokers contract details parsing (#1615), thanks @rsmb7z
  • Fixed Interactive Brokers portfolio registration (#1616), thanks @rsmb7z
  • Fixed Interactive Brokers IBOrder attributes assignment (#1634), thanks @rsmb7z
  • Fixed IBKR reconnection after gateway/TWS disconnection (#1622), thanks @benjaminsingleton
  • Fixed Binance Futures account balance calculation (was over stating free balance with margin collateral, which could result in a negative locked balance)
  • Fixed Betfair stream reconnection and avoid multiple reconnect attempts (#1644), thanks @imemo88

NautilusTrader 1.191.0 Beta

20 Apr 03:36
Compare
Choose a tag to compare

NautilusTrader 1.191.0 Beta

Released on 20th April 2024 (UTC).

Enhancements

  • Implemented FeeModel including FixedFeeModel and MakerTakerFeeModel (#1584), thanks @rsmb7z
  • Implemented TradeTickDataWrangler.process_bar_data (#1585), thanks @rsmb7z
  • Implemented multiple timeframe bar execution (will use lowest timeframe per instrument)
  • Optimized LiveTimer efficiency and accuracy with tokio timer under the hood
  • Optimized QuoteTickDataWrangler and TradeTickDataWrangler (#1590), thanks @rsmb7z
  • Standardized adapter client logging (handle more logging from client base classes)
  • Simplified and consolidated Rust OrderBook design
  • Improved CacheDatabaseAdapter graceful close and thread join
  • Improved MessageBus graceful close and thread join
  • Improved modify_order error logging when order values remain unchanged
  • Added RecordFlag enum for Rust and Python
  • Interactive Brokers further improvements and fixes, thanks @rsmb7z
  • Ported Bias indicator to Rust, thanks @Pushkarm029

Breaking Changes

  • Reordered OrderBookDelta params flags and sequence and removed default 0 values (more explicit and less chance of mismatches)
  • Reordered OrderBook params flags and sequence and removed default 0 values (more explicit and less chance of mismatches)
  • Added flags parameter to OrderBook.add
  • Added flags parameter to OrderBook.update
  • Added flags parameter to OrderBook.delete
  • Changed Arrow schema for all instruments: added info binary field
  • Changed Arrow schema for CryptoFuture: added is_inverse boolean field
  • Renamed both OrderBookMbo and OrderBookMbp to OrderBook (consolidated)
  • Renamed Indicator.handle_book_mbo and Indicator.handle_book_mbp to handle_book (consolidated)
  • Renamed register_serializable_object to register_serializable_type (also renames first param from obj to cls)

Fixes

  • Fixed MessageBus pattern resolving (fixes a performance regression where topics published with no subscribers would always re-resolve)
  • Fixed BacktestNode streaming data management (was not clearing between chunks), thanks for the report @dpmabo
  • Fixed RiskEngine cumulative notional calculations for margin accounts (was incorrectly using base currency when selling)
  • Fixed selling Equity instruments with CASH account and NETTING OMS incorrectly rejecting (should be able to reduce position)
  • Fixed Databento bars decoding (was incorrectly applying display factor)
  • Fixed Binance bar (kline) to use close_time for ts_event was opentime (#1591), thanks for reporting @OnlyC
  • Fixed AccountMarginExceeded error condition (margin must actually be exceeded now, and can be zero)
  • Fixed ParquetDataCatalog path globbing which was including all paths with substrings of specified instrument IDs

NautilusTrader 1.190.0 Beta

22 Mar 16:39
Compare
Choose a tag to compare

NautilusTrader 1.190.0 Beta

Released on 22nd March 2024 (UTC).

Enhancements

  • Added Databento adapter continuous, parent and instrument_id symbology support (will infer from symbols)
  • Added DatabaseConfig.timeout config option for timeout seconds to wait for a new connection
  • Added CSV tick and bar data loader params, thanks @rterbush
  • Implemented LogGuard to ensure global logger is flushed on termination, thanks @ayush-sb and @twitu
  • Improved Interactive Brokers client connectivity resilience and component lifecycle, thanks @benjaminsingleton
  • Improved Binance execution client ping listen key error handling and logging
  • Improved Redis cache adapter and message bus error handling and logging
  • Improved Redis port parsing (DatabaseConfig.port can now be either a string or integer)
  • Refactored InteractiveBrokersEWrapper, thanks @rsmb7z
  • Redact Redis passwords in strings and logs
  • Upgraded redis crate to v0.25.2 which bumps up TLS dependencies, and turned on tls-rustls-webpki-roots feature flag

Breaking Changes

None

Fixes

  • Fixed JSON format for log file output (was missing timestamp and trader_id)
  • Fixed DatabaseConfig port JSON parsing for Redis (was always defaulting to 6379)
  • Fixed ChandeMomentumOscillator indicator divide by zero error (both Rust and Cython versions)

NautilusTrader 1.189.0 Beta

15 Mar 12:53
Compare
Choose a tag to compare

NautilusTrader 1.189.0 Beta

Released on 15th March 2024 (UTC).

Enhancements

  • Implemented Binance order book snapshot rebuilds on websocket reconnect (see integration guide)
  • Added additional validations for OrderMatchingEngine (will now raise a RuntimeError when a price or size precision for OrderFilled does not match the instruments precisions)
  • Added LoggingConfig.use_pyo3 option for pyo3 based logging initialization (worse performance but allows visibility into logs originating from Rust)
  • Added exchange field to FuturesContract, FuturesSpread, OptionsContract and OptionsSpread (optional)

Breaking Changes

  • Changed Arrow schema adding exchange field for FuturesContract, FuturesSpread, OptionsContract and OptionsSpread

Fixes

  • Fixed MessageBus handling of subscriptions after a topic has been published on (was previously dropping messages for these late subscribers)
  • Fixed MessageBus handling of subscriptions under certain edge cases (subscriptions list could be resized on iteration causing a RuntimeError)
  • Fixed Throttler handling of sending messages after messages have been dropped, thanks @davidsblom
  • Fixed OrderBookDelta.to_pyo3_list using zero precision from clear delta
  • Fixed DataTransformer.pyo3_order_book_deltas_to_record_batch_bytes using zero precision from clear delta
  • Fixed OrderBookMbo and OrderBookMbp integrity check when crossed book
  • Fixed OrderBookMbp error when attempting to add to a L1_MBP book type (now raises RuntimeError rather than panicking)
  • Fixed Interactive Brokers connection error logging (#1524), thanks @benjaminsingleton
  • Fixed SimulationModuleConfig location and missing re-export from config subpackage
  • Fixed logging StdoutWriter from also writing error logs (writers were duplicating error logs)
  • Fixed BinanceWebSocketClient to new specification which requires responding to pings with a pong containing the pings payload
  • Fixed Binance Futures AccountBalance calculations based on wallet and available balance
  • Fixed ExecAlgorithm circular import issue for installed wheels (importing from execution.algorithm was a circular import)

NautilusTrader 1.188.0 Beta

25 Feb 11:37
92aee66
Compare
Choose a tag to compare

NautilusTrader 1.188.0 Beta

Released on 25th February 2024 (UTC).

Enhancements

  • Added FuturesSpread instrument type
  • Added OptionsSpread instrument type
  • Added InstrumentClass.FUTURE_SPREAD
  • Added InstrumentClass.OPTION_SPREAD
  • Added managed parameter to subscribe_order_book_deltas, default true to retain current behavior (if false then the data engine will not automatically manage a book)
  • Added managed parameter to subscribe_order_book_snapshots, default true to retain current behavior (if false then the data engine will not automatically manage a book)
  • Added additional validations for OrderMatchingEngine (will now reject orders with incorrect price or quantity precisions)
  • Removed interval_ms 20 millisecond limitation for subscribe_order_book_snapshots (i.e. just needs to be positive), although we recommend you consider subscribing to deltas below 100 milliseconds
  • Ported LiveClock and LiveTimer implementations to Rust
  • Implemented OrderBookDeltas pickling
  • Implemented AverageTrueRange in Rust, thanks @rsmb7z

Breaking Changes

  • Changed TradeId value maximum length to 36 characters (will raise a ValueError if value exceeds the maximum)

Fixes

  • Fixed TradeId memory leak due assigning unique values to the Ustr global string cache (which are never freed for the lifetime of the program)
  • Fixed TradeTick size precision for pyo3 conversion (size precision was incorrectly price precision)
  • Fixed RiskEngine cash value check when selling (would previously divide quantity by price which is too much), thanks for reporting@AnthonyVince
  • Fixed FOK time in force behavior (allows fills beyond the top level, will cancel if cannot fill full size)
  • Fixed IOC time in force behavior (allows fills beyond the top level, will cancel any remaining after all fills are applied)
  • Fixed LiveClock timer behavior for small intervals causing next time to be less than now (timer then would not run)
  • Fixed log level filtering for log_level_file (bug introduced in v1.187.0), thanks @twitu
  • Fixed logging print_config config option (was not being passed through to the logging system)
  • Fixed logging timestamps for backtesting (static clock was not being incrementally set to individual TimeEvent timestamps)
  • Fixed account balance updates (fills from zero quantity NETTING positions will generate account balance updates)
  • Fixed MessageBus publishable types collection type (needed to be tuple not set)
  • Fixed Controller registration of components to ensure all active clocks are iterated correctly during backtests
  • Fixed Equity short selling for CASH accounts (will now reject)
  • Fixed ActorFactory.create JSON encoding (was missing the encoding hook)
  • Fixed ImportableConfig.create JSON encoding (was missing the encoding hook)
  • Fixed ImportableStrategyConfig.create JSON encoding (was missing the encoding hook)
  • Fixed ExecAlgorithmFactory.create JSON encoding (was missing the encoding hook)
  • Fixed ControllerConfig base class and docstring
  • Fixed Interactive Brokers historical bar data bug, thanks @benjaminsingleton
  • Fixed persistence freeze_dict function to handle fs_storage_options, thanks @dimitar-petrov

NautilusTrader 1.187.0 Beta

09 Feb 12:15
61debf2
Compare
Choose a tag to compare

NautilusTrader 1.187.0 Beta

Released on 9th February 2024 (UTC).

Enhancements

  • Refined logging system module and writers in Rust, thanks @ayush-sb and @twitu
  • Improved Interactive Brokers adapter symbology and parsing with a strict_symbology option, thanks @rsmb7z and @fhill2

Breaking Changes

  • Reorganized configuration objects (separated into a config module per subpackage, with re-exports from nautilus_trader.config)

Fixes

  • Fixed BacktestEngine and Trader disposal (now properly releasing resources), thanks for reporting @davidsblom
  • Fixed circular import issues from configuration objects, thanks for reporting @cuberone
  • Fixed unnecessary creation of log files when file logging off