Skip to content

Releases: nautechsystems/nautilus_trader

NautilusTrader 1.176.0 Beta

31 Jul 04:06
32b0e70
Compare
Choose a tag to compare

NautilusTrader 1.176.0 Beta

Released on 31st July 2023 (UTC).

Enhancements

  • Implemented string interning with the ustr library, thanks @twitu
  • Added SyntheticInstrument capability, including dynamic derivation formulas
  • Added Order.commissions() convenience method (also added to state snapshot dictionaries)
  • Added Cache position and order state snapshots (configure via CacheConfig)
  • Added CacheDatabaseConfig.timestamps_as_iso8601 to persist timestamps as ISO 8601 strings
  • Added LiveExecEngineConfig.filter_position_reports to filter position reports from reconciliation
  • Added Strategy.cancel_gtd_expiry to cancel managed GTD order expiration
  • Added Binance Futures support for modifying LIMIT orders
  • Added BinanceExecClientConfig.max_retries option (for retrying order submit and cancel requests)
  • Added BinanceExecClientConfig.retry_delay option (the delay between retry attempts)
  • Added BinanceExecClientConfig.use_reduce_only option (default true to retain current behavior)
  • Added BinanceExecClientConfig.use_position_ids option (default true to retain current behavior)
  • Added BinanceExecClientConfig.treat_expired_as_canceled option (default false to retain current behavior)
  • Added BacktestVenueConfig.use_reduce_only option (default true to retain current behavior)
  • Added MessageBus.is_pending_request(...) method
  • Added Level API for core OrderBook (exposes the bid and ask levels for the order book)
  • Added Actor.is_pending_request(...) convenience method
  • Added Actor.has_pending_requests() convenience method
  • Added Actor.pending_requests() convenience method
  • Added USDP (Pax Dollar) and TUSD (TrueUSD) stablecoins
  • Improved OrderMatchingEngine handling when no fills (an error is now logged)
  • Improved Binance live clients logging
  • Upgraded Cython to 3.0.0 stable

Breaking Changes

  • Moved filter_unclaimed_external_orders from ExecEngineConfig to LiveExecEngineConfig
  • All Actor.request_* methods no longer take a request_id, but now return a UUID4 request ID
  • Removed BinanceExecClientConfig.warn_gtd_to_gtd (now always an INFO level log)
  • Renamed Instrument.native_symbol to raw_symbol (you must manually migrate or flush your cached instruments)
  • Renamed Position.cost_currency to settlement_currency (standardize terminology)
  • Renamed CacheDatabaseConfig.flush to flush_on_start (for clarity)
  • Changed Order.ts_last to represent the UNIX nanoseconds timestamp of the last event (rather than fill)

Fixes

  • Fixed Portfolio.net_position calculation to use Decimal rather than float to avoid rounding errors
  • Fixed race condition on OrderFactory order identifiers generation
  • Fixed dictionary representation of orders for venue_order_id (for three order types)
  • Fixed Currency registration with core global map on creation
  • Fixed serialization of OrderInitialized.exec_algorithm_params to spec (bytes rather than string)
  • Fixed assignment of position IDs for contingency orders (when parent filled)
  • Fixed PENDING_CANCEL -> EXPIRED as valid state transition (real world possibility)
  • Fixed fill handling of reduce_only orders when partially filled
  • Fixed Binance reconciliation which was requesting reports for the same symbol multiple times
  • Fixed Binance Futures native symbol parsing (was actually Nautilus symbol values)
  • Fixed Binance Futures PositionStatusReport parsing of position side
  • Fixed Binance Futures TradeReport assignment of position ID (was hardcoded to hedging mode)
  • Fixed Binance execution submitting of order lists
  • Fixed Binance commission rates requests for InstrumentProvider
  • Fixed Binance TriggerType parsing #1154, thanks for reporting @davidblom603
  • Fixed Binance order parsing of invalid orders in execution reports #1157, thanks for reporting @graceyangfan
  • Extended BinanceOrderType enum members to include undocumented INSURANCE_FUND, thanks for reporting @Tzumx
  • Extended BinanceSpotPermissions enum members #1161, thanks for reporting @davidblom603

NautilusTrader 1.175.0 Beta

17 Jun 07:42
Compare
Choose a tag to compare

NautilusTrader 1.175.0 Beta

Released on 16th June 2023 (UTC).

The Betfair adapter is broken for this release pending integration with the new Rust order book.
We recommend you do not upgrade to this version if you're using the Betfair adapter.

Enhancements

  • Integrated Interactive Brokers adapter v2 into platform, thanks @rsmb7z
  • Integrated core Rust OrderBook into platform
  • Integrated core Rust OrderBookDelta data type
  • Added core Rust HttpClient based on hyper, thanks @twitu
  • Added core Rust WebSocketClient based on tokio-tungstenite, thanks @twitu
  • Added core Rust SocketClient based on tokio TcpStream, thanks @twitu
  • Added quote_quantity parameter to determine if order quantity is denominated in quote currency
  • Added trigger_instrument_id parameter to trigger emulated orders from alternative instrument prices
  • Added use_random_ids to add_venue(...) method, controls whether venue order, position and trade IDs will be random UUID4s (no change to current behaviour)
  • Added ExecEngineConfig.filter_unclaimed_external_orders options, if unclaimed order events with an EXTERNAL strategy ID should be filtered/dropped
  • Changed BinanceHttpClient to use new core HTTP client
  • Defined public API for data, can now import directly from nautilus_trader.model.data (denest namespace)
  • Defined public API for events, can now import directly from nautilus_trader.model.events (denest namespace)

Breaking changes

  • Upgraded pandas to v2
  • Removed OrderBookSnapshot (redundant as can be represented as an initial CLEAR followed by deltas)
  • Removed OrderBookData (redundant)
  • Renamed Actor.handle_order_book_delta to handle_order_book_deltas (to more clearly reflect the OrderBookDeltas data type)
  • Renamed Actor.on_order_book_delta to on_order_book_deltas (to more clearly reflect the OrderBookDeltas data type)
  • Renamed inverse_as_quote to use_quote_for_inverse (ambiguous name, only applicable for notional calcs on inverse instruments)
  • Changed Data contract (custom data), see docs
  • Renamed core LogMessage to LogEvent to more clearly distinguish between the message field and the event struct itself (aligns with vector language)
  • Renamed core LogEvent.timestamp_ns to LogEvent.timestamp (affects field name for JSON format)
  • Renamed core LogEvent.msg to LogEvent.message (affects field name for JSON format)

Fixes

  • Updated BinanceAccountType enum members and associated docs
  • Fixed BinanceCommonExecutionClient iteration of OrderList orders
  • Fixed heartbeats for BinanceWebSocketClient (new Rust client now responds with pong frames)
  • Fixed Binance adapter typing for orderId, fromId, startTime and endTime (all are ints), thanks for reporting @davidsblom
  • Fixed Currency equality to be based on the code field (avoiding equality issues over FFI), thanks for reporting @Otlk
  • Fixed BinanceInstrumentProvider parsing of initial and maintenance margin values

NautilusTrader 1.174.0 Beta

20 May 00:55
a0de1b0
Compare
Choose a tag to compare

NautilusTrader 1.174.0 Beta

Released on 19th May 2023 (UTC).

Breaking Changes

  • Parquet schemas are now shifting towards catalog v2 (we recommend you don't upgrade if using legacy catalog)
  • Moved order book data from model.orderbook.data into the model.data.book namespace

Enhancements

  • Improved handling for backtest account blow-up scenarios (balance negative or margin exceeded)
  • Added AccountMarginExceeded exception and refined AccountBalanceNegative
  • Various improvements to Binance clients error handling and logging
  • Improve Binance HTTP error messages

Fixes

  • Fixed handling of emulated order contingencies (not based on status of spawned algorithm orders)
  • Fixed sending execution algorithm commands from strategy
  • Fixed OrderEmulator releasing of already closed orders
  • Fixed MatchingEngine processing of reduce only for child contingency orders
  • Fixed MatchingEngine position ID assignment for child contingency orders
  • Fixed Actor handling of historical data from requests (will now call on_historical_data regardless of state), thanks for reporting @miller-moore
  • Fixed pyarrow schema dictionary index keys being too narrow (int8 -> int16), thanks for reporting @rterbush

NautilusTrader 1.173.0 Beta

05 May 11:17
e13b080
Compare
Choose a tag to compare

NautilusTrader 1.173.0 Beta

Released on 5th May 2023 (UTC).

Breaking Changes

None

Enhancements

None

Fixes

  • Fixed BacktestEngine processing of venue(s) message queue based off time event ts_init
  • Fixed Position.signed_decimal_qty (incorrect format precision in f-string), thanks for reporting @rsmb7z
  • Fixed trailing stop type order updates for reduce_only instruction, thanks for reporting @Otlk
  • Fixed updating of active execution algorithm orders (events weren't being cached)
  • Fixed condition check for applying pending events (do not apply to orders at INITIALIZED status)

NautilusTrader 1.172.0 Beta

30 Apr 05:47
7b5e5d3
Compare
Choose a tag to compare

NautilusTrader 1.172.0 Beta

Released on 30th April 2023 (UTC).

Breaking Changes

  • Removed legacy Rust parquet data catalog backend (based on arrow2)
  • Removed Binance config for clock_sync_interval_secs (redundant/unused and should be handled at system level)
  • Removed redundant rate limiting from Rust logger (and associated rate_limit config params)
  • Renamed Future instrument to FuturesContract (avoids ambiguity)
  • Renamed Option instrument to OptionsContract (avoids ambiguity and naming conflicts in Rust)
  • Reinstate hours and minutes time component for default order and position identifiers (easier debugging, less collisions)
  • Setting time alerts for in the past or current time will generate an immediate TimeEvent (rather than being invalid)

Enhancements

  • Added new DataFusion Rust parquet data catalog backend (yet to be integrated into Python)
  • Added external_order_claims config option for StrategyConfig (for claiming external orders per instrument)
  • Added Order.signed_decimal_qty()
  • Added Cache.orders_for_exec_algorithm(...)
  • Added Cache.orders_for_exec_spawn(...)
  • Added TWAPExecAlgorithm and TWAPExecAlgorithmConfig to examples
  • Build out ExecAlgorithm base class for implementing 'first class' execution algorithms
  • Rewired execution for improved flow flexibility between emulated orders, execution algorithms and the RiskEngine
  • Improved handling for OrderEmulator updating of contingency orders from execution algorithms
  • Define public API for instruments, can now import directly from nautilus_trader.model.instruments (denest namespace)
  • Define public API for orders, can now import directly from nautilus_trader.model.orders (denest namespace)
  • Define public API for order book, can now import directly from nautilus_trader.model.orderbook (denest namespace)
  • Now stripping debug symbols after build (reduced binary sizes)
  • Refined build and added additional debug Makefile convenience targets

Fixes

  • Fixed processing of contingency orders when in a pending update state
  • Fixed calculation of PnL for flipped positions (only book realized PnL against open position)
  • Fixed WebSocketClient session disconnect, thanks for reporting @miller-moore
  • Added missing BinanceSymbolFilterType.NOTIONAL
  • Fixed incorrect Mul trait for Price and Quantity (not being used in Cython/Python layer)

NautilusTrader 1.171.0 Beta

30 Mar 05:39
68c2e56
Compare
Choose a tag to compare

NautilusTrader 1.171.0 Beta

Released on 30th March 2023 (UTC).

Breaking Changes

  • Renamed all position net_qty fields and parameters to signed_qty (more accurate naming)
  • NautilusKernelConfig removed all log_* config options (replaced by logging with LoggingConfig)
  • Trading CurrencyPair instruments with a single-currency CASH account type no longer permitted (unrealistic)
  • Changed PositionEvent parquet schemas (renamed net_qty field to signed_qty)

Enhancements

  • Added LoggingConfig to consolidate logging configs, offering various file options and per component level filters
  • Added BacktestVenueConfig.bar_execution to control whether bar data moves the matching engine markets (reinstated)
  • Added optional request_id for actor data requests (aids processing responses), thanks @rsmb7z
  • Added Position.signed_decimal_qty()
  • Now using above signed quantity for Portfolio net position calculation, and LiveExecutionEngine reconciliation comparisons

Fixes

  • Fixed BacktestEngine clock and logger handling (had a redundant extra logger and not swapping live clock in post run)
  • Fixed close_position order event publishing and cache persistence for MarketOrder and SubmitOrder, thanks for reporting @rsmb7z

NautilusTrader 1.170.0 Beta

12 Mar 01:43
afdf8d9
Compare
Choose a tag to compare

NautilusTrader 1.170.0 Beta

Released on 11th March 2023 (UTC).

Breaking Changes

  • Moved backtest.data.providers to test_kit.providers
  • Moved backtest.data.wranglers to persistence.wranglers (to be consolidated)
  • Moved backtest.data.loaders to persistence.loaders (to be consolidated)
  • Renamed from_datetime to start across data request methods and properties
  • Renamed to_datetime to end across data request methods and properties
  • Removed RiskEngineConfig.deny_modify_pending_update (as now redundant with new pending event sequencing)
  • Removed redundant log sink machinery
  • Changed parquet catalog schema dictionary integer key widths/types
  • Invalidated all pickled data due to Cython 3.0.0b1 upgrade

Enhancements

  • Added logging to file at core Rust level
  • Added DataCatalogConfig for more cohesive data catalog configuration
  • Added DataEngine.register_catalog to support historical data requests
  • Added catalog_config field to base NautilusKernelConfig
  • Changed to immediately caching orders and order lists in Strategy
  • Changed to checking duplicate client_order_id and order_list_id in Strategy
  • Changed generating and applying OrderPendingUpdate and OrderPendingCancel in Strategy
  • PortfolioAnalyzer PnL statistics now take optional unrealized_pnl
  • Backtest performance statistics now include unrealized PnL in total PnL

Fixes

  • Fixed Binance Futures trigger type parsing
  • Fixed DataEngine bar subscribe and unsubscribe logic, thanks for reporting @rsmb7z
  • Fixed Actor handling of bars, thanks @limx0
  • Fixed CancelAllOrders command handling for contingent orders not yet in matching core
  • Fixed TrailingStopMarketOrder slippage calculation when no trigger_price, thanks for reporting @rsmb7z
  • Fixed BinanceSpotInstrumentProvider parsing of quote asset (was using base), thanks for reporting @logogin
  • Fixed undocumented Binance time in force 'GTE_GTC', thanks for reporting @graceyangfan
  • Fixed Position calculation of last_qty when commission currency was equal to base currency, thanks for reporting @rsmb7z
  • Fixed BacktestEngine post backtest run PnL performance statistics for currencies traded per venue, thanks for reporting @rsmb7z

NautilusTrader 1.169.0 Beta

18 Feb 02:05
12801be
Compare
Choose a tag to compare

NautilusTrader 1.169.0 Beta

Released on 18th February 2023 (UTC).

Breaking Changes

  • NautilusConfig objects now pseudo-immutable from new msgspec 0.13.0
  • Renamed OrderFactory.bracket param post_only_entry -> entry_post_only (consistency with other params)
  • Renamed OrderFactory.bracket param post_only_tp -> tp_post_only (consistency with other params)
  • Renamed build_time_bars_with_no_updates -> time_bars_build_with_no_updates (consistency with new param)
  • Renamed OrderFactory.set_order_count() -> set_client_order_id_count() (clarity)
  • Renamed TradingNode.start() to TradingNode.run()

Enhancements

  • Complete overhaul and improvements to Binance adapter(s), thanks @poshcoe
  • Added Binance aggregated trades functionality with use_agg_trade_ticks, thanks @poshcoe
  • Added time_bars_timestamp_on_close option for configurable bar timestamping (True by default)
  • Added OrderFactory.generate_client_order_id() (calls internal generator)
  • Added OrderFactory.generate_order_list_id() (calls internal generator)
  • Added OrderFactory.create_list(...) as easier method for creating order lists
  • Added __len__ implementation for OrderList (returns length of orders)
  • Implemented optimized logger using Rust MPSC channel and separate thread
  • Expose and improve MatchingEngine public API for custom functionality
  • Exposed TradingNode.run_async() for easier running from async context
  • Exposed TradingNode.stop_async() for easier stopping from async context

Fixes

  • Fixed registration of SimulationModule (and refine Actor base registration)
  • Fixed loading of previously emulated and transformed orders (handles transforming OrderInitialized event)
  • Fixed handling of MARKET_TO_LIMIT orders in matching and risk engines, thanks for reporting @martinsaip

NautilusTrader 1.168.0 Beta

29 Jan 13:13
5ce9605
Compare
Choose a tag to compare

NautilusTrader 1.168.0 Beta

Released on 29th January 2023 (UTC).

Breaking Changes

  • Removed Cache.clear_cache() (redundant with the .reset() method)

Enhancements

  • Added Cache .add(...) and .get(...) for general 'user/custom' objects (as bytes)
  • Added CacheDatabase .add(...) and .load() for general cache objects (as bytes)
  • Added RedisCacheDatabase .add(...) and .load() for general Redis persisted bytes objects (as bytes)
  • Added Cache.actor_ids()
  • Added Actor cached state saving and loading functionality
  • Improved logging for called action handlers when not overridden

Fixes

  • Fixed configuration of loading and saving actor and strategy state

NautilusTrader 1.167.0 Beta

28 Jan 04:37
f95e3c7
Compare
Choose a tag to compare

NautilusTrader 1.167.0 Beta

Released on 28th January 2023 (UTC).

Breaking Changes

  • Renamed OrderBookData.update_id to sequence
  • Renamed BookOrder.id to order_id

Enhancements

  • Introduced Rust pyo3 based ParquetReader and ParquetWriter, thanks @twitu
  • Added msgbus.is_subscribed (to check if topic and handler already subscribed)
  • Simplified message type model and introduce CQRS-ish live messaging architecture

Fixes

  • Fixed Binance data clients order book startup buffer handling
  • Fixed NautilusKernel redundant initialization of event loop for backtesting, thanks @limx0
  • Fixed BacktestNode disposal sequence
  • Fixed quick start docs and notebook