Releases: nautechsystems/nautilus_trader
Releases · nautechsystems/nautilus_trader
NautilusTrader 1.176.0 Beta
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 viaCacheConfig
) - 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 coreOrderBook
(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) andTUSD
(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
fromExecEngineConfig
toLiveExecEngineConfig
- All
Actor.request_*
methods no longer take arequest_id
, but now return aUUID4
request ID - Removed
BinanceExecClientConfig.warn_gtd_to_gtd
(now always anINFO
level log) - Renamed
Instrument.native_symbol
toraw_symbol
(you must manually migrate or flush your cached instruments) - Renamed
Position.cost_currency
tosettlement_currency
(standardize terminology) - Renamed
CacheDatabaseConfig.flush
toflush_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 useDecimal
rather thanfloat
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 undocumentedINSURANCE_FUND
, thanks for reporting @Tzumx - Extended
BinanceSpotPermissions
enum members #1161, thanks for reporting @davidblom603
NautilusTrader 1.175.0 Beta
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 onhyper
, thanks @twitu - Added core Rust
WebSocketClient
based ontokio-tungstenite
, thanks @twitu - Added core Rust
SocketClient
based ontokio
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
toadd_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 anEXTERNAL
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
tohandle_order_book_deltas
(to more clearly reflect theOrderBookDeltas
data type) - Renamed
Actor.on_order_book_delta
toon_order_book_deltas
(to more clearly reflect theOrderBookDeltas
data type) - Renamed
inverse_as_quote
touse_quote_for_inverse
(ambiguous name, only applicable for notional calcs on inverse instruments) - Changed
Data
contract (custom data), see docs - Renamed core
LogMessage
toLogEvent
to more clearly distinguish between themessage
field and the event struct itself (aligns with vector language) - Renamed core
LogEvent.timestamp_ns
toLogEvent.timestamp
(affects field name for JSON format) - Renamed core
LogEvent.msg
toLogEvent.message
(affects field name for JSON format)
Fixes
- Updated
BinanceAccountType
enum members and associated docs - Fixed
BinanceCommonExecutionClient
iteration ofOrderList
orders - Fixed heartbeats for
BinanceWebSocketClient
(new Rust client now responds withpong
frames) - Fixed Binance adapter typing for
orderId
,fromId
,startTime
andendTime
(all are ints), thanks for reporting @davidsblom - Fixed
Currency
equality to be based on thecode
field (avoiding equality issues over FFI), thanks for reporting @Otlk - Fixed
BinanceInstrumentProvider
parsing of initial and maintenance margin values
NautilusTrader 1.174.0 Beta
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 themodel.data.book
namespace
Enhancements
- Improved handling for backtest account blow-up scenarios (balance negative or margin exceeded)
- Added
AccountMarginExceeded
exception and refinedAccountBalanceNegative
- 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 callon_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
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 eventts_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
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 toFuturesContract
(avoids ambiguity) - Renamed
Option
instrument toOptionsContract
(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 forStrategyConfig
(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
andTWAPExecAlgorithmConfig
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 forPrice
andQuantity
(not being used in Cython/Python layer)
NautilusTrader 1.171.0 Beta
NautilusTrader 1.171.0 Beta
Released on 30th March 2023 (UTC).
Breaking Changes
- Renamed all position
net_qty
fields and parameters tosigned_qty
(more accurate naming) NautilusKernelConfig
removed alllog_*
config options (replaced bylogging
withLoggingConfig
)- Trading
CurrencyPair
instruments with a single-currencyCASH
account type no longer permitted (unrealistic) - Changed
PositionEvent
parquet schemas (renamednet_qty
field tosigned_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, andLiveExecutionEngine
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 forMarketOrder
andSubmitOrder
, thanks for reporting @rsmb7z
NautilusTrader 1.170.0 Beta
NautilusTrader 1.170.0 Beta
Released on 11th March 2023 (UTC).
Breaking Changes
- Moved
backtest.data.providers
totest_kit.providers
- Moved
backtest.data.wranglers
topersistence.wranglers
(to be consolidated) - Moved
backtest.data.loaders
topersistence.loaders
(to be consolidated) - Renamed
from_datetime
tostart
across data request methods and properties - Renamed
to_datetime
toend
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 baseNautilusKernelConfig
- Changed to immediately caching orders and order lists in
Strategy
- Changed to checking duplicate
client_order_id
andorder_list_id
inStrategy
- Changed generating and applying
OrderPendingUpdate
andOrderPendingCancel
inStrategy
PortfolioAnalyzer
PnL statistics now take optionalunrealized_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 notrigger_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 oflast_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
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
parampost_only_entry
->entry_post_only
(consistency with other params) - Renamed
OrderFactory.bracket
parampost_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()
toTradingNode.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 forOrderList
(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 refineActor
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
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
NautilusTrader 1.167.0 Beta
Released on 28th January 2023 (UTC).
Breaking Changes
- Renamed
OrderBookData.update_id
tosequence
- Renamed
BookOrder.id
toorder_id
Enhancements
- Introduced Rust pyo3 based
ParquetReader
andParquetWriter
, 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