Skip to content

Commit

Permalink
Release 1.148.0
Browse files Browse the repository at this point in the history
See release notes.
  • Loading branch information
cjdsellers authored Jun 30, 2022
2 parents 2394a81 + 3e94714 commit dc493c5
Show file tree
Hide file tree
Showing 150 changed files with 5,113 additions and 1,227 deletions.
49 changes: 27 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@

NautilusTrader is an open-source, high-performance, production-grade algorithmic trading platform,
providing quantitative traders with the ability to backtest portfolios of automated trading strategies
on historical data with an event-driven engine, and also deploy those same strategies live.
on historical data with an event-driven engine, and also deploy those same strategies live, with no code changes.

The platform is 'AI-first', designed to deploy models for algorithmic trading strategies developed
using the Python ecosystem - within a highly performant and robust Python native environment.
This helps to address the challenge of keeping the research/backtest environment consistent with the production
live trading environment.
The platform is 'AI-first', designed to develop and deploy algorithmic trading strategies within a highly performant
and robust Python native environment. This helps to address the parity challenge of keeping the Python research/backtest
environment, consistent with the production live trading environment.

NautilusTraders design, architecture and implementation philosophy holds software correctness and safety at the
highest level, with the aim of supporting Python native, mission-critical, trading system backtesting
Expand All @@ -48,15 +47,16 @@ including FX, Equities, Futures, Options, CFDs, Crypto and Betting - across mult

## Features

- **Fast:** C-level speed through Rust and Cython. Asynchronous networking with [uvloop](https://github.com/MagicStack/uvloop)
- **Reliable:** Type safety through Rust and Cython. Redis backed performant state persistence
- **Flexible:** OS independent, runs on Linux, macOS, Windows. Deploy using Docker
- **Integrated:** Modular adapters mean any REST, WebSocket, or FIX API can be integrated
- **Advanced:** Time in force `IOC`, `FOK`, `GTD`, `AT_THE_OPEN`, `AT_THE_CLOSE`, advanced order types and conditional triggers. Execution instructions `post-only`, `reduce-only`, and icebergs. Contingency order lists including `OCO`, `OTO`
- **Backtesting:** Run with multiple venues, instruments and strategies simultaneously using historical quote tick, trade tick, bar, order book and custom data with nanosecond resolution
- **Live:** Use identical strategy implementations between backtesting and live deployments
- **Multi-venue:** Multiple venue capabilities facilitate market making and statistical arbitrage strategies
- **AI Agent Training:** Backtest engine fast enough to be used to train AI trading agents (RL/ES)
- **Fast** - C-level speed through Rust and Cython. Asynchronous networking with [uvloop](https://github.com/MagicStack/uvloop)
- **Reliable** - Type safety through Rust and Cython. Redis backed performant state persistence
- **Portable** - OS independent, runs on Linux, macOS, Windows. Deploy using Docker
- **Flexible** - Modular adapters mean any REST, WebSocket, or FIX API can be integrated
- **Advanced** - Time in force `IOC`, `FOK`, `GTD`, `AT_THE_OPEN`, `AT_THE_CLOSE`, advanced order types and conditional triggers. Execution instructions `post-only`, `reduce-only`, and icebergs. Contingency order lists including `OCO`, `OTO`
- **Customizable** - Add user defined custom components, or assemble entire systems from scratch leveraging the cache and message bus
- **Backtesting** - Run with multiple venues, instruments and strategies simultaneously using historical quote tick, trade tick, bar, order book and custom data with nanosecond resolution
- **Live** - Use identical strategy implementations between backtesting and live deployments
- **Multi-venue** - Multiple venue capabilities facilitate market making and statistical arbitrage strategies
- **AI Agent Training** - Backtest engine fast enough to be used to train AI trading agents (RL/ES)

![Alt text](https://github.com/nautechsystems/nautilus_trader/blob/develop/docs/_images/nautilus-art.png?raw=true "nautilus")
> *nautilus - from ancient Greek 'sailor' and naus 'ship'.*
Expand All @@ -66,15 +66,20 @@ including FX, Equities, Futures, Options, CFDs, Crypto and Betting - across mult
## Why NautilusTrader?

Traditionally, trading strategy research and backtesting might be conducted in Python (or other suitable language), with
the models and/or strategies then needing to be reimplemented in C, C++, C#, Java or other statically
typed language(s). The reasoning here is to utilize the performance and type safety a compiled language can offer,
which has historically made these languages more suitable for large trading systems.
- **Highly performant event-driven Python** - native binary core components
- **Parity between backtesting and live trading** - identical strategy code
- **Reduced operational risk** - risk management functionality, logical correctness and type safety
- **Highly extendable** - message bus, custom components and actors, custom data, custom adapters

The value of NautilusTrader here is that this reimplementation step is circumvented - as the critical core components of the platform
have all been written entirely in Cython. Because Cython can generate efficient C code (which then compiles to C extension modules as native binaries),
Python can effectively be used as a high-performance systems programming language - with the benefit being that a Python native environment can be offered which is suitable for
professional quantitative traders and trading firms.
Traditionally, trading strategy research and backtesting might be conducted in Python (or other suitable language)
using vectorized methods, with the strategy then needing to be reimplemented in a more event-drive way
using C++, C#, Java or other statically typed language(s). The reasoning here is that vectorized backtesting code cannot
express the granular time and event dependent complexity of real-time trading, where compiled languages have
proven to be more suitable due to their inherently higher performance, and type safety.

One of the key advantages of NautilusTrader here, is that this reimplementation step is now circumvented - as the critical core components of the platform
have all been written entirely in Rust or Cython. This means we're using the right tools for the job, where systems programming languages compile performant binaries,
with CPython C extension modules then able to offer a Python native environment, suitable for professional quantitative traders and trading firms.

## Why Python?

Expand Down
28 changes: 26 additions & 2 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# NautilusTrader 1.148.0 Beta

Released on 30th June 2022 (UTC).

### Breaking Changes
None

### Enhancements
- Ported core bar objects to Rust thanks @ghill2
- Improved core `unix_nanos_to_iso8601` performance by 30% thanks @ghill2
- Added `DataCatalog` interface for `ParquetDataCatalog` thanks @jordanparker6
- Added `AroonOscillator` indicator thanks @graceyangfan
- Added `ArcherMovingAveragesTrends` indicator thanks @graceyangfan
- Added `DoubleExponentialMovingAverage` indicator thanks @graceyangfan
- Added `WilderMovingAverage` indicator thanks @graceyangfan
- Added `ChandeMomentumOscillator` indicator thanks @graceyangfan
- Added `VerticalHorizontalFilter` indicator thanks @graceyangfan
- Added `Bias` indicator thanks @graceyangfan

### Fixes
None

---

# NautilusTrader 1.147.1 Beta

Released on 6th June 2022.
Expand All @@ -16,7 +40,7 @@ None

# NautilusTrader 1.147.0 Beta

Released on 4th June 2022.
Released on 4th June 2022 (UTC).

### Breaking Changes
None
Expand Down Expand Up @@ -551,7 +575,7 @@ Released on 12th September 2021.
- Added `ContingencyType` enum (for contingency orders in an `OrderList`)
- All order types can now be `reduce_only` (#437)
- Refined backtest configuration options
- Improved efficiency of `UUID4` using the `fastuuid` Rust bindings
- Improved efficiency of `UUID4` using the Rust `fastuuid` Python bindings

### Fixes
- Fixed Redis loss of precision for `int64_t` nanosecond timestamps (#363)
Expand Down
3 changes: 1 addition & 2 deletions docs/_templates/hero.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<div class="md-hero{% if nav_bar_tabs %} md-hero--expand{% endif %}" data-md-component="hero">
<div class="md-hero__inner md-grid">
<p> Documentation </p>
</div>
</div>
</div>
9 changes: 0 additions & 9 deletions docs/api_reference/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,3 @@
:member-order: bysource
```

## UUID

```{eval-rst}
.. automodule:: nautilus_trader.common.uuid
:show-inheritance:
:inherited-members:
:members:
:member-order: bysource
```
53 changes: 0 additions & 53 deletions docs/api_reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,59 +11,6 @@ a future time we may separate the documentation between the `develop` branch, an
more stable releases on `master`.
```

## Type Safety
The design of the platform holds software correctness and safety at the highest level.
Given most of the core production code is written in Cython, type safety is often provided
at the C level.

```{note}
If a function or methods parameter is not explicitly typed as allowing
``None``, then you can assume you will receive a `ValueError` when passing ``None``
as an argument (this is not explicitly documented).
```

## Framework Organization
The codebase is organized around both layering of abstraction levels, and generally
grouped into logical subpackages of cohesive concepts. You can navigate to the documentation
for each of these subpackages from the left menu.

### Core / Low-Level
- `core`: constants, functions and low-level components used throughout the framework
- `common`: common parts for assembling the frameworks various components
- `network`: low-level base components for networking clients
- `serialization`: serialization base components and serializer implementations
- `model`: defines a rich trading domain model

### System Components
- `accounting`: different account types and account management machinery
- `adapters`: integration adapters for the platform including brokers and exchanges
- `analysis`: components relating to trading performance statistics and analysis
- `cache`: provides common caching infrastructure
- `data`: the data stack and data tooling for the platform
- `execution`: the execution stack for the platform
- `indicators`: a set of efficient indicators and analyzers
- `infrastructure`: technology specific infrastructure implementations
- `msgbus`: a universal message bus for connecting system components
- `persistence`: data storage, cataloging and retrieval, mainly to support backtesting
- `portfolio`: portfolio management functionality
- `risk`: risk specific components and tooling
- `trading`: trading domain specific components and tooling

### System Implementations
- `backtest`: backtesting componentry as well as a backtest engine implementation
- `live`: live engine and client implementations as well as a node for live trading
- `system`: the core system kernel common between backtest, sandbox and live contexts

## Errors and Exceptions
Every attempt has been made to accurately document the possible exceptions which
can be raised from NautilusTrader code, and the conditions which will trigger them.

```{warning}
There may be other undocumented exceptions which can be raised by Pythons standard
library, or from third party library dependencies.
```


```{eval-rst}
.. toctree::
:maxdepth: 1
Expand Down
12 changes: 2 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,11 @@
"title": "nautilustrader.io ⬀",
},
],
"heroes": {
"index": "Documentation",
"getting_started/index": "Documentation",
"user_guide/index": "Documentation",
"api_reference/index": "Documentation",
"integrations/index": "Documentation",
"developer_guide/index": "Documentation",
},
"version_dropdown": True,
"version_json": "_static/version.json",
"version_info": {
"Latest (1.146.0)": "https://docs.nautilustrader.io",
"Develop (1.147.0)": "https://docs.nautilustrader.io/develop",
"1.148.0 (develop)": "https://docs.nautilustrader.io",
"1.148.0 (latest)": "https://docs.nautilustrader.io/latest",
},
"table_classes": ["plain"],
}
Expand Down
2 changes: 1 addition & 1 deletion docs/developer_guide/cython.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ More information on Cython syntax and conventions can be found by reading the [C
## Function and method signatures
Ensure that all functions and methods returning `void` or a primitive C type (such as `bint`, `int`, `double`) include the `except *` keyword in the signature.

This will ensure Python exceptions are not ignored, but instead are “bubbled up” to the caller as expected.
This will ensure Python exceptions are not ignored, and instead are “bubbled up” to the caller as expected.

## Debugging

Expand Down
1 change: 0 additions & 1 deletion docs/developer_guide/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Cython. This approach is to aid a smooth transition to greater amounts
of Rust in the codebase, and reducing amounts of Cython (which will eventually be eliminated).
We want to avoid a need for Rust to call Python using the FFI. In the future [PyO3](https://github.com/PyO3/PyO3) will be used.


## Unsafe Rust
It will be necessary to write `unsafe` Rust code to be able to achieve the value
of interoperating between Python and Rust. The ability to step outside the boundaries of safe Rust is what makes it possible to
Expand Down
2 changes: 1 addition & 1 deletion docs/developer_guide/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The test suite is divided into broad categories of tests including:
- Acceptance tests
- Performance tests

The performance tests are not run as part of the CI pipeline, but exist to aid development of performance-critical components.
The performance tests exist to aid development of performance-critical components.

Tests can be run using either [Pytest](https://docs.pytest.org) or the [Nox](https://nox.thea.codes/en/stable/) tool.

Expand Down
10 changes: 5 additions & 5 deletions docs/getting_started/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ deleted when the container is deleted.
To save time, we have prepared a script to load sample data into the Nautilus format for use with this example.
First, download and load the data by running the next cell (this should take ~ 1-2 mins):

```python
```bash
!curl https://raw.githubusercontent.com/nautechsystems/nautilus_data/main/scripts/hist_data_to_catalog.py | python -
```

## Connecting to the DataCatalog
## Connecting to the ParquetDataCatalog

If everything worked correctly, you should be able to see a single EUR/USD instrument in the catalog:

```python
from nautilus_trader.persistence.catalog import DataCatalog
from nautilus_trader.persistence.catalog import ParquetDataCatalog

catalog = DataCatalog("./")
catalog = ParquetDataCatalog("./")
catalog.instruments()
```

Expand Down Expand Up @@ -173,7 +173,7 @@ venue = BacktestVenueConfig(

## Instruments

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

```python
instruments = catalog.instruments(as_nautilus=True)
Expand Down
Loading

0 comments on commit dc493c5

Please sign in to comment.