Skip to content

Commit

Permalink
Release 1.189.0
Browse files Browse the repository at this point in the history
See release notes.
  • Loading branch information
cjdsellers authored Mar 15, 2024
2 parents 92aee66 + 83dd6ee commit 5e12bdf
Show file tree
Hide file tree
Showing 329 changed files with 11,265 additions and 4,976 deletions.
2 changes: 1 addition & 1 deletion .docker/nautilus_trader.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.7.1 \
POETRY_VERSION=1.8.2 \
POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_NO_INTERACTION=1 \
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ repos:
exclude: "docs/_pygments/monokai.py"

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
rev: v0.3.2
hooks:
- id: ruff
args: ["--fix"]
Expand Down Expand Up @@ -111,7 +111,7 @@ repos:
]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
args: [
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,16 @@ docs-python: install-just-deps-all

.PHONY: docs-rust
docs-rust:
(cd nautilus_core && RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --no-deps)
(cd nautilus_core && RUSTDOCFLAGS="--enable-index-page -Zunstable-options --deny warnings" cargo +nightly doc --no-deps)

.PHONY: clippy
clippy:
(cd nautilus_core && cargo clippy --fix --all-targets --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used -W clippy::expect_used)

.PHONY: clippy-nightly
clippy-nightly:
(cd nautilus_core && cargo +nightly clippy --fix --all-targets --all-features --allow-dirty --allow-staged -- -D warnings -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used -W clippy::expect_used)

.PHONY: cargo-build
cargo-build:
(cd nautilus_core && cargo build --release --all-features)
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ NautilusTrader is designed in a modular way to work with 'adapters' which provid
connectivity to data providers and/or trading venues - converting their raw API
into a unified interface. The following integrations are currently supported:

| Name | ID | Type | Status | Docs |
| :-------------------------------------------------------- | :-------------------- | :---------------------- | :------------------------------------------------------ | :---------------------------------------------------------------- |
| [Betfair](https://betfair.com) | `BETFAIR` | Sports betting exchange | ![status](https://img.shields.io/badge/beta-yellow) | [Guide](https://docs.nautilustrader.io/integrations/betfair.html) |
| [Binance](https://binance.com) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Binance US](https://binance.us) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Binance Futures](https://www.binance.com/en/futures) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Bybit](https://www.bybit.com) | `BYBIT` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/building-orange) | |
| [Databento](https://databento.com) | `DATABENTO` | Data provider | ![status](https://img.shields.io/badge/building-orange) | |
| [Interactive Brokers](https://www.interactivebrokers.com) | `INTERACTIVE_BROKERS` | Brokerage (multi-venue) | ![status](https://img.shields.io/badge/beta-yellow) | [Guide](https://docs.nautilustrader.io/integrations/ib.html) |
| Name | ID | Type | Status | Docs |
| :-------------------------------------------------------- | :-------------------- | :---------------------- | :------------------------------------------------------ | :------------------------------------------------------------------ |
| [Betfair](https://betfair.com) | `BETFAIR` | Sports betting exchange | ![status](https://img.shields.io/badge/beta-yellow) | [Guide](https://docs.nautilustrader.io/integrations/betfair.html) |
| [Binance](https://binance.com) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Binance US](https://binance.us) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Binance Futures](https://www.binance.com/en/futures) | `BINANCE` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/binance.html) |
| [Bybit](https://www.bybit.com) | `BYBIT` | Crypto exchange (CEX) | ![status](https://img.shields.io/badge/building-orange) | |
| [Databento](https://databento.com) | `DATABENTO` | Data provider | ![status](https://img.shields.io/badge/beta-yellow) | [Guide](https://docs.nautilustrader.io/integrations/databento.html) |
| [Interactive Brokers](https://www.interactivebrokers.com) | `INTERACTIVE_BROKERS` | Brokerage (multi-venue) | ![status](https://img.shields.io/badge/stable-green) | [Guide](https://docs.nautilustrader.io/integrations/ib.html) |

Refer to the [Integrations](https://docs.nautilustrader.io/integrations/index.html) documentation for further details.

Expand Down
30 changes: 30 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# NautilusTrader 1.189.0 Beta

Released on 15th March 2024 (UTC).

### Enhancements
- Implemented Binance order book snapshot rebuilds on websocket reconnect (see integration guide)
- Added additional validations for `OrderMatchingEngine` (will now raise a `RuntimeError` when a price or size precision for `OrderFilled` does not match the instruments precisions)
- Added `LoggingConfig.use_pyo3` option for pyo3 based logging initialization (worse performance but allows visibility into logs originating from Rust)
- Added `exchange` field to `FuturesContract`, `FuturesSpread`, `OptionsContract` and `OptionsSpread` (optional)

### Breaking Changes
- Changed Arrow schema adding `exchange` field for `FuturesContract`, `FuturesSpread`, `OptionsContract` and `OptionsSpread`

### Fixes
- Fixed `MessageBus` handling of subscriptions after a topic has been published on (was previously dropping messages for these late subscribers)
- Fixed `MessageBus` handling of subscriptions under certain edge cases (subscriptions list could be resized on iteration causing a `RuntimeError`)
- Fixed `Throttler` handling of sending messages after messages have been dropped, thanks @davidsblom
- Fixed `OrderBookDelta.to_pyo3_list` using zero precision from clear delta
- Fixed `DataTransformer.pyo3_order_book_deltas_to_record_batch_bytes` using zero precision from clear delta
- Fixed `OrderBookMbo` and `OrderBookMbp` integrity check when crossed book
- Fixed `OrderBookMbp` error when attempting to add to a L1\_MBP book type (now raises `RuntimeError` rather than panicking)
- Fixed Interactive Brokers connection error logging (#1524), thanks @benjaminsingleton
- Fixed `SimulationModuleConfig` location and missing re-export from `config` subpackage
- Fixed logging `StdoutWriter` from also writing error logs (writers were duplicating error logs)
- Fixed `BinanceWebSocketClient` to [new specification](https://binance-docs.github.io/apidocs/futures/en/#websocket-market-streams) which requires responding to pings with a pong containing the pings payload
- Fixed Binance Futures `AccountBalance` calculations based on wallet and available balance
- Fixed `ExecAlgorithm` circular import issue for installed wheels (importing from `execution.algorithm` was a circular import)

---

# NautilusTrader 1.188.0 Beta

Released on 25th February 2024 (UTC).
Expand Down
17 changes: 0 additions & 17 deletions docs/api_reference/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,3 @@
:members:
:member-order: bysource
```

```{eval-rst}
.. automodule:: nautilus_trader.common.throttler
:show-inheritance:
:inherited-members:
:members:
:member-order: bysource
```

## Message Bus
```{eval-rst}
.. automodule:: nautilus_trader.common.msgbus
:show-inheritance:
:inherited-members:
:members:
:member-order: bysource
```
1 change: 0 additions & 1 deletion docs/api_reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
data.md
execution.md
indicators.md
infrastructure.md
live.md
model/index.md
persistence.md
Expand Down
13 changes: 0 additions & 13 deletions docs/api_reference/infrastructure.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/concepts/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ a trading domain:

- `OrderBookDelta` (L1/L2/L3) - Most granular order book updates
- `OrderBookDeltas` (L1/L2/L3) - Bundles multiple order book deltas
- `OrderBookDepth10` - Aggregated order book snapshot (10 levels per side)
- `QuoteTick` - Top-of-book best bid and ask prices and sizes
- `TradeTick` - A single trade/match event between counterparties
- `Bar` - OHLCV 'bar' data, aggregated using a specific *method*
- `Ticker` - General base class for a symbol ticker
- `Instrument` - General base class for a tradable instrument
- `VenueStatus` - A venue level status event
- `InstrumentStatus` - An instrument level status event
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
```

To get started with NautilusTrader you will need the following:
- A Python environment with `nautilus_trader` installed
- A Python environment with the `nautilus_trader` package installed
- A way to launch Python scripts for backtesting and/or live trading (either from the command line, or jupyter notebook etc)

## [Installation](installation.md)
Expand Down
20 changes: 10 additions & 10 deletions docs/getting_started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ First, download and load the data by running the next cell (this should take ~ 1

```bash
!apt-get update && apt-get install curl -y
!curl https://raw.githubusercontent.com/nautechsystems/nautilus_data/main/scripts/hist_data_to_catalog.py | python -
!curl https://raw.githubusercontent.com/nautechsystems/nautilus_data/main/nautilus_data/hist_data_to_catalog.py | python -
```

## Connecting to the ParquetDataCatalog
Expand All @@ -56,10 +56,10 @@ catalog.instruments()

## Writing a trading strategy

NautilusTrader includes a handful of indicators built-in, in this example we will use a MACD indicator to
build a simple trading strategy.
NautilusTrader includes many indicators built-in, in this example we will use the MACD indicator to
build a simple trading strategy.

You can read more about [MACD here](https://www.investopedia.com/terms/m/macd.asp), so this
You can read more about [MACD here](https://www.investopedia.com/terms/m/macd.asp), this
indicator merely serves as an example without any expected alpha. There is also a way of
registering indicators to receive certain data types, however in this example we manually pass the received
`QuoteTick` to the indicator in the `on_quote_tick` method.
Expand Down Expand Up @@ -167,9 +167,9 @@ class MACDStrategy(Strategy):

## Configuring Backtests

Now that we have a trading strategy and data, we can begin to configure a backtest run! Nautilus uses a `BacktestNode`
to orchestrate backtest runs, which requires some setup. This may seem a little complex at first,
however this is necessary for the capabilities that Nautilus strives for.
Now that we have a trading strategy and data, we can begin to configure a backtest run.

Nautilus uses a `BacktestNode` to orchestrate backtest runs, which requires some setup.

To configure a `BacktestNode`, we first need to create an instance of a `BacktestRunConfig`, configuring the
following (minimal) aspects of the backtest:
Expand All @@ -178,7 +178,7 @@ following (minimal) aspects of the backtest:
- `venues` - The simulated execution venues (exchanges or brokers) available in the backtest
- `data` - The input data we would like to perform the backtest on

There are many more configurable features which will be described later in the docs, for now this will get us up and running.
There are many more configuration options which are described the docs, for now this will get us up and running.

## Venue

Expand All @@ -205,7 +205,7 @@ venue = BacktestVenueConfig(

## Instruments

Second, we need to know about the instruments that we would like to load data for, we can use the `ParquetDataCatalog` for this:
Second, we need to specify the instruments that we would like to load data for, we can use the `ParquetDataCatalog` for this:

```python
instruments = catalog.instruments()
Expand Down Expand Up @@ -237,7 +237,7 @@ data = BacktestDataConfig(

Then, we need a `BacktestEngineConfig` which represents the configuration of our core trading system.
Here we need to pass our trading strategies, we can also adjust the log level
and configure many other components (however, it's also fine to use the defaults):
and configure many other components (however, it's also fine to use the sensible defaults):

Strategies are added via the `ImportableStrategyConfig`, which allows importing strategies from arbitrary files or
user packages. In this instance, our `MACDStrategy` is defined in the current module, which python refers to as `__main__`.
Expand Down
Loading

0 comments on commit 5e12bdf

Please sign in to comment.