Releases: nautechsystems/nautilus_trader
Releases · nautechsystems/nautilus_trader
NautilusTrader 1.200.0 Beta
NautilusTrader 1.200.0 Beta
Released on 7th September 2024 (UTC).
Enhancements
- Added dYdX integration (#1861, #1868, #1873, #1874, #1875, #1877, #1879, #1880, #1882, #1886, #1887, #1890, #1891, #1896, #1901, #1903, #1907, #1910, #1911, #1913, #1915), thanks @davidsblom
- Added composite bar types, bars aggregated from other bar types (#1859, #1885, #1888, #1894, #1905), thanks @faysou
- Added
OrderBookDeltas.batch
for batching groups of deltas based on record flags (batch untilF_LAST
) - Added
OrderBookDeltas
batching support forParquetDataCatalog
(usedata_cls
ofOrderBookDeltas
to batch with the same flags method as live adapters) - Added
RetryManagerPool
to abstract common retry functionality for all adapters - Added
InstrumentClose
functionality forOrderMatchingEngine
, thanks @limx0 - Added
BacktestRunConfig.dispose_on_completion
config setting to control post-run disposal behavior for each internal backtest engine (True
by default to retain current behavior) - Added
recv_window_ms
config setting forBinanceExecClientConfig
- Added
sl_time_in_force
andtp_time_in_force
parameters toOrderFactory.bracket(...)
method - Added custom
client_order_id
parameters toOrderFactory
methods - Added support for Binance RSA and Ed25519 API key types (#1908), thanks @NextThread
- Added
multiplier
parameter forCryptoPerpetual
(default 1) - Implemented
BybitExecutionClient
retry logic forsubmit_order
,modify_order
,cancel_order
andcancel_all_orders
- Improved error modeling and handling in Rust (#1866), thanks @twitu
- Improved
HttpClient
error handling and addedHttpClientError
exception for Python (#1872), thanks @twitu - Improved
WebSocketClient
error handling and addedWebSocketClientError
exception for Python (#1876), thanks @twitu - Improved
WebSocketClient.send_text
efficiency (now accepts UTF-8 encoded bytes, rather than a Python string) - Improved
@customdataclass
decorator withdate
field and refined__repr__
(#1900, #1906, #1909), thanks @faysou - Improved standardization of
OrderBookDeltas
parsing and records flags for crypto venues - Refactored
RedisMessageBusDatabase
to tokio tasks - Refactored
RedisCacheDatabase
to tokio tasks - Upgraded
tokio
crate to v1.40.0
Breaking Changes
- Renamed
heartbeat_interval
toheartbeat_interval_secs
(more explicitly indicates time units) - Moved
heartbeat_interval_secs
config setting toMessageBusConfig
(the message bus handles external stream processing) - Changed
WebSocketClient.send_text(...)
to takedata
asbytes
rather thanstr
- Changed
CryptoPerpetual
Arrow schema to includemultiplier
field - Changed
CryptoFuture
Arrow schema to includemultiplier
field
Fixes
- Fixed
OrderBook
memory deallocation in Python finalizer (memory was not being freed on object destruction), thanks for reporting @zeyuhuan - Fixed
Order
tags serialization (was not concatenating to a single string), thanks for reporting @DevRoss - Fixed
types_filter
serialization inMessageBusConfig
during kernel setup - Fixed
InstrumentProvider
handling ofload_ids_on_start
when elements are alreadyInstrumentId
s - Fixed
InstrumentProviderConfig
hashing forfilters
field
NautilusTrader 1.199.0 Beta
NautilusTrader 1.199.0 Beta
Released on 19th August 2024 (UTC).
Enhancements
- Added
LiveExecEngineConfig.generate_missing_orders
reconciliation config option to align internal and external position states - Added
LogLevel::TRACE
(only available in Rust for debug/development builds) - Added
Actor.subscribe_signal(...)
method andData.is_signal(...)
class method (#1853), thanks @faysou - Added Binance Futures support for
HEDGE
mode (#1846), thanks @DevRoss - Overhauled and refined error modeling and handling in Rust (#1849, #1858), thanks @twitu
- Improved
BinanceExecutionClient
position report requests (can now filter by instrument and includes reporting for flat positions) - Improved
BybitExecutionClient
position report requests (can now filter by instrument and includes reporting for flat positions) - Improved
LiveExecutionEngine
reconciliation robustness and recovery when internal positions do not match external positions - Improved
@customdataclass
decorator constructor to allow more positional arguments (#1850), thanks @faysou - Improved
@customdataclass
documentation (#1854), thanks @faysou - Upgraded
datafusion
crate to v41.0.0 - Upgraded
tokio
crate to v1.39.3 - Upgraded
uvloop
to v0.20.0 (upgrades libuv to v1.48.0)
Breaking Changes
- Changed
VolumeWeightedAveragePrice
calculation formula to use each bars "typical" price (#1842), thanks @evgenii-prusov - Changed
OptionsContract
constructor parameter ordering and Arrow schema (consistently group option kind and strike price) - Renamed
snapshot_positions_interval
tosnapshot_positions_interval_secs
(more explicitly indicates time units) - Moved
snapshot_orders
config setting toExecEngineConfig
(can now be used for all environment contexts) - Moved
snapshot_positions
config setting toExecEngineConfig
(can now be used for all environment contexts) - Moved
snapshot_positions_interval_secs
config setting toExecEngineConfig
(can now be used for all environment contexts)
Fixes
- Fixed
Position
exception type on duplicate fill (should beKeyError
to align with the same error forOrder
) - Fixed Bybit position report parsing when position is flat (
BybitPositionSide
now correctly handles the empty string)
NautilusTrader 1.198.0 Beta
NautilusTrader 1.198.0 Beta
Released on 9th August 2024 (UTC).
Enhancements
- Added
@customdata
decorator to reduce need for boiler plate implementing custom data types (#1828), thanks @faysou - Added timeout for HTTP client in Rust (#1835), thanks @davidsblom
- Added catalog conversion function of streamed data to backtest data (#1834), thanks @faysou
- Upgraded Cython to v3.0.11
Breaking Changes
None
Fixes
- Fixed creation of
instrumend_id
folder when writing PyO3 bars in catalog (#1832), thanks @faysou - Fixed
StreamingFeatherWriter
handling ofinclude_types
option (#1833), thanks @faysou - Fixed
BybitExecutionClient
position reports error handling and logging - Fixed
BybitExecutionClient
order report handling to correctly process external orders
NautilusTrader 1.197.0 Beta
NautilusTrader 1.197.0 Beta
Released on 2nd August 2024 (UTC).
Enhancements
- Added Databento Status schema support for loading and live trading
- Added options on futures support for Interactive Brokers (#1795), thanks @rsmb7z
- Added documentation for option greeks custom data example (#1788), thanks @faysou
- Added
MarketStatusAction
enum (support Databentostatus
schema) - Added
ignore_quote_tick_size_updates
config option for Interactive Brokers (#1799), thanks @sunlei - Implemented
MessageBus
v2 in Rust (#1786), thanks @twitu - Implemented
DataEngine
v2 in Rust (#1785), thanks @twitu - Implemented
FillModel
in Rust (#1801), thanks @filipmacek - Implemented
FixedFeeModel
in Rust (#1802), thanks @filipmacek - Implemented
MakerTakerFeeModel
in Rust (#1803), thanks @filipmacek - Implemented Postgres native enum mappings in Rust (#1797, #1806), thanks @filipmacek
- Refactored order submission error handling for Interactive Brokers (#1783), thanks @rsmb7z
- Improved live reconciliation robustness (will now generate inferred orders necessary to align external position state)
- Improved tests for Interactive Brokers (#1776), thanks @mylesgamez
- Upgraded
tokio
crate to v1.39.2 - Upgraded
datafusion
crate to v40.0.0
Breaking Changes
- Removed
VenueStatus
and all associated methods and schemas (redundant withInstrumentStatus
) - Renamed
QuoteTick.extract_volume(...)
to.extract_size(...)
(more accurate terminology) - Changed
InstrumentStatus
params (support Databentostatus
schema) - Changed
InstrumentStatus
arrow schema - Changed
OrderBook
FFI API to take data by reference instead of by value
Fixes
- Fixed rounding errors in accounting calculations for large values (using
decimal.Decimal
internally) - Fixed multi-currency account commission handling with multiple PnL currencies (#1805), thanks for reporting @dpmabo
- Fixed
DataEngine
unsubscribing from order book deltas (#1814), thanks @davidsblom - Fixed
LiveExecutionEngine
handling of adapter client execution report causingNone
mass status (#1789), thanks for reporting @faysou - Fixed
InteractiveBrokersExecutionClient
handling of instruments not found when generating execution reports (#1789), thanks for reporting @faysou - Fixed Bybit parsing of trade and quote ticks for websocket messages (#1794), thanks @davidsblom
NautilusTrader 1.196.0 Beta
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 venuebook_type
isL2_MBP
orL3_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
andPositionId
generation) - Changed
<Arc<Mutex<bool>>
toAtomicBool
in Rustnetwork
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
andunsubscribe_order_book_snapshots
tosubscribe_order_book_at_interval
andunsubscribe_order_book_at_interval
respectively (this clarifies the method behavior where the handler then receivesOrderBook
at a regular interval, distinct from a collection of deltas representing a snapshot)
Fixes
- Fixed
LIMIT
order fill behavior forL2_MBP
andL3_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 forNautilusKernelConfig
- Fixed
OrderMatchingEngine
processing by book type for quotes and deltas (#1754), thanks @davidsblom - Fixed
DatabentoDataLoader.from_dbn_file
forOrderBookDelta
s whenas_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 anda
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 forget
(was the same asadd
), thanks for reporting @faysou
NautilusTrader 1.195.0 Beta
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 aCLEAR
action), thanks for reporting @VeraLyu - Fixed
Instrument.make_price
andmake_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
NautilusTrader 1.194.0 Beta
Released on 31st May 2024 (UTC).
Enhancements
- Added
DataEngine
order book deltas buffering toF_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
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 matchBacktestVenueConfig
(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
NautilusTrader 1.192.0 Beta
Released on 18th May 2024 (UTC).
Enhancements
- Added Nautilus CLI (see docs) (#1602), many thanks @filipmacek
- Added
Cfd
andCommodity
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 fromstr
tolist[str]
(more naturally expresses multiple tags) - Changed
Order.to_dict()
commission
andlinked_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
forPrice
,Quantity
andMoney
when input string contains underscores in Rust, thanks for reporting @filipmacek - Fixed
Money
string parsing where the value fromstr(money)
can now be passed toMoney.from_str
- Fixed
TimeEvent
equality (now based on the eventid
rather than the eventname
) - Fixed
ParquetDataCatalog
bar queries byinstrument_id
which were no longer returning data (the intent is to usebar_type
, however usinginstrument_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 negativelocked
balance) - Fixed Betfair stream reconnection and avoid multiple reconnect attempts (#1644), thanks @imemo88
NautilusTrader 1.191.0 Beta
NautilusTrader 1.191.0 Beta
Released on 20th April 2024 (UTC).
Enhancements
- Implemented
FeeModel
includingFixedFeeModel
andMakerTakerFeeModel
(#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 withtokio
timer under the hood - Optimized
QuoteTickDataWrangler
andTradeTickDataWrangler
(#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
paramsflags
andsequence
and removed default 0 values (more explicit and less chance of mismatches) - Reordered
OrderBook
paramsflags
andsequence
and removed default 0 values (more explicit and less chance of mismatches) - Added
flags
parameter toOrderBook.add
- Added
flags
parameter toOrderBook.update
- Added
flags
parameter toOrderBook.delete
- Changed Arrow schema for all instruments: added
info
binary field - Changed Arrow schema for
CryptoFuture
: addedis_inverse
boolean field - Renamed both
OrderBookMbo
andOrderBookMbp
toOrderBook
(consolidated) - Renamed
Indicator.handle_book_mbo
andIndicator.handle_book_mbp
tohandle_book
(consolidated) - Renamed
register_serializable_object
toregister_serializable_type
(also renames first param fromobj
tocls
)
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 withCASH
account andNETTING
OMS incorrectly rejecting (should be able to reduce position) - Fixed Databento bars decoding (was incorrectly applying display factor)
- Fixed
Binance
bar (kline) to useclose_time
forts_event
wasopentime
(#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