Releases: nautechsystems/nautilus_trader
NautilusTrader 1.128.0 Beta
NautilusTrader 1.128.0 Beta - Release Notes
This release continues the focus on the core system, with upgrades and cleanups
to the component base class. The concept of an active
order has been introduced,
which is an order whose state can change (is not a completed
order).
Breaking Changes
- All configuration due
pydantic
upgrade. - Throttling config now takes string e.g. "100/00:00:01" which is 100 / second.
- Renamed
DataProducerFacade
toDataProducer
. - Renamed
fill.side
tofill.order_side
(clarity and standardization). - Renamed
fill.type
tofill.order_type
(clarity and standardization).
Enhancements
- Added serializable configuration classes leveraging
pydantic
. - Improved adding bar data to
BacktestEngine
. - Added
BacktestEngine.add_bar_objects()
. - Added
BacktestEngine.add_bars_as_ticks()
. - Added order
active
concept, withorder.is_active
and cache methods. - Added
ComponentStateChanged
event. - Added
Component.degrade()
andComponent.fault()
command methods. - Added
Component.on_degrade()
andComponent.on_fault()
handler methods. - Added
ComponentState.PRE_INITIALIZED
. - Added
ComponentState.DEGRADING
. - Added
ComponentState.DEGRADED
. - Added
ComponentState.FAULTING
. - Added
ComponentState.FAULTED
. - Added
ComponentTrigger.INITIALIZE
. - Added
ComponentTrigger.DEGRADE
. - Added
ComponentTrigger.DEGRADED
. - Added
ComponentTrigger.FAULT
. - Added
ComponentTrigger.FAULTED
. - Wired up
Ticker
data type.
Fixes
DataEngine.subscribed_bars()
now reports internally aggregated bars also.
NautilusTrader 1.127.0 Beta
NautilusTrader 1.127.0 Beta - Release Notes
This release has again focused on core areas of the platform, including a
significant overhaul of accounting and portfolio components. The wiring between
the DataEngine
and DataClient
(s) has also received attention, and should now
exhibit correct subscription mechanics.
The Betfair adapter has been completely re-written, providing various fixes and
enhancements, increased performance, and full async support.
There has also been some further renaming to continue to align the platform
as closely as possible with established terminology in the domain.
Breaking Changes
- Moved margin calculation methods from
Instrument
toAccount
. - Removed redundant
Portfolio.register_account
. - Renamed
OrderState
toOrderStatus
. - Renamed
Order.state
toOrder.status
. - Renamed
msgbus.message_bus
tomsgbus.bus
.
Enhancements
- Betfair adapter re-write.
- Extracted
accounting
subpackage. - Extracted
portfolio
subpackage. - Subclassed
Account
withCashAccount
andMarginAccount
. - Added
AccountsManager
. - Added
AccountFactory
. - Moved registration of custom account classes to
AccountFactory
. - Moved registration of calculated account to
AccountFactory
. - Added registration of OMS type per trading strategy.
- Added
ExecutionClient.create_account
for custom account classes. - Separate
PortfolioFacade
fromPortfolio
.
Fixes
- Data subscription handling in
DataEngine
. Cash
accounts no longer generate spurious margins.- Fix
TimeBarAggregator._stored_close_ns
property name.
NautilusTrader 1.126.1 Beta
NautilusTrader 1.126.1 Beta - Release Notes
This is a patch release which fixes a bug involving NotImplementedError
exception handling when subscribing to order book deltas - when not supported by
a client. This bug affected CCXT order book subscriptions.
Breaking Changes
None
Enhancements
None
Fixes
- Fix
DataEngine
order book subscription handling.
NautilusTrader 1.126.0 Beta
NautilusTrader 1.126.0 Beta - Release Notes
This release sees the completion of the initial implementation of the
MessageBus
, with data now being handled by PUB/SUB patterns, along with the
additions of point-to-point and REQ/REP messaging functionality.
An Actor
base class has been abstracted from TradingStrategy
which allows
custom components to be added to a Trader
which aren't necessarily trading
strategies, opening up further possibilities for extending NautilusTrader with
custom functionality.
For the sake of simplicity and to favour more idiomatic Python, the null object
pattern is no longer utilized for handling identifiers. This has removed a layer
of 'logical indirection' in certain parts of the codebase, and allows for simpler
code.
An order is now considered 'in-flight' if it is actively pending a state
transition i.e. in the SUBMITTED
,PENDING_UPDATE
or PENDING_CANCEL
states.
It is now a well established convention that all integer based timestamps are
expressed in UNIX nanoseconds, therefore the _ns
postfix has now been dropped.
For clarity - time periods/intervals/objects where the units may not be obvious
have retained the _ns
postfix.
The opportunity was identified to unify the parameter naming for the concept
of object instantiation by renaming timestamp_ns
and ts_recv_ns
to ts_init
.
Along the same lines, the timestamps for both event and data occurrence have
been standardized to ts_event
.
It is acknowledged that the frequent name changes and modifications to core
concepts may be frustrating, however whilst still in a beta phase - we're taking
the opportunity to lay a solid foundation for this project to continue to growth
in the years ahead.
Breaking Changes
- Renamed
timestamp_ns
tots_init
. - Renamed
ts_recv_ns
tots_event
. - Renamed various event timestamp parameters to
ts_event
. - Removed null object methods on identifiers.
Enhancements
- Added
Actor
component base class. - Added
MessageBus.register()
. - Added
MessageBus.send()
. - Added
MessageBus.request()
. - Added
MessageBus.response()
. - Added
Trader.add_component()
. - Added
Trader.add_components()
. - Added
Trader.add_log_sink()
.
Fixes
- Various Betfair adapter patches and fixes.
ExecutionEngine
position flip logic in certain edge cases.
NautilusTrader 1.125.0 Beta
NautilusTrader 1.125.0 Beta - Release Notes
This release introduces a major re-architecture of the internal messaging system.
A common message bus has been implemented which now handles all events via a
PUB/SUB messaging pattern. The next release will see all data being handled by
the message bus, please see the related issue for further details on this enhancement.
Another notable feature is the introduction of the order 'in-flight' concept,
which is a submitted order which has not yet been acknowledged by the
exchange/broker. Several properties on Order
, and methods on Cache
, now exist
to support this.
The Throttler
has been refactored and optimized further. There has also been
extensive reorganization of the model sub-package, standardization of identifiers
on events, along with numerous 'under the hood' cleanups and two bug fixes.
Breaking Changes
- Renamed
MessageType
enum toMessageCategory
. - Renamed
fill.order_side
tofill.side
. - Renamed
fill.order_type
tofill.type
. - All
Event
serialization due to domain refactorings.
Enhancements
- Added
MessageBus
class. - Added
TraderId
toOrder
andPosition
. - Added
OrderType
to OrderFilled. - Added unrealized PnL to position events.
- Added order inflight concept to
Order
andCache
. - Improved efficiency of
Throttler
. - Standardized events
str
andrepr
. - Standardized commands
str
andrepr
. - Standardized identifiers on events and objects.
- Improved
Account
str
andrepr
. - Using
orjson
overjson
for efficiency. - Removed redundant
BypassCacheDatabase
. - Introduced
mypy
to the codebase.
Fixes
- Fixed backtest log timestamping.
- Fixed backtest duplicate initial account event.
NautilusTrader 1.124.0 Beta
NautilusTrader 1.124.0 Beta - Release Notes
This release sees the expansion of pre-trade risk check options (see
RiskEngine
class documentation). There has also been extensive 'under the
hood' code cleanup and consolidation.
Breaking Changes
- Renamed
Position.opened_timestamp_ns
tots_opened_ns
. - Renamed
Position.closed_timestamp_ns
tots_closed_ns
. - Renamed
Position.open_duration_ns
toduration_ns
. - Renamed Loggers
bypass_logging
tobypass
. - Refactored
PositionEvent
types.
Enhancements
- Add pre-trade risk checks to
RiskEngine
iteration 2. - Improve
Throttler
functionality and performance. - Removed redundant
OrderInvalid
state and associated code. - Improve analysis reports.
Fixes
- PnL calculations for
CASH
account types. - Various event serializations.
NautilusTrader 1.123.0 Beta
NautilusTrader 1.123.0 Beta - Release Notes
A major feature of this release is a complete re-design of serialization for the
platform, along with initial support for the Parquet format.
The MessagePack serialization functionality has been refined and retained.
In the interests of explicitness there is now a convention that timestamps are
named either timestamp_ns
, or prepended with ts
. Timestamps which are
represented with an int64
are always in nanosecond resolution, and appended
with _ns
accordingly.
Initial scaffolding for new backtest data tooling has been added.
Breaking Changes
- Renamed
OrderState.PENDING_REPLACE
toOrderState.PENDING_UPDATE
- Renamed
timestamp_origin_ns
tots_event_ns
. - Renamed
timestamp_ns
for data tots_recv_ns
. - Renamed
updated_ns
tots_updated_ns
. - Renamed
submitted_ns
tots_submitted_ns
. - Renamed
rejected_ns
tots_rejected_ns
. - Renamed
accepted_ns
tots_accepted_ns
. - Renamed
pending_ns
tots_pending_ns
. - Renamed
canceled_ns
tots_canceled_ns
. - Renamed
triggered_ns
tots_triggered_ns
. - Renamed
expired_ns
tots_expired_ns
. - Renamed
execution_ns
tots_filled_ns
. - Renamed
OrderBookLevel
toBookLevel
. - Renamed
Order.volume
toOrder.size
.
Enhancements
- Adapter dependencies are now optional extras at installation.
- Added arrow/parquet serialization.
- Added object
to_dict()
andfrom_dict()
methods. - Added
Order.is_pending_update
. - Added
Order.is_pending_cancel
. - Added
run_analysis
config option forBacktestEngine
. - Removed
TradeMatchId
in favour of bare string. - Removed redundant conversion to
pd.Timestamp
when checking timestamps. - Removed redundant data
to_serializable_str
methods. - Removed redundant data
from_serializable_str
methods. - Removed redundant
__ne__
implementations. - Removed redundant
MsgPackSerializer
cruft. - Removed redundant
ObjectCache
andIdentifierCache
. - Removed redundant string constants.
Fixes
- Fixed millis to nanos in
CCXTExecutionClient
. - Added missing trigger to
UpdateOrder
handling. - Removed all
import *
.
NautilusTrader 1.122.0 Beta
NautilusTrader 1.122.0 Beta - Release Notes
This release includes numerous breaking changes with a view to enhancing the core
functionality and API of the platform. The data and execution caches have been
unified for simplicity. There have also been large changes to the accounting
functionality, with 'hooks' added in preparation for accurate calculation and
handling of margins.
Breaking Changes
- Renamed
Account.balance()
toAccount.balance_total()
. - Consolidated
TradingStrategy.data
intoTradingStrategy.cache
. - Consolidated
TradingStrategy.execution
intoTradingStrategy.cache
. - Moved
redis
subpackage intoinfrastructure
. - Moved some accounting methods back to
Instrument
. - Removed
Instrument.market_value()
. - Renamed
Portfolio.market_values()
toPortfolio.net_exposures()
. - Renamed
Portfolio.market_value()
toPortfolio.net_exposure()
. - Renamed
InMemoryExecutionDatabase
toBypassCacheDatabase
. - Renamed
Position.relative_qty
toPosition.net_qty
. - Renamed
default_currency
tobase_currency
. - Removed
cost_currency
property fromInstrument
.
Enhancements
ExecutionClient
now has the option of calculating account state.- Unified data and execution caches into single
Cache
. - Improved configuration options and naming.
- Simplified
Portfolio
component registration. - Simplified wiring of
Cache
into components. - Added
repr
to execution messages. - Added
AccountType
enum. - Added
cost_currency
toPosition
. - Added
get_cost_currency()
toInstrument
. - Added
get_base_currency()
toInstrument
.
Fixes
- Fixed
Order.is_working
forPENDING_CANCEL
andPENDING_REPLACE
states. - Fixed loss of precision for nanosecond timestamps in Redis.
- Fixed state reconciliation when uninstantiated client.
NautilusTrader 1.121.0 Beta
NautilusTrader 1.121.0 Beta - Release Notes
In this release there has been a major change to the use of inlines for method
signatures. From the Cython docs:
"Note that class-level cdef functions are handled via a virtual function table
so the compiler won’t be able to inline them in almost all cases.".
https://cython.readthedocs.io/en/latest/src/userguide/pyrex_differences.html?highlight=inline.
It has been found that adding inline
to method signatures makes no difference
to the performance of the system - and so they have been removed to reduce
'noise' and simplify the codebase. Please note that the use of inline
for
module level functions will be passed to the C compiler with the expected
result of inlining the function.
Breaking Changes
BacktestEngine.add_venue
addedvenue_type
to method params.ExecutionClient
addedvenue_type
to constructor params.TraderId
instantiation.StrategyId
instantiation.Instrument
serialization.
Enhancements
Portfolio
pending calculations if data not immediately available.- Added
instruments
subpackage with expanded class definitions. - Added
timestamp_origin_ns
timestamp when originally occurred. - Added
AccountState.is_reported
flagging if reported by exchange or calculated. - Simplified
TraderId
andStrategyId
identifiers. - Improved
ExecutionEngine
order routing. - Improved
ExecutionEngine
client registration. - Added order routing configuration.
- Added
VenueType
enum and parser. - Improved param typing for identifier generators.
- Improved log formatting of
Money
andQuantity
thousands commas.
Fixes
- CCXT
TICK_SIZE
precision mode - size precisions (BitMEX, FTX). - State reconciliation (various bugs).
NautilusTrader 1.120.0 Beta
NautilusTrader 1.120.0 Beta - Release Notes
This release focuses on simplifications and enhancements of existing machinery.
Breaking Changes
Position
now requires anInstrument
param.is_inverse
removed fromOrderFilled
.ClientId
removed fromTradingCommand
and subclasses.AccountId
removed fromTradingCommand
and subclasses.TradingCommand
serialization.
Enhancements
- Add
Instrument
methods toExecutionCache
. - Add
Venue
filter to cache queries. - Move order validations into
RiskEngine
. - Refactor
RiskEngine
. - Remove routing type information from identifiers.
Fixes
None