Skip to content

Commit

Permalink
Release 1.166.0
Browse files Browse the repository at this point in the history
See release notes.
  • Loading branch information
cjdsellers authored Jan 17, 2023
2 parents d54c97a + f8a431b commit c58a678
Show file tree
Hide file tree
Showing 120 changed files with 1,861 additions and 1,358 deletions.
4 changes: 2 additions & 2 deletions .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.3.0 \
POETRY_VERSION=1.3.2 \
POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_NO_INTERACTION=1 \
Expand All @@ -16,7 +16,7 @@ WORKDIR $PYSETUP_PATH
FROM base as builder

# Install build deps
RUN apt-get update && apt-get install -y clang curl
RUN apt-get update && apt-get install -y curl clang

# Install Rust stable
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ name: build
on:
push:
branches: [master, develop]
pull_request:
branches: [develop]

jobs:
build:
Expand Down
125 changes: 0 additions & 125 deletions .github/workflows/build_pr.yml

This file was deleted.

21 changes: 21 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# NautilusTrader 1.166.0 Beta

Released on 17th January 2023 (UTC).

### Breaking Changes
- `Position.unrealized_pnl` now `None` until any realized PnL is generated (to reduce ambiguity)

### Enhancements
- Added instrument status update subscription handlers, thanks @limx0
- Improvements to InteractiveBrokers `DataClient`, thanks @rsmb7z
- Improvements to async task handling for live clients
- Various improvements to Betfair adapter, thanks @limx0

### Fixes
- Fixed netted `Position` `realized_pnl` and `realized_return` fields, which were incorrectly cumulative
- Fixed netted `Position` flip logic (now correctly 'resets' position)
- Various fixes for Betfair adapter, thanks @limx0
- InteractiveBrokers integration docs fixes

---

# NautilusTrader 1.165.0 Beta

Released on 14th January 2023 (UTC).
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"latest": "", "development": "develop"}
{"latest": "", "develop": "develop"}
10 changes: 0 additions & 10 deletions docs/api_reference/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
.. automodule:: nautilus_trader.core
```

## Collections

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

## Datetime

```{eval-rst}
Expand Down
9 changes: 3 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import os
import sys

import nautilus_trader


sys.path.insert(0, os.path.abspath(".."))
sys.path.append(os.path.abspath("./_pygments"))
Expand All @@ -22,8 +24,7 @@
project = "NautilusTrader"
author = "Nautech Systems Pty Ltd."
copyright = "2015-2023 Nautech Systems Pty Ltd"
version = "latest"
release = "version"
version = nautilus_trader.__version__

# -- General configuration ---------------------------------------------------
extensions = [
Expand Down Expand Up @@ -111,10 +112,6 @@
],
"version_dropdown": True,
"version_json": "_static/version.json",
"version_info": {
"1.165.0 (develop)": "https://docs.nautilustrader.io/develop",
"1.164.0 (latest)": "https://docs.nautilustrader.io",
},
"table_classes": ["plain"],
}

Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ format (Parquet) for this guide.
For more details on how to load data into Nautilus, see [Backtest Example](../user_guide/backtest_example.md).

## Running in docker
~~A self-contained dockerized jupyter notebook server is available for download, which does not require any setup or
A self-contained dockerized jupyter notebook server is available for download, which does not require any setup or
installation. This is the fastest way to get up and running to try out Nautilus. Bear in mind that any data will be
deleted when the container is deleted.

Expand All @@ -18,7 +18,7 @@ deleted when the container is deleted.
- Run the docker container, exposing the jupyter port (recommended 8889 in case another jupyter server is running):
- `docker run -p 8889:8888 ghcr.io/nautechsystems/jupyterlab:develop`
- Open your web browser to `localhost:{port}`
- https://localhost:8889~~
- https://localhost:8889

**NautilusTrader is not currently functional when run under JupyterLab, with logging enabled.
The backtest example in the `examples/backtest_example.ipynb` hangs indefinitely shortly after starting.
Expand Down
46 changes: 23 additions & 23 deletions docs/integrations/ib.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ NautilusTrader offers an adapter for integrating with the Interactive Brokers Ga
[ib_insync](https://github.com/erdewit/ib_insync).

**Note**: If you are planning on using the built-in docker TWS Gateway when using the Interactive Brokers adapter,
you must manually install `docker` (due to current build issues). Run a manual `pip install docker` inside your
environment to ensure the Gateway can be run.
you must ensure the `docker` package is installed. Run `poetry install --extras "ib docker"`
or `poetry install --all-extras` inside your environment to ensure the necessary packages are installed.

## Overview

Expand All @@ -18,7 +18,7 @@ The following integration classes are available:
Interactive Brokers allows searching for instruments via the `qualifyContracts` API, which, if given enough information
can usually resolve a filter into an actual contract(s). A node can request instruments to be loaded by passing
configuration to the `InstrumentProviderConfig` when initialising a `TradingNodeConfig` (note that while `filters`
is a dict, it must be converted to a tuple when passed to `InstrumentProviderConfig`),
is a dict, it must be converted to a tuple when passed to `InstrumentProviderConfig`).

At a minimum, you must specify the `secType` (security type) and `symbol` (equities etc) or `pair` (FX). See examples
queries below for common use cases
Expand All @@ -30,10 +30,11 @@ config_node = TradingNodeConfig(
data_clients={
"IB": InteractiveBrokersDataClientConfig(
instrument_provider=InstrumentProviderConfig(
load_all=True,
filters=tuple({"secType": "CASH", "symbol": "EUR", "currecy": "USD"}.items())
)
load_all=True,
filters=tuple({"secType": "CASH", "symbol": "EUR", "currency": "USD"}.items())
)
),
...
)
```

Expand All @@ -50,25 +51,26 @@ config_node = TradingNodeConfig(

## Configuration
The most common use case is to configure a live `TradingNode` to include Interactive Brokers
data and execution clients. To achieve this, add a `IB` section to your client
configuration(s) and _set the name of the environment variables_ containing your TWS
(Traders Workstation) credentials:
data and execution clients. To achieve this, add an `IB` section to your client
configuration(s) and set the environment variables to your TWS (Traders Workstation) credentials:

```python
import os

config = TradingNodeConfig(
..., # Omitted
data_clients={
"IB": {
"username": "TWS_USERNAME",
"password": "TWS_PASSWORD",
},
"IB": InteractiveBrokersDataClientConfig(
username=os.getenv("TWS_USERNAME"),
password=os.getenv("TWS_PASSWORD"),
... # Omitted
},
exec_clients = {
"IB": InteractiveBrokersExecutionClientConfig(
username=os.getenv("TWS_USERNAME"),
password=os.getenv("TWS_PASSWORD"),
... # Omitted
},
exec_clients={
"IB": {
"username": "TWS_USERNAME",
"password": "TWS_PASSWORD",
},
}
... # Omitted
)
```

Expand All @@ -87,13 +89,11 @@ node.build()
```

### API credentials
There are two options for supplying your credentials to the Betfair clients.
There are two options for supplying your credentials to the Interactive Brokers clients.
Either pass the corresponding `username` and `password` values to the config dictionaries, or
set the following environment variables:
- `TWS_USERNAME`
- `TWS_PASSWORD`

When starting the trading node, you'll receive immediate confirmation of whether your
credentials are valid and have trading permissions.


4 changes: 3 additions & 1 deletion docs/user_guide/adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
The NautilusTrader design allows for integrating data publishers and/or trading venues
through adapter implementations, these can be found in the top level `adapters` subpackage.

A full integration adapter is typically comprised of the following main components:
An integrations adapter is _typically_ comprised of the following main components:

- `HttpClient`
- `WebSocketClient`
- `InstrumentProvider`
- `DataClient`
- `ExecutionClient`
Expand Down
Loading

0 comments on commit c58a678

Please sign in to comment.