Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Apache License Python 3.12



ℹ️ TensorTrade-NG was forked from the TensorTrade-Project, mainly because the code needed a lot refactoring, was outdated and it looked not really maintained anymore. Therefor we did a lot of breaking changes, removed old unused stuff and cleaned up. We tried to preserve the APIs but if you want to switch from TensorTrade to TensorTrade-NG be aware that it may take a little bit of effort. Apart from that we thank all the former developers and community for their awesome work and are happy to welcome them here.

TensorTrade-NG is still in Beta, meaning it should be used very cautiously if used in production, as it may contain bugs.

TensorTrade-NG is an open source Python framework for building, training, evaluating, and deploying robust trading algorithms using reinforcement learning. The framework focuses on being highly composable and extensible, to allow the system to scale from simple trading strategies on a single CPU, to complex investment strategies run on a distribution of HPC machines.

Under the hood, the framework uses many of the APIs from existing machine learning libraries to maintain high quality data pipelines and learning models. One of the main goals of TensorTrade is to enable fast experimentation with algorithmic trading strategies, by leveraging the existing tools and pipelines provided by numpy, pandas and gymnasium. The idea behind Tensorflow-NG is not to implement all the machine learning stuff itself. But to provide a solid framework that makes it possible to quickly provide a working environment for other tools such as Stable-Baselines3.

Every piece of the framework is split up into re-usable components, allowing you to take advantage of the general use components built by the community, while keeping your proprietary features private. The aim is to simplify the process of testing and deploying robust trading agents using deep reinforcement learning, to allow you and I to focus on creating profitable strategies.

The goal of this framework is to enable fast experimentation, while maintaining production-quality data pipelines.

Read the documentation.

Guiding principles

Inspired by Keras' guiding principles.

  • User friendliness. TensorTrade is an API designed for human beings, not machines. It puts user experience front and center. TensorTrade follows best practices for reducing cognitive load: it offers consistent & simple APIs, it minimizes the number of user actions required for common use cases, and it provides clear and actionable feedback upon user error.

  • Modularity. A trading environment is a conglomeration of fully configurable modules that can be plugged together with as few restrictions as possible. In particular, exchanges, feature pipelines, action schemes, reward schemes, trading agents, and performance reports are all standalone modules that you can combine to create new trading environments.

  • Easy extensibility. New modules are simple to add (as new classes and functions), and existing modules provide ample examples. To be able to easily create new modules allows for total expressiveness, making TensorTrade suitable for advanced research and production use.

Getting Started

You can get started testing on Google Colab or your local machine, by viewing our many examples.

Recommended beginning points:

Installation

TensorTrade-NG requires Python >= 3.12.0 for all functionality to work as expected.

As package

You can install TensorTrade-NG both as a pre-packaged solution by running the default setup command.

pip install tensortrade-ng

Via git

You can also alternatively install TensorTrade-NG directly from the master code repository, pulling directly from the latest commits. This will give you the latest features/fixes, but it is highly untested code, so proceed at your own risk.

pip install git+https://github.com/erhardtconsulting/tensortrade-ng.git

Cloning the repository

⚠️ Warning: This repository uses git-lfs for storing the Jupyter Notebooks and other big files. Make sure to install the git-lfs Extension before cloning the repository.

You can clone/download the repository in your local environment and manually install the requirements, either the "base" ones, or the ones that also include requirements to run the examples in the documentation.

# install only base requirements
pip install -e .

# install all requirements
pip install -e ".[dev]"

Build Documentation

You can either build the documentation once or serve it locally.

Prerequisites: You need to have pandoc installed locally for converting jupyter notebooks. Otherwise it won't work. The pip-version won't work, because it's just a wrapper. You need to use your package manager, like brew or apt.

Run documentation as local webserver

hatch run docs:serve

Build documentation

hatch run docs:build

Run Test Suite

To run the test suite, execute the following command.

hatch test

Support

You can also post bug reports and feature requests in GitHub issues. Make sure to read our guidelines first.

If you have questions or anything else that needs to be discussed. Please use GitHub Discussions rather than opening an issue.

Contributors

Contributions are encouraged and welcomed. This project is meant to grow as the community around it grows. Let us know on GitHub Discussions if there is anything that you would like to see in the future, or if there is anything you feel is missing.

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub.

https://github.com/erhardtconsulting/tensortrade-ng/graphs/contributors

Metadata

Release files for tensortrade-ng 2.0.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tensortrade-ng 2.0.0a2
File Size Uploaded
tensortrade_ng-2.0.0a2.tar.gz 70.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tensortrade-ng 2.0.0a2
File Interpreter ABI Platform
tensortrade_ng-2.0.0a2-py3-none-any.whl Python 3 none any Details

Total release size: 194.9 kB

Release files / tensortrade_ng-2.0.0a2.tar.gz

Download URL tensortrade_ng-2.0.0a2.tar.gz
Size 70.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5a5630022efc64a3095e28b8b33a3ceb72573b86aa62fa8030d0cd14836f8375
BLAKE2b-256 checksum
How to use checksums
4635a88597e8fab9a5e14858beb1d17810e81caa0feef7731e95c005a65cc2ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5

Release files / tensortrade_ng-2.0.0a2-py3-none-any.whl

Download URL tensortrade_ng-2.0.0a2-py3-none-any.whl
Size 124.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
167b614fb01926ad6223867ec7fdc467bfcd0a0ee05e1aabcd13b2759a479fe7
BLAKE2b-256 checksum
How to use checksums
3c6bd124fb39813ef9ab8fdb9d1b1179a14216144393e03058254c6063bfe408
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page