Skip to content

Commit

Permalink
Release 1.181.0
Browse files Browse the repository at this point in the history
See release notes.
  • Loading branch information
cjdsellers authored Dec 2, 2023
2 parents 622014e + cdcf2fd commit 63c191b
Show file tree
Hide file tree
Showing 630 changed files with 23,958 additions and 14,379 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.6.1 \
POETRY_VERSION=1.7.1 \
POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_NO_INTERACTION=1 \
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: build-wheels

# Build Linux wheels on successful completion of the `coverage` workflow on the `develop` branch
# Temporarily build wheels on every push to `develop` branch
# Build wheels on every push to `develop` branch

on:
push:
Expand All @@ -15,7 +14,7 @@ jobs:
matrix:
arch: [x64]
os: [ubuntu-latest]
python-version: ["3.11"]
python-version: ["3.11", "3.12"]
name: build - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
runs-on: ${{ matrix.os }}

Expand All @@ -31,12 +30,22 @@ jobs:
echo "RUST_VERSION=$version" >> $GITHUB_ENV
working-directory: ${{ github.workspace }}

- name: Set up Rust tool-chain (stable)
- name: Set up Rust tool-chain (Linux, Windows) stable
if: (runner.os == 'Linux') || (runner.os == 'Windows')
uses: actions-rust-lang/[email protected]
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy

# Work around as actions-rust-lang does not seem to work on macOS yet
- name: Set up Rust tool-chain (macOS) stable
if: runner.os == 'macOS'
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
override: true
components: rustfmt, clippy

- name: Set up Python environment
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
arch: [x64]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
arch: [x64]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
shell: bash
Expand Down Expand Up @@ -244,8 +244,8 @@ jobs:
fail-fast: false
matrix:
arch: [x64]
os: [ubuntu-20.04, ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11"]
os: [ubuntu-20.04, ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*.xml
*.key
*.key_secret
*.sqlite
*.env

.benchmarks*
.coverage*
Expand Down Expand Up @@ -57,3 +59,4 @@ tests/test_data/catalog/
bench_data/

!tests/integration_tests/adapters/betfair/responses/*.log
**/test_db.sqlite
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ repos:
types: [python]

- repo: https://github.com/psf/black
rev: 23.10.1
rev: 23.11.0
hooks:
- id: black
types_or: [python, pyi]
Expand All @@ -82,7 +82,7 @@ repos:
exclude: "docs/_pygments/monokai.py"

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

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
rev: v1.7.1
hooks:
- id: mypy
args: [
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ format:
pre-commit:
pre-commit run --all-files

.PHONY: pre-flight
pre-flight: format pre-commit cargo-test build-debug pytest

.PHONY: ruff
ruff:
ruff check . --fix
Expand Down Expand Up @@ -132,3 +129,12 @@ pytest-coverage:
.PHONY: test-examples
test-examples:
bash scripts/test-examples.sh

.PHONY: init-db
init-db:
(cd nautilus_core && cargo run --bin init-db)

.PHONY: drop-db
drop-db:
(cd nautilus_core && cargo run --bin drop-db)

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

| Platform | Rust | Python |
| :----------------- | :------ | :----- |
| `Linux (x86_64)` | 1.73.0+ | 3.10+ |
| `macOS (x86_64)` | 1.73.0+ | 3.10+ |
| `macOS (arm64)` | 1.73.0+ | 3.10+ |
| `Windows (x86_64)` | 1.73.0+ | 3.10+ |
| `Linux (x86_64)` | 1.74.0+ | 3.10+ |
| `macOS (x86_64)` | 1.74.0+ | 3.10+ |
| `macOS (arm64)` | 1.74.0+ | 3.10+ |
| `Windows (x86_64)` | 1.74.0+ | 3.10+ |

- **Website:** https://nautilustrader.io
- **Docs:** https://docs.nautilustrader.io
Expand Down Expand Up @@ -136,7 +136,7 @@ This project makes the [Soundness Pledge](https://raphlinus.github.io/rust/2020/
## Integrations

NautilusTrader is designed in a modular way to work with 'adapters' which provide
connectivity to data publishers and/or trading venues - converting their raw API
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 |
Expand Down
48 changes: 43 additions & 5 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
# NautilusTrader 1.181.0 Beta

Released on 2nd December (UTC).

This release adds support for Python 3.12.

### Enhancements
- Rewrote Interactive Brokers integration documentation, many thanks @benjaminsingleton
- Added Interactive Brokers adapter support for crypto instruments with cash quantity, thanks @benjaminsingleton
- Added `HistoricInteractiveBrokerClient`, thanks @benjaminsingleton and @limx0
- Added `DataEngineConfig.time_bars_interval_type` (determines the type of interval used for time aggregation `left-open` or `right-open`)
- Added `LoggingConfig.log_colors` to optionally use ANSI codes to produce colored logs (default true to retain current behavior)
- Added `QuoteTickDataWrangler.process_bar_data` options for `offset_interval_ms` and `timestamp_is_close`
- Added identifier generators in Rust, thanks @filipmacek
- Added `OrderFactory` in Rust, thanks @filipmacek
- Added `WilderMovingAverage` in Rust, thanks @ayush-sb
- Added `HullMovingAverage` in Rust, thanks @ayush-sb
- Added all common identifier generators in Rust, thanks @filipmacek
- Added generic SQL database support with `sqlx` in Rust, thanks @filipmacek

### Breaking Changes
- Consolidated all `data` submodules into one `data` module (reduce binary wheel size)
- Moved `OrderBook` from `model.orderbook.book` to `model.book` (subpackage only had this single module)
- Moved `Currency` from `model.currency` to `model.objects` (consolidating modules to reduce binary wheel size)
- Moved `MessageBus` from `common.msgbus` to `common.component` (consolidating modules to reduce binary wheel size)
- Moved `MsgSpecSerializer` from `serialization.msgpack.serializer` to `serialization.serializer`
- Moved `CacheConfig` `snapshot_orders`, `snapshot_positions`, `snapshot_positions_interval` to `NautilusKernelConfig` (logical applicability)
- Renamed `MsgPackSerializer` to `MsgSpecSeralizer` (now handles both JSON and MsgPack formats)

### Fixes
- Fixed missing `trader_id` in `Position` dictionary representation, thanks @filipmacek
- Fixed conversion of fixed precision integers to floats (should be dividing to avoid rounding errors), thanks for reporting @filipmacek
- Fixed daily timestamp parsing for Interactive Brokers, thanks @benjaminsingleton
- Fixed live reconciliation trade processing for partially filled then canceled orders
- Fixed `RiskEngine` cumulative notional risk check for `CurrencyPair` SELL orders on multi-currency cash accounts

---

# NautilusTrader 1.180.0 Beta

Released on 3rd November 2023 (UTC).
Expand All @@ -7,7 +45,7 @@ Released on 3rd November 2023 (UTC).
- Improved `RedisCacheDatabase` client connection error handling with retries
- Added `WebSocketClient` connection headers, thanks @ruthvik125 and @twitu
- Added `support_contingent_orders` option for venues (to simulate venues which do not support contingent orders)
- Added `StrategyConfig.manage_contingent_orders` option (to automatically manage **open** contingenct orders)
- Added `StrategyConfig.manage_contingent_orders` option (to automatically manage **open** contingent orders)
- Added `FuturesContract.activation_utc` property which returns a `pd.Timestamp` tz-aware (UTC)
- Added `OptionsContract.activation_utc` property which returns a `pd.Timestamp` tz-aware (UTC)
- Added `CryptoFuture.activation_utc` property which returns a `pd.Timestamp` tz-aware (UTC)
Expand All @@ -19,9 +57,9 @@ Released on 3rd November 2023 (UTC).
- Renamed `FuturesContract.expiry_date` to `expiration_ns` (and associated params) as `uint64_t` UNIX nanoseconds
- Renamed `OptionsContract.expiry_date` to `expiration_ns` (and associated params) as `uint64_t` UNIX nanoseconds
- Renamed `CryptoFuture.expiry_date` to `expiration_ns` (and associated params) as `uint64_t` UNIX nanoseconds
- Changed `FuturesContract` arrow schema
- Changed `OptionsContract` arrow schema
- Changed `CryptoFuture` arrow schema
- Changed `FuturesContract` Arrow schema
- Changed `OptionsContract` Arrow schema
- Changed `CryptoFuture` Arrow schema
- Transformed orders will now retain the original `ts_init` timestamp
- Removed unimplemented `batch_more` option for `Strategy.modify_order`
- Removed `InstrumentProvider.venue` property (redundant as a provider may have many venues)
Expand Down Expand Up @@ -275,7 +313,7 @@ Released on 19th May 2023 (UTC).
- Fixed `MatchingEngine` processing of reduce only for child contingent orders
- Fixed `MatchingEngine` position ID assignment for child contingent orders
- Fixed `Actor` handling of historical data from requests (will now call `on_historical_data` regardless of state), thanks for reporting @miller-moore
- Fixed pyarrow schema dictionary index keys being too narrow (int8 -> int16), thanks for reporting @rterbush
- Fixed `pyarrow` schema dictionary index keys being too narrow (int8 -> int16), thanks for reporting @rterbush

---

Expand Down
7 changes: 6 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ def _build_extensions() -> list[Extension]:
"User32.Lib",
"UserEnv.Lib",
"WS2_32.Lib",
"Crypt32.lib",
"secur32.lib",
"schannel.lib",
"ncrypt.lib",
]

print("Creating C extension modules...")
Expand Down Expand Up @@ -312,7 +316,8 @@ def build() -> None:
# Copy the build back into the source tree for development and wheel packaging
_copy_build_dir_to_project(cmd)

if platform.system() in ("Linux", "Darwin"):
if BUILD_MODE == "release" and platform.system() in ("Linux", "Darwin"):
# Only strip symbols for release builds
_strip_unneeded_symbols()


Expand Down
5 changes: 2 additions & 3 deletions docs/api_reference/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@
:member-order: bysource
```

## Timer

## Message Bus
```{eval-rst}
.. automodule:: nautilus_trader.common.timer
.. automodule:: nautilus_trader.common.msgbus
:show-inheritance:
:inherited-members:
:members:
Expand Down
1 change: 0 additions & 1 deletion docs/api_reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
infrastructure.md
live.md
model/index.md
msgbus.md
persistence.md
portfolio.md
risk.md
Expand Down
5 changes: 5 additions & 0 deletions docs/api_reference/model/book.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Order Book

```{eval-rst}
.. automodule:: nautilus_trader.model.book
```
9 changes: 0 additions & 9 deletions docs/api_reference/model/currency.md

This file was deleted.

48 changes: 0 additions & 48 deletions docs/api_reference/model/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,3 @@
```{eval-rst}
.. automodule:: nautilus_trader.model.data
```

```{eval-rst}
.. automodule:: nautilus_trader.model.data.bar
:show-inheritance:
:inherited-members:
:members:
:member-order: bysource
```

```{eval-rst}
.. automodule:: nautilus_trader.model.data.book
:show-inheritance:
:inherited-members:
:members:
:member-order: bysource
```

```{eval-rst}
.. automodule:: nautilus_trader.model.data.status
:show-inheritance:
:inherited-members:
:members:
:member-order: bysource
```

```{eval-rst}
.. automodule:: nautilus_trader.model.data.tick
:show-inheritance:
:inherited-members:
:members:
:member-order: bysource
```

```{eval-rst}
.. automodule:: nautilus_trader.model.data.ticker
:show-inheritance:
:inherited-members:
:members:
:member-order: bysource
```

```{eval-rst}
.. automodule:: nautilus_trader.model.data.base
:show-inheritance:
:inherited-members:
:members:
:member-order: bysource
```
3 changes: 1 addition & 2 deletions docs/api_reference/model/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
:titlesonly:
:hidden:
currency.md
book.md
data.md
events.md
identifiers.md
instruments.md
objects.md
orderbook.md
orders.md
position.md
tick_scheme.md
Expand Down
13 changes: 0 additions & 13 deletions docs/api_reference/model/orderbook.md

This file was deleted.

Loading

0 comments on commit 63c191b

Please sign in to comment.