Skip to content

Releases: nautechsystems/nautilus_trader

NautilusTrader 1.128.0 Beta

30 Aug 10:00
44068bc
Compare
Choose a tag to compare

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 to DataProducer.
  • Renamed fill.side to fill.order_side (clarity and standardization).
  • Renamed fill.type to fill.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, with order.is_active and cache methods.
  • Added ComponentStateChanged event.
  • Added Component.degrade() and Component.fault() command methods.
  • Added Component.on_degrade() and Component.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

17 Aug 12:21
2793380
Compare
Choose a tag to compare

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 to Account.
  • Removed redundant Portfolio.register_account.
  • Renamed OrderState to OrderStatus.
  • Renamed Order.state to Order.status.
  • Renamed msgbus.message_bus to msgbus.bus.

Enhancements

  • Betfair adapter re-write.
  • Extracted accounting subpackage.
  • Extracted portfolio subpackage.
  • Subclassed Account with CashAccount and MarginAccount.
  • 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 from Portfolio.

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

02 Aug 21:56
a569c76
Compare
Choose a tag to compare

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

02 Aug 13:17
a64a8bd
Compare
Choose a tag to compare

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 to ts_init.
  • Renamed ts_recv_ns to ts_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

18 Jul 13:36
11c83f4
Compare
Choose a tag to compare

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 to MessageCategory.
  • Renamed fill.order_side to fill.side.
  • Renamed fill.order_type to fill.type.
  • All Event serialization due to domain refactorings.

Enhancements

  • Added MessageBus class.
  • Added TraderId to Order and Position.
  • Added OrderType to OrderFilled.
  • Added unrealized PnL to position events.
  • Added order inflight concept to Order and Cache.
  • Improved efficiency of Throttler.
  • Standardized events str and repr.
  • Standardized commands str and repr.
  • Standardized identifiers on events and objects.
  • Improved Account str and repr.
  • Using orjson over json 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

06 Jul 05:25
4a1492a
Compare
Choose a tag to compare

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 to ts_opened_ns.
  • Renamed Position.closed_timestamp_ns to ts_closed_ns.
  • Renamed Position.open_duration_ns to duration_ns.
  • Renamed Loggers bypass_logging to bypass.
  • 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

20 Jun 08:07
8f0c23b
Compare
Choose a tag to compare

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 to OrderState.PENDING_UPDATE
  • Renamed timestamp_origin_ns to ts_event_ns.
  • Renamed timestamp_ns for data to ts_recv_ns.
  • Renamed updated_ns to ts_updated_ns.
  • Renamed submitted_ns to ts_submitted_ns.
  • Renamed rejected_ns to ts_rejected_ns.
  • Renamed accepted_ns to ts_accepted_ns.
  • Renamed pending_ns to ts_pending_ns.
  • Renamed canceled_ns to ts_canceled_ns.
  • Renamed triggered_ns to ts_triggered_ns.
  • Renamed expired_ns to ts_expired_ns.
  • Renamed execution_ns to ts_filled_ns.
  • Renamed OrderBookLevel to BookLevel.
  • Renamed Order.volume to Order.size.

Enhancements

  • Adapter dependencies are now optional extras at installation.
  • Added arrow/parquet serialization.
  • Added object to_dict() and from_dict() methods.
  • Added Order.is_pending_update.
  • Added Order.is_pending_cancel.
  • Added run_analysis config option for BacktestEngine.
  • 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 and IdentifierCache.
  • 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

06 Jun 10:11
f713b55
Compare
Choose a tag to compare

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() to Account.balance_total().
  • ConsolidatedTradingStrategy.data into TradingStrategy.cache.
  • Consolidated TradingStrategy.execution into TradingStrategy.cache.
  • Moved redis subpackage into infrastructure.
  • Moved some accounting methods back to Instrument.
  • Removed Instrument.market_value().
  • Renamed Portfolio.market_values() to Portfolio.net_exposures().
  • Renamed Portfolio.market_value() to Portfolio.net_exposure().
  • Renamed InMemoryExecutionDatabase to BypassCacheDatabase.
  • Renamed Position.relative_qty to Position.net_qty.
  • Renamed default_currency to base_currency.
  • Removed cost_currency property from Instrument.

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 to Position.
  • Added get_cost_currency() to Instrument.
  • Added get_base_currency() to Instrument.

Fixes

  • Fixed Order.is_working for PENDING_CANCEL and PENDING_REPLACE states.
  • Fixed loss of precision for nanosecond timestamps in Redis.
  • Fixed state reconciliation when uninstantiated client.

NautilusTrader 1.121.0 Beta

30 May 07:40
bd41532
Compare
Choose a tag to compare

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 added venue_type to method params.
  • ExecutionClient added venue_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 and StrategyId 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 and Quantity thousands commas.

Fixes

  • CCXT TICK_SIZE precision mode - size precisions (BitMEX, FTX).
  • State reconciliation (various bugs).

NautilusTrader 1.120.0 Beta

23 May 09:30
b0a0485
Compare
Choose a tag to compare

NautilusTrader 1.120.0 Beta - Release Notes

This release focuses on simplifications and enhancements of existing machinery.

Breaking Changes

  • Position now requires an Instrument param.
  • is_inverse removed from OrderFilled.
  • ClientId removed from TradingCommand and subclasses.
  • AccountId removed from TradingCommand and subclasses.
  • TradingCommand serialization.

Enhancements

  • Add Instrument methods to ExecutionCache.
  • Add Venue filter to cache queries.
  • Move order validations into RiskEngine.
  • Refactor RiskEngine.
  • Remove routing type information from identifiers.

Fixes

None