A high-performance algorithmic trading platform and event-driven backtester
Released on 20th April 2024 (UTC).
FeeModel
including FixedFeeModel
and MakerTakerFeeModel
(#1584), thanks @rsmb7zTradeTickDataWrangler.process_bar_data
(#1585), thanks @rsmb7zLiveTimer
efficiency and accuracy with tokio
timer under the hoodQuoteTickDataWrangler
and TradeTickDataWrangler
(#1590), thanks @rsmb7zOrderBook
designCacheDatabaseAdapter
graceful close and thread joinMessageBus
graceful close and thread joinmodify_order
error logging when order values remain unchangedRecordFlag
enum for Rust and PythonOrderBookDelta
params flags
and sequence
and removed default 0 values (more explicit and less chance of mismatches)OrderBook
params flags
and sequence
and removed default 0 values (more explicit and less chance of mismatches)flags
parameter to OrderBook.add
flags
parameter to OrderBook.update
flags
parameter to OrderBook.delete
info
binary fieldCryptoFuture
: added is_inverse
boolean fieldOrderBookMbo
and OrderBookMbp
to OrderBook
(consolidated)Indicator.handle_book_mbo
and Indicator.handle_book_mbp
to handle_book
(consolidated)register_serializable_object
to register_serializable_type
(also renames first param from obj
to cls
)MessageBus
pattern resolving (fixes a performance regression where topics published with no subscribers would always re-resolve)BacktestNode
streaming data management (was not clearing between chunks), thanks for the report @dpmaboRiskEngine
cumulative notional calculations for margin accounts (was incorrectly using base currency when selling)Equity
instruments with CASH
account and NETTING
OMS incorrectly rejecting (should be able to reduce position)Binance
bar (kline) to use close_time
for ts_event
was opentime
(#1591), thanks for reporting @OnlyCAccountMarginExceeded
error condition (margin must actually be exceeded now, and can be zero)ParquetDataCatalog
path globbing which was including all paths with substrings of specified instrument IDsReleased on 22nd March 2024 (UTC).
continuous
, parent
and instrument_id
symbology support (will infer from symbols)DatabaseConfig.timeout
config option for timeout seconds to wait for a new connectionLogGuard
to ensure global logger is flushed on termination, thanks @ayush-sb and @twituDatabaseConfig.port
can now be either a string or integer)InteractiveBrokersEWrapper
, thanks @rsmb7zredis
crate to 0.25.2 which bumps up TLS dependencies, and turned on tls-rustls-webpki-roots
feature flagNone
timestamp
and trader_id
)DatabaseConfig
port JSON parsing for Redis (was always defaulting to 6379)ChandeMomentumOscillator
indicator divide by zero error (both Rust and Cython versions)Released on 15th March 2024 (UTC).
OrderMatchingEngine
(will now raise a RuntimeError
when a price or size precision for OrderFilled
does not match the instruments precisions)LoggingConfig.use_pyo3
option for pyo3 based logging initialization (worse performance but allows visibility into logs originating from Rust)exchange
field to FuturesContract
, FuturesSpread
, OptionsContract
and OptionsSpread
(optional)exchange
field for FuturesContract
, FuturesSpread
, OptionsContract
and OptionsSpread
MessageBus
handling of subscriptions after a topic has been published on (was previously dropping messages for these late subscribers)MessageBus
handling of subscriptions under certain edge cases (subscriptions list could be resized on iteration causing a RuntimeError
)Throttler
handling of sending messages after messages have been dropped, thanks @davidsblomOrderBookDelta.to_pyo3_list
using zero precision from clear deltaDataTransformer.pyo3_order_book_deltas_to_record_batch_bytes
using zero precision from clear deltaOrderBookMbo
and OrderBookMbp
integrity check when crossed bookOrderBookMbp
error when attempting to add to a L1_MBP book type (now raises RuntimeError
rather than panicking)SimulationModuleConfig
location and missing re-export from config
subpackageStdoutWriter
from also writing error logs (writers were duplicating error logs)BinanceWebSocketClient
to new specification which requires responding to pings with a pong containing the pings payloadAccountBalance
calculations based on wallet and available balanceExecAlgorithm
circular import issue for installed wheels (importing from execution.algorithm
was a circular import)Released on 25th February 2024 (UTC).
FuturesSpread
instrument typeOptionsSpread
instrument typeInstrumentClass.FUTURE_SPREAD
InstrumentClass.OPTION_SPREAD
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)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)OrderMatchingEngine
(will now reject orders with incorrect price or quantity precisions)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 millisecondsLiveClock
and LiveTimer
implementations to RustOrderBookDeltas
picklingAverageTrueRange
in Rust, thanks @rsmb7zTradeId
value maximum length to 36 characters (will raise a ValueError
if value exceeds the maximum)TradeId
memory leak due assigning unique values to the Ustr
global string cache (which are never freed for the lifetime of the program)TradeTick
size precision for pyo3 conversion (size precision was incorrectly price precision)RiskEngine
cash value check when selling (would previously divide quantity by price which is too much), thanks for reporting@AnthonyVinceLiveClock
timer behavior for small intervals causing next time to be less than now (timer then would not run)log_level_file
(bug introduced in v1.187.0), thanks @twituprint_config
config option (was not being passed through to the logging system)TimeEvent
timestamps)NETTING
positions will generate account balance updates)MessageBus
publishable types collection type (needed to be tuple
not set
)Controller
registration of components to ensure all active clocks are iterated correctly during backtestsEquity
short selling for CASH
accounts (will now reject)ActorFactory.create
JSON encoding (was missing the encoding hook)ImportableConfig.create
JSON encoding (was missing the encoding hook)ImportableStrategyConfig.create
JSON encoding (was missing the encoding hook)ExecAlgorithmFactory.create
JSON encoding (was missing the encoding hook)ControllerConfig
base class and docstringfreeze_dict
function to handle fs_storage_options
, thanks @dimitar-petrovReleased on 9th February 2024 (UTC).
strict_symbology
option, thanks @rsmb7z and @fhill2config
module per subpackage, with re-exports from nautilus_trader.config
)BacktestEngine
and Trader
disposal (now properly releasing resources), thanks for reporting @davidsblomReleased on 2nd February 2024 (UTC).
None
None
TimeBarAggregator
handling of interval types on buildBinanceSpotExecutionClient
non-existent method name, thanks @sunleipsutil
import, thanks @sunleiReleased on 26th January 2024 (UTC).
bypass_logging
is set true for a LIVE
contextregister_serializable object
to also add type to internal _EXTERNAL_PUBLIHSABLE_TYPES
StreamingConfig.include_types
type from tuple[str]
to list[type]
(better alignment with other type filters)clock
module into component
module (reduce binary wheel size)logging
module into component
module (reduce binary wheel size)OrderUpdated
(trigger_price
type was incorrect), thanks @benjaminsingletonStreamingConfig.include_types
behavior (was not being honored for instrument writers), thanks for reporting @doublier1ImportableStrategyConfig
type assignment in StrategyFactory
(#1470), thanks @rsmb7zReleased on 22nd January 2024 (UTC).
LogLevel.OFF
(matches the Rust tracing
log levels)init_logging
function with sensible defaults to initialize the Rust implemented logging systemBinanceFuturesContractType
and BinanceFuturesPositionUpdateReason
sysinfo
crate (adds swap space metrics and a PID identifier)psutil
clock
parameter from Logger
(no dependency on Clock
anymore)LoggerAdapter
to Logger
(and removed old Logger
class)Logger
component_name
parameter to name
(matches Python built-in logging
API)OptionKind
kind
parameter and property to option_kind
(better clarity)OptionsContract
Arrow schema field kind
to option_kind
level_file
log level to OFF
(file logging is off by default)DataEngine
order book snapshot timer names (could not parse instrument IDs with hyphens), thanks for reporting @x-zho14 and @dimitar-petrovLoggingConfig
parsing of WARNING
log level (was not being recognized), thanks for reporting @davidsblomQuoteTick
parsing to capture event time for ts_event
, thanks for reporting @x-zho14Released on 12th January 2024 (UTC).
NautilusConfig.json_primitives
to convert object to Python dictionary with JSON primitive valuesInstrumentClass.BOND
MessageBusConfig
use_trader_prefix
and use_trader_id
options (provides more control over stream names)CacheConfig.drop_instruments_on_reset
(default true to retain current behavior)log
crate, thanks @twituRuntimeError
only when needed (not when using TWS), thanks @rsmb7zhyper
and reqwest
, thanks @ayush-sbParquetDataCatalog
custom data prefix from geneticdata_
to custom_
(you will need to rename any catalog subdirs)ComponentStateChanged
Arrow schema for config
from string
to binary
OrderInitialized
Arrow schema for options
from string
to binary
OrderBookDeltas
dictionary representation of deltas
field from JSON bytes
to a list of dict
(standardize with all other data types)trader-{trader_id}-{instance_id}-streams
(with options allows many traders to publish to the same streams)V2
suffix for clarityGenericData
to CustomData
(more accurately reflects the nature of the type)DataClient.subscribed_generic_data
to .subscribed_custom_data
MessageBusConfig.stream
to .streams_prefix
(more accurate)ParquetDataCatalog.generic_data
to .custom_data
TradeReport
to FillReport
(more conventional terminology, and more clearly separates market data from user execution reports)asset_type
to instrument_class
across the codebase (more conventional terminology)AssetType
enum to InstrumentClass
(more conventional terminology)AssetClass.BOND
to AssetClass.DEBT
(more conventional terminology)AssetClass.METAL
(not strictly an asset class, more a futures category)AssetClass.ENERGY
(not strictly an asset class, more a futures category)multiplier
param from Equity
constructor (not applicable)size_precision
, size_increment
, and multiplier
fields from Equity
dictionary representation (not applicable)TracingConfig
(now redundant with new logging implementation)Ticker
data type and associated methods (not a type which can be practically normalized and so becomes adapter specific generic data)AssetClass.SPORTS_BETTING
to InstrumentClass.SPORTS_BETTING
StreamingFeatherWriter
BinanceSpotInstrumentProvider
fee loading key error for partial instruments load, thanks for reporting @doublier1BinanceErrorCode.SERVER_BUSY
(-1008), also added to the retry error codesBinanceOrderStatus.EXPIRED_IN_MATCH
which is when an order was canceled by the exchange due self-trade prevention (STP), thanks for reporting @doublier1Released on 23rd December 2023 (UTC).
CacheDatabaseFacade
and CacheDatabaseAdapter
to abstract backing technology from Python codebaseRedisCacheDatabase
implemented in Rust with separate MPSC channel thread for insert, update and delete operationsOrderBookDelta
and OrderBookDeltas
to serializable and publishable typesPortfolioFacade
to Actor
Actor
and Strategy
usability to be more lenient to mistaken calls to clock
and logger
from the constructor (warnings also added to docs)redis
and hiredis
dependencies from Python codebaseNautilusKernelConfig.trader_id
to type TraderId
BacktestDataConfig.instrument_id
to type InstrumentId
ActorConfig.component_id
to type ComponentId | None
StrategyConfig.strategy_id
to type StrategyId | None
Instrument
, OrderFilled
and AccountState
info
field serialization due below fix (you'll need to flush your cache)CacheConfig
to take a DatabaseConfig
(better symmetry with MessageBusConfig
)RedisCacheDatabase
data structure for currencies from hashset to simpler key-value (you'll need to clear cache or delete all curreny keys)Actor
state loading to now use the standard Serializer
register_json_encoding
to register_config_encoding
register_json_decoding
to register_config_decoding
CacheDatabaseConfig
(due above config change)infrastructure
subpackage (now redundant with new Rust implementation)json
encoding for CacheDatabaseAdapter
from info
field serialization fix belowInstrument
, OrderFilled
and AccountState
info
field serialization to retain JSON serializable dicts (rather than double encoding and losing information)good_till_date
value when time_in_force
not GTD, such as when strategy is managing the GTD (was incorrectly passing through UNIX milliseconds)Executor
handling of queued task IDs (was not discarding from queued tasks on completion)DataEngine
handling of order book snapshots with very small intervals (now handles as short as 20 milliseconds)BacktestEngine.clear_actors()
, BacktestEngine.clear_strategies()
and BacktestEngine.clear_exec_algorithms()
, thanks for reporting @davidsblomBacktestEngine
OrderEmulator reset, thanks @davidsblomThrottler.reset
and reset of RiskEngine
throttlers, thanks @davidsblom