Skip to content

Commit

Permalink
Release 1.193.0
Browse files Browse the repository at this point in the history
See release notes.
  • Loading branch information
cjdsellers authored May 24, 2024
2 parents 3db0827 + 52897d9 commit c059eb8
Show file tree
Hide file tree
Showing 86 changed files with 1,924 additions and 684 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Set up Rust tool-chain (Linux, Windows) stable
if: (runner.os == 'Linux') || (runner.os == 'Windows')
uses: actions-rust-lang/setup-rust-toolchain@v1.5
uses: actions-rust-lang/setup-rust-toolchain@v1.8
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
working-directory: ${{ github.workspace }}

- name: Set up Rust tool-chain (Linux, Windows) stable
uses: actions-rust-lang/setup-rust-toolchain@v1.5
uses: actions-rust-lang/setup-rust-toolchain@v1.8
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
working-directory: ${{ github.workspace }}

- name: Set up Rust tool-chain (Linux, Windows) stable
uses: actions-rust-lang/setup-rust-toolchain@v1.5
uses: actions-rust-lang/setup-rust-toolchain@v1.8
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy
Expand Down Expand Up @@ -234,8 +234,7 @@ jobs:
PARALLEL_BUILD: false

build-macos:
if: github.ref == 'refs/heads/master'
# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/nightly'
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/nightly'
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
working-directory: ${{ github.workspace }}

- name: Set up Rust tool-chain (Linux, Windows) stable
uses: actions-rust-lang/setup-rust-toolchain@v1.5
uses: actions-rust-lang/setup-rust-toolchain@v1.8
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ jobs:

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

- name: Set up Rust tool-chain (nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1.5
uses: actions-rust-lang/setup-rust-toolchain@v1.8
with:
toolchain: nightly
components: rustfmt, clippy
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Set up Rust tool-chain (Linux, Windows) stable
if: (runner.os == 'Linux') || (runner.os == 'Windows')
uses: actions-rust-lang/setup-rust-toolchain@v1.5
uses: actions-rust-lang/setup-rust-toolchain@v1.8
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
working-directory: ${{ github.workspace }}

- name: Set up Rust tool-chain
uses: actions-rust-lang/setup-rust-toolchain@v1.5
uses: actions-rust-lang/setup-rust-toolchain@v1.8
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
working-directory: ${{ github.workspace }}

- name: Set up Rust tool-chain
uses: actions-rust-lang/setup-rust-toolchain@v1.5
uses: actions-rust-lang/setup-rust-toolchain@v1.8
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy
Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:

- name: Set up Rust tool-chain (Linux, Windows) stable
if: (runner.os == 'Linux') || (runner.os == 'Windows')
uses: actions-rust-lang/setup-rust-toolchain@v1.5
uses: actions-rust-lang/setup-rust-toolchain@v1.8
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy
Expand Down
2 changes: 1 addition & 1 deletion .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.4.4
rev: v0.4.5
hooks:
- id: ruff
args: ["--fix"]
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
| Platform | Rust | Python |
| :----------------- | :------ | :----- |
| `Linux (x86_64)` | 1.78.0+ | 3.10+ |
| `macOS (x86_64)` | 1.78.0+ | 3.10+ |
| `macOS (arm64)` | 1.78.0+ | 3.10+ |
| `Windows (x86_64)` | 1.78.0+ | 3.10+ |

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

Released on 24th May 2024 (UTC).

### Enhancements
- Added Interactive Brokers support for Market-on-Close (MOC) and Limit-on-Close (LOC) order types (#1663), thanks @rsmb7z
- Added Bybit sandbox example (#1659), thanks @davidsblom
- Added Binance sandbox example

### Breaking Changes
- Overhauled `SandboxExecutionClientConfig` to more closely match `BacktestVenueConfig` (many changes and additions)

### Fixes
- Fixed DataFusion backend data ordering by `ts_init` when streaming (#1656), thanks @twitu
- Fixed Interactive Brokers tick level historical data downloading (#1653), thanks @DracheShiki

---

# NautilusTrader 1.192.0 Beta

Released on 18th May 2024 (UTC).
Expand Down
37 changes: 19 additions & 18 deletions docs/tutorials/backtest_low_level.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ from nautilus_trader.examples.strategies.ema_cross_twap import EMACrossTWAP
from nautilus_trader.examples.strategies.ema_cross_twap import EMACrossTWAPConfig
from nautilus_trader.model.currencies import ETH
from nautilus_trader.model.currencies import USDT
from nautilus_trader.model.data import BarType
from nautilus_trader.model.enums import AccountType
from nautilus_trader.model.enums import OmsType
from nautilus_trader.model.identifiers import TraderId
Expand Down Expand Up @@ -82,24 +83,6 @@ engine = BacktestEngine(config=config)

See the [Configuration](../api_reference/config.md) API reference for details of all configuration options available.

## Adding data

Now we can add data to the backtest engine. First add the `Instrument` object we previously initialized, which matches our data.

Then we can add the trade ticks we wrangled earlier:
```python
# Add instrument(s)
engine.add_instrument(ETHUSDT_BINANCE)

# Add data
engine.add_data(ticks)

```

```{note}
The amount of and variety of data types is only limited by machine resources and your imagination (custom types are possible).
```

## Adding venues

We'll need a venue to trade on, which should match the *market* data being added to the engine.
Expand All @@ -119,6 +102,24 @@ engine.add_venue(

```

## Adding data

Now we can add data to the backtest engine. First add the `Instrument` object we previously initialized, which matches our data.

Then we can add the trade ticks we wrangled earlier:
```python
# Add instrument(s)
engine.add_instrument(ETHUSDT_BINANCE)

# Add data
engine.add_data(ticks)

```

```{note}
The amount of and variety of data types is only limited by machine resources and your imagination (custom types are possible).
```

```{note}
Multiple venues can be used for backtesting, only limited by machine resources.
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# limitations under the License.
# -------------------------------------------------------------------------------------------------


# fmt: off

from nautilus_trader.adapters.interactive_brokers.common import IB_VENUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ async def main(instrument_config: BetfairInstrumentProviderConfig) -> TradingNod
instruments = provider.list_all()
print(f"Found instruments:\n{[ins.id for ins in instruments]}")

# Need to manually set instruments for sandbox exec client
SandboxExecutionClient.INSTRUMENTS = instruments

# Load account currency
account_currency = await provider.get_account_currency()

Expand All @@ -71,8 +74,8 @@ async def main(instrument_config: BetfairInstrumentProviderConfig) -> TradingNod
exec_clients={
"SANDBOX": SandboxExecutionClientConfig(
venue="BETFAIR",
currency="AUD",
balance=10_000,
base_currency="AUD",
starting_balances=["10_000 AUD"],
),
},
)
Expand All @@ -91,9 +94,6 @@ async def main(instrument_config: BetfairInstrumentProviderConfig) -> TradingNod
node = TradingNode(config=config)
node.trader.add_strategies(strategies)

# Need to manually set instruments for sandbox exec client
SandboxExecutionClient.INSTRUMENTS = instruments

# Register your client factories with the node (can take user defined factories)
node.add_data_client_factory("BETFAIR", BetfairLiveDataClientFactory)
node.add_exec_client_factory("SANDBOX", SandboxLiveExecClientFactory)
Expand Down
Loading

0 comments on commit c059eb8

Please sign in to comment.