Skip to content

Commit

Permalink
Merge pull request #102 from nautechsystems/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
cjdsellers committed Oct 29, 2020
2 parents 313f78a + 4ff3f15 commit b9c6a09
Show file tree
Hide file tree
Showing 86 changed files with 817 additions and 568 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions docs/source/api/core.rst → docs/source/api_reference/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,6 @@ Message
:undoc-members:
:member-order: bysource

Types
-----

.. automodule:: nautilus_trader.core.types
:show-inheritance:
:inherited-members:
:members:
:undoc-members:
:member-order: bysource

UUID
----

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Testing
- Philosophy
- Unit Tests
- Integration Tests
- Acceptance Tests
- Acceptance Tests
2 changes: 0 additions & 2 deletions docs/source/guides/framework.rst

This file was deleted.

104 changes: 36 additions & 68 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
NautilusTrader Documentation
============================

***UNDER CONSTRUCTION***

Introduction
------------
Welcome to the documentation for `NautilusTrader`, an open-source, high-performance,
production-grade trading platform. It is hoped that this project gains wide
adoption within the trading community, assisting with safe, reliable and efficient
trading operations - utilizing the latest advanced technologies. The platform aims
trading operations.

The platform aims
to be universal, with any REST/FIX/WebSockets API able to be integrated via modular adapters.
Thus the platform can handle high-frequency trading operations for any asset classes
including FX, Equities, Futures, CFDs or Crypto - across multiple venues simultaneously.

Value Proposition
-----------------
One of the key value propositions of `NautilusTrader` is that it addresses the
challenge of keeping the backtest environment consistent with the production
live trading environment. Normally research and backtesting may be conducted in
Expand All @@ -24,11 +26,10 @@ more suitable for large enterprise systems.

The value of `NautilusTrader` here is that this re-implementation step is circumvented, as the
platform was designed from the ground up to hold its own in terms of performance
and enterprise grade quality. Python has simply caught right up on performance
and quality. Python has simply caught up in performance
(via Cython offering C level speed) and general tooling, making it a suitable language for implementing
a large system such as this. The benefit here being that a Python native environment
can now be offered to professional quantitative traders and hedge funds, to meet
their rigorous standards.
can be offered suitable for professional quantitative traders and hedge funds.

Why Python?
-----------
Expand All @@ -39,35 +40,11 @@ Not only that, Python has become the `de facto lingua franca` of data science,
machine learning, and artificial intelligence.

The language out of the box is not without its drawbacks however, especially in the context of implementing
a large system such as that offered with the `NautilusTrader` package. Cython has addressed some of these issues, offering all the advantages
large systems. Cython has addressed some of these issues, offering all the advantages
of a statically typed language, embedded into Pythons rich ecosystem of software
libraries and developer/user communities.

Architectural Overview
----------------------
The package offers a framework comprising of an extensive assortment of modular
components, which can be arranged into a complete trading platform and system.

The platform is structured around a simple ports and adapters style
architecture, allowing pluggable implementations of key components with a
feature rich yet straight forward API. `Domain Driven Design` (DDD) and message passing
have been central philosophies in the design.

From a high level
view - a `Trader` can host any number of infinitely customizable
`TradingStrategy`s. A central `Portfolio` has access to `Account`s which can all be queried. A common
`DataEngine` and `ExecutionEngine` then allow asynchronous ingest of any data
and trade events, with the core componentry common to both backtesting and live
implementations.

Currently a performant `Redis` execution database maintains
state persistence (swapped out for an in-memory only implementation for backtesting).
It should be noted that the flexibility of the framework even allows the live trading
`Redis` database to be plugged into the backtest engine. Interestingly there is
only a 4x performance overhead which speaks to the raw speed of `Redis` and the
platform itself.

To be continued (WIP)...


Index
Expand All @@ -88,61 +65,52 @@ Index
.. toctree::
:glob:
:maxdepth: 2
:caption: Guides
:caption: User Guide
:hidden:

guides/writing_strategies
guides/writing_indicators
guides/backtesting
guides/deploying_live
guides/framework
user_guide/writing_strategies
user_guide/writing_indicators
user_guide/backtesting
user_guide/deploying_live
user_guide/framework

.. toctree::
:glob:
:maxdepth: 2
:caption: API Reference
:hidden:

api/analysis
api/backtest
api/common
api/core
api/data
api/execution
api/indicators
api/model
api/postgres
api/redis
api/serialization
api/trading

.. toctree::
:glob:
:maxdepth: 2
:caption: Adapters
:hidden:

adapters/binance
adapters/bitmex
adapters/ccxt
adapters/tda
api_reference/analysis
api_reference/backtest
api_reference/common
api_reference/core
api_reference/data
api_reference/execution
api_reference/indicators
api_reference/model
api_reference/postgres
api_reference/redis
api_reference/serialization
api_reference/trading

.. toctree::
:glob:
:maxdepth: 2
:caption: Development
:caption: Adapter Reference
:hidden:

development/overview
development/environment
development/coding_standards
development/testing
adapter_reference/binance
adapter_reference/bitmex
adapter_reference/ccxt
adapter_reference/tda

.. toctree::
:glob:
:maxdepth: 2
:caption: Resources
:caption: Developer Guide
:hidden:

resources/research
resources/further_reading
developer_guide/overview
developer_guide/environment
developer_guide/coding_standards
developer_guide/testing
2 changes: 0 additions & 2 deletions docs/source/resources/further_reading.rst

This file was deleted.

2 changes: 0 additions & 2 deletions docs/source/resources/research.rst

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Deploying Live
==============

*** This documentation is currently a work in progress ***

Encryption
----------

Expand Down
26 changes: 26 additions & 0 deletions docs/source/user_guide/framework.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Framework
=========

Architectural Overview
----------------------
The package offers a framework comprising of an extensive assortment of modular
components, which can be arranged into a complete trading platform and system.

The platform is structured around a simple ports and adapters style
architecture, allowing pluggable implementations of key components with a
feature rich yet straight forward API. `Domain Driven Design` (DDD) and message passing
have been central philosophies in the design.

From a high level
view - a `Trader` can host any number of infinitely customizable
`TradingStrategy`s. A central `Portfolio` has access to `Account`s which can all be queried. A common
`DataEngine` and `ExecutionEngine` then allow asynchronous ingest of any data
and trade events, with the core componentry common to both backtesting and live
implementations.

Currently a performant `Redis` execution database maintains
state persistence (swapped out for an in-memory only implementation for backtesting).
It should be noted that the flexibility of the framework even allows the live trading
`Redis` database to be plugged into the backtest engine. Interestingly there is
only a 4x performance overhead which speaks to the raw speed of `Redis` and the
platform itself.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion nautilus_trader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Semantic Versioning (https://semver.org/)
_MAJOR_VERSION = 1
_MINOR_VERSION = 83
_PATCH_VERSION = 8
_PATCH_VERSION = 9
_PRE_RELEASE = ''

__version__ = '.'.join([
Expand Down
4 changes: 3 additions & 1 deletion nautilus_trader/analysis/performance.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ cdef class PerformanceAnalyzer:

cpdef void reset(self) except *:
"""
Reset the analyzer by returning all stateful values to their initial value.
Reset the analyzer.
All stateful values are reset to their initial value.
"""
self._account_starting_balance = None
self._account_balance = None
Expand Down
4 changes: 3 additions & 1 deletion nautilus_trader/backtest/data.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ cdef class BacktestDataClient(DataClient):

cpdef void reset(self) except *:
"""
Reset the client to its initial state.
Reset the data client.
All stateful values are reset to their initial value.
"""
self._log.debug(f"Resetting...")

Expand Down
1 change: 1 addition & 0 deletions nautilus_trader/backtest/engine.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ cdef class BacktestEngine:
"""
Reset the backtest engine.
All stateful values are reset to their initial value.
"""
self.log.debug(f"Resetting...")

Expand Down
4 changes: 3 additions & 1 deletion nautilus_trader/backtest/exchange.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ cdef class SimulatedExchange:

cpdef void reset(self) except *:
"""
Return the market to its initial state.
Reset the simulated exchange.
All stateful values are reset to their initial value.
"""
self._log.debug(f"Resetting...")

Expand Down
4 changes: 3 additions & 1 deletion nautilus_trader/backtest/execution.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ cdef class BacktestExecClient(ExecutionClient):

cpdef void reset(self) except *:
"""
Return the client to its initial state preserving tick data.
Return the client.
All stateful values are reset to their initial value.
"""
self._log.debug(f"Resetting...")

Expand Down
4 changes: 3 additions & 1 deletion nautilus_trader/common/factories.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ exchange/broker strategy_id : StrategyId

cpdef void reset(self) except *:
"""
Reset the order factory by clearing all stateful values.
Reset the order factory.
All stateful values are reset to their initial value.
"""
self._id_generator.reset()

Expand Down
10 changes: 6 additions & 4 deletions nautilus_trader/common/generators.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ cdef class IdentifierGenerator:

cpdef void reset(self) except *:
"""
Reset the identifier generator by setting all stateful values to their
default value.
Reset the identifier generator.
All stateful values are reset to their initial value.
"""
self._count = 0

Expand Down Expand Up @@ -206,8 +207,9 @@ cdef class PositionIdGenerator:

cpdef void reset(self) except *:
"""
Reset the identifier generator by setting all stateful values to their
default value.
Reset the identifier generator.
All stateful values are reset to their initial value.
"""
self._counts = {}

Expand Down
22 changes: 0 additions & 22 deletions nautilus_trader/core/types.pxd

This file was deleted.

Loading

0 comments on commit b9c6a09

Please sign in to comment.