Skip to content

Commit

Permalink
Release 1.168.0
Browse files Browse the repository at this point in the history
See release notes.
  • Loading branch information
cjdsellers authored Jan 29, 2023
2 parents f95e3c7 + e220b79 commit 5ce9605
Show file tree
Hide file tree
Showing 49 changed files with 1,188 additions and 782 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,16 @@ jobs:
# Run tests (Linux)
- name: Run tests (Linux)
if: runner.os == 'Linux'
run: make pytest
run: |
make pytest
make test-examples
# Run tests (macOS)
- name: Run tests (macOS)
if: runner.os == 'macOS'
run: make pytest
run: |
make pytest
make test-examples
# Run tests (Windows) without parallel build (avoids linker errors)
- name: Run tests (Windows)
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ repos:
types: [python]

- repo: https://github.com/pycqa/isort
rev: 5.11.4
rev: 5.12.0
hooks:
- id: isort
types_or: [python, cython]
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ pytest:

pytest-coverage:
bash scripts/test-coverage.sh

test-examples:
bash scripts/test-examples.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ eliminating many classes of bugs at compile-time.
The project increasingly utilizes Rust for core performance-critical components. Python language binding is handled through
Cython, with static libraries linked at compile-time before the wheel binaries are packaged, so a user
does not need to have Rust installed to run NautilusTrader. In the future as more Rust code is introduced,
[PyO3](https://pyo3.rs/v0.15.1/) will be leveraged for easier Python bindings.
[PyO3](https://pyo3.rs/latest/) will be leveraged for easier Python bindings.

## Architecture (data flow)

Expand Down
26 changes: 23 additions & 3 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
# NautilusTrader 1.168.0 Beta

Released on 29th January 2023 (UTC).

### Breaking Changes
- Removed `Cache.clear_cache()` (redundant with the `.reset()` method)

### Enhancements
- Added `Cache` `.add(...)` and `.get(...)` for general 'user/custom' objects (as bytes)
- Added `CacheDatabase` `.add(...)` and `.load()` for general cache objects (as bytes)
- Added `RedisCacheDatabase` `.add(...) `and `.load()` for general Redis persisted bytes objects (as bytes)
- Added `Cache.actor_ids()`
- Added `Actor` cached state saving and loading functionality
- Improved logging for called action handlers when not overridden

### Fixes
- Fixed configuration of loading and saving actor and strategy state

---

# NautilusTrader 1.167.0 Beta

Released on 28th January 2023 (UTC).

### Breaking Changes
- Rename `OrderBookData.update_id` to `sequence`
- Rename `BookOrder.id` to `order_id`
- Renamed `OrderBookData.update_id` to `sequence`
- Renamed `BookOrder.id` to `order_id`

### Enhancements
- Introduce Rust pyo3 based `ParquetReader` and `ParquetWriter`, thanks @twitu
- Introduced Rust pyo3 based `ParquetReader` and `ParquetWriter`, thanks @twitu
- Added `msgbus.is_subscribed` (to check if topic and handler already subscribed)
- Simplified message type model and introduce CQRS-ish live messaging architecture

Expand Down
4 changes: 3 additions & 1 deletion examples/backtest/fx_ema_cross_audusd_bars_from_ticks.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from nautilus_trader.backtest.data.wranglers import QuoteTickDataWrangler
from nautilus_trader.backtest.engine import BacktestEngine
from nautilus_trader.backtest.engine import BacktestEngineConfig
from nautilus_trader.backtest.modules import FXRolloverInterestConfig
from nautilus_trader.backtest.modules import FXRolloverInterestModule
from nautilus_trader.examples.strategies.ema_cross import EMACross
from nautilus_trader.examples.strategies.ema_cross import EMACrossConfig
Expand All @@ -46,7 +47,8 @@
# the data is coming from packaged test data.
provider = TestDataProvider()
interest_rate_data = provider.read_csv("short-term-interest.csv")
fx_rollover_interest = FXRolloverInterestModule(rate_data=interest_rate_data)
config = FXRolloverInterestConfig(interest_rate_data)
fx_rollover_interest = FXRolloverInterestModule(config=config)

# Add a trading venue (multiple venues possible)
SIM = Venue("SIM")
Expand Down
4 changes: 3 additions & 1 deletion examples/backtest/fx_ema_cross_audusd_ticks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from nautilus_trader.backtest.engine import BacktestEngine
from nautilus_trader.backtest.engine import BacktestEngineConfig
from nautilus_trader.backtest.models import FillModel
from nautilus_trader.backtest.modules import FXRolloverInterestConfig
from nautilus_trader.backtest.modules import FXRolloverInterestModule
from nautilus_trader.examples.strategies.ema_cross import EMACross
from nautilus_trader.examples.strategies.ema_cross import EMACrossConfig
Expand Down Expand Up @@ -56,7 +57,8 @@
# the data is coming from packaged test data.
provider = TestDataProvider()
interest_rate_data = provider.read_csv("short-term-interest.csv")
fx_rollover_interest = FXRolloverInterestModule(rate_data=interest_rate_data)
config = FXRolloverInterestConfig(interest_rate_data)
fx_rollover_interest = FXRolloverInterestModule(config=config)

# Add a trading venue (multiple venues possible)
SIM = Venue("SIM")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from nautilus_trader.backtest.engine import BacktestEngine
from nautilus_trader.backtest.engine import BacktestEngineConfig
from nautilus_trader.backtest.models import FillModel
from nautilus_trader.backtest.modules import FXRolloverInterestConfig
from nautilus_trader.backtest.modules import FXRolloverInterestModule
from nautilus_trader.config.common import RiskEngineConfig
from nautilus_trader.examples.strategies.ema_cross_bracket import EMACrossBracket
Expand Down Expand Up @@ -53,7 +54,8 @@
# the data is coming from packaged test data.
provider = TestDataProvider()
interest_rate_data = provider.read_csv("short-term-interest.csv")
fx_rollover_interest = FXRolloverInterestModule(rate_data=interest_rate_data)
config = FXRolloverInterestConfig(interest_rate_data)
fx_rollover_interest = FXRolloverInterestModule(config=config)

# Create a fill model (optional)
fill_model = FillModel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from nautilus_trader.backtest.engine import BacktestEngine
from nautilus_trader.backtest.engine import BacktestEngineConfig
from nautilus_trader.backtest.models import FillModel
from nautilus_trader.backtest.modules import FXRolloverInterestConfig
from nautilus_trader.backtest.modules import FXRolloverInterestModule
from nautilus_trader.config.common import RiskEngineConfig
from nautilus_trader.examples.strategies.ema_cross_bracket import EMACrossBracket
Expand Down Expand Up @@ -52,7 +53,8 @@
# the data is coming from packaged test data.
provider = TestDataProvider()
interest_rate_data = provider.read_csv("short-term-interest.csv")
fx_rollover_interest = FXRolloverInterestModule(rate_data=interest_rate_data)
config = FXRolloverInterestConfig(interest_rate_data)
fx_rollover_interest = FXRolloverInterestModule(config=config)

# Create a fill model (optional)
fill_model = FillModel(
Expand Down
4 changes: 3 additions & 1 deletion examples/backtest/fx_market_maker_gbpusd_bars.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from nautilus_trader.backtest.engine import BacktestEngine
from nautilus_trader.backtest.engine import BacktestEngineConfig
from nautilus_trader.backtest.models import FillModel
from nautilus_trader.backtest.modules import FXRolloverInterestConfig
from nautilus_trader.backtest.modules import FXRolloverInterestModule
from nautilus_trader.examples.strategies.volatility_market_maker import VolatilityMarketMaker
from nautilus_trader.examples.strategies.volatility_market_maker import VolatilityMarketMakerConfig
Expand All @@ -48,7 +49,8 @@
# the data is coming from packaged test data.
provider = TestDataProvider()
interest_rate_data = provider.read_csv("short-term-interest.csv")
fx_rollover_interest = FXRolloverInterestModule(rate_data=interest_rate_data)
config = FXRolloverInterestConfig(interest_rate_data)
fx_rollover_interest = FXRolloverInterestModule(config=config)

# Create a fill model (optional)
fill_model = FillModel(
Expand Down
83 changes: 81 additions & 2 deletions nautilus_core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions nautilus_core/model/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ name = "nautilus_model"
crate-type = ["rlib", "staticlib"]

[dependencies]
derive_builder = "0.12.0"
nautilus_core = { path = "../core" }
pyo3.workspace = true
rust-fsm.workspace = true
strum.workspace = true
thiserror.workspace = true

[features]
extension-module = [
"pyo3/extension-module",
"nautilus_core/extension-module",
]
extension-module = ["pyo3/extension-module", "nautilus_core/extension-module"]
default = []

[dev-dependencies]
Expand Down
Loading

0 comments on commit 5ce9605

Please sign in to comment.