DeskTested

Trading tools, tested on a real desk.

Updated Oct 19, 2026Desk NotesClaims verified ✓Anthony M.

TensorTrade Isn't New: We Installed the 7-Year-Old Reinforcement Learning Trading Library

TensorTrade has been on PyPI since 2019, yet one account keeps calling it new. We installed 1.0.4: its 'Run training' quickstart is a random policy.

TensorTrade, the reinforcement learning trading library, is not new. Its GitHub repository was created on 30 July 2019 and its first PyPI release shipped on 16 August 2019. Yet the same “BREAKING: A new Python library” post about it has gone out at least three times from one account, word for word identical. We installed the current version anyway. It installs cleanly, but the README’s “Run training” quickstart contains no learning at all. Its policy is a random number generator.

The useful part of the project is a number its own authors publish: on their figures, a 0.1% commission turns their best agent’s result from a profit into a loss. That 0.1% is a quarter of Kraken Pro’s entry-tier maker fee today.

The same “breaking” post, three times in nine months

The account is @quantscience_. All three posts carry exactly this text, followed by an image:

🚨BREAKING: A new Python library for algorithmic trading.

Introducing TensorTrade: An open-source Python framework for trading using Reinforcement Learning (AI)

Posted (UTC) X status ID Likes Replies Latest TensorTrade release that day
27 Dec 2025 2004902386544820720 3,293 43 1.0.3, released 10 May 2021
20 Apr 2026 2046201269606346791 384 8 1.0.4, released 6 Feb 2026
23 Sep 2026 2102789109731237931 408 6 1.0.4, released 6 Feb 2026

The post text, timestamps and counts come from X’s public embed endpoint, read 19 October 2026. Counts drift, so treat them as a snapshot. The release column comes from PyPI.

Reposting an evergreen library is an ordinary content tactic, and the library is real. The problem is the word “new”. When the December post went out, the latest TensorTrade release was 1,692 days old, and the project had been on PyPI for six years.

How old TensorTrade actually is

Every date below was read on 19 October 2026 from PyPI’s JSON API and GitHub’s repository API:

Milestone Date
GitHub repository created 30 Jul 2019
First PyPI release (0.0.1a1) 16 Aug 2019
1.0.0b0 24 Aug 2020
1.0.3 10 May 2021
1.0.4 (latest) 6 Feb 2026
Last push to the repository 19 Feb 2026

That adds up to 27 releases, 7,213 stars, 1,335 forks and an Apache-2.0 licence. The gap between 1.0.3 and 1.0.4 is 1,733 days, so “revived in February 2026” is fair and “new” isn’t.

It isn’t a typosquat, either. The tensortrade package on PyPI names Adam King and Matthew Brulhardt as authors and links back to github.com/tensortrade-org/tensortrade, the same project the posts describe. You can check any “breaking” library in under a minute the same way:

# Date any PyPI package from public APIs (no key needed).
import json, urllib.request

def get(url):
    req = urllib.request.Request(url, headers={"User-Agent": "desk-check"})
    with urllib.request.urlopen(req) as r:
        return json.load(r)

pypi = get("https://pypi.org/pypi/tensortrade/json")
uploads = sorted(
    (min(f["upload_time"] for f in files)[:10], version)
    for version, files in pypi["releases"].items() if files
)
print("first release:", uploads[0])    # ('2019-08-16', '0.0.1a1')
print("latest release:", uploads[-1])  # ('2026-02-06', '1.0.4')
print("releases:", len(uploads))       # 27

repo = get("https://api.github.com/repos/tensortrade-org/tensortrade")
print(repo["created_at"][:10], repo["pushed_at"][:10], repo["stargazers_count"])
# 2019-07-30 2026-02-19 7213   (outputs as returned on 19 Oct 2026)

What happened when we installed it

On 17 October 2026 we created a fresh Python 3.12.3 virtual environment, ran pip install "tensortrade==1.0.4", and then ran the README’s quickstart script. Here’s what came out:

Check Result
Install Clean, exit 0, 39.4 s wall clock
Virtual environment size 2.6 GB
Heavy dependencies pulled in tensorflow 2.21.0, keras 3.15.1, gymnasium 1.4.0, pandas 2.3.3, numpy 1.26.4
Test and notebook tools installed as runtime requirements pytest 9.1.1, ipython 9.17.1
Quickstart script included in the PyPI package? No. examples/ isn’t shipped; we fetched train_simple.py from the v1.0.4 tag
Quickstart run Exit 0 in 4.2 s

The README’s Quick Start tells you to run pip install -e ., which only works inside a clone of the repository. A plain pip install tensortrade gives you the library but not the script the README runs next. PyPI’s metadata, read 19 October 2026, lists pytest>=7.0.0 and ipython>=7.12.0 as unconditional requirements, which is why a test runner and an interactive shell land in every install.

The script labelled “Run training” is a random policy

The README’s Quick Start block runs python examples/training/train_simple.py under the comment # Run training. This is the decision loop inside that script at the v1.0.4 tag:

# examples/training/train_simple.py, TensorTrade v1.0.4 (quoted)
while not done and not truncated and step < 150:  # Limit steps for readability
    # Simple policy: random with bias towards holding
    rand = np.random.random()
    if rand < 0.15:
        action = 0  # Buy
    elif rand < 0.30:
        action = 1  # Sell
    else:
        action = 2  # Hold

There’s no model, no gradient and no learning. That’s 15% buy, 15% sell and 70% hold, chosen by a dice roll each step. The script still prints “Training Complete!” when it finishes. The README’s own scripts table describes it more modestly, as a “Basic demo with wallet tracking”. Real RL training needs a separate install (pip install -r examples/requirements.txt, which brings in Ray RLlib) and different scripts (train_ray_long.py, train_optuna.py, train_best.py). We didn’t run that path, so this page makes no claim about what a trained TensorTrade agent does.

The run used the script’s settings: five episodes of 150 steps from a $10,000 start, with 0.1% commission. The random policy placed 36, 47, 40, 41 and 48 trades and ended with small results, some up and some down. That’s a coin flip, and it says nothing about RL. One observation we can’t explain: the bundled CryptoDataDownload fetch (Bitfinex BTC/USD, hourly) returned 200 rows priced between $109,940 and $124,100, while BTC was trading around $81,000 on the test date. We logged the mismatch and didn’t investigate the cause, so check what data the quickstart actually loaded before reading anything into it.

The number that matters is in the authors’ README

TensorTrade’s README carries a “Research Findings” table, and it is unusually candid. It’s quoted here exactly as published (read 17 and 19 October 2026, unchanged):

Configuration Test P&L vs Buy-and-Hold
Agent (0% commission) +$239 +$594
Agent (0.1% commission) -$650 -$295
Buy-and-Hold -$355 —

Bar chart of TensorTrade’s own README results: agent at 0% commission +$239, agent at 0.1% commission -$650, buy-and-hold -$355, from the authors’ PPO backtests on BTC/USD between 16 September and 16 October 2025

The authors’ backtest simulation: PPO agents trading BTC/USD, tested over 16 September to 16 October 2025 (30 days) per the project’s docs/EXPERIMENTS.md. Not reproduced by us. Not live results, not a prediction, not advice.

The README sums it up: “commission costs currently exceed prediction profits.” Two details from EXPERIMENTS.md (v1.0.4, read 19 October 2026) change how the table reads:

  • The two agent rows are different agents. The 0% row is Experiment 7, the best of four training-commission settings, tested with commission switched off. The 0.1% row is Experiment 5, an Optuna run. In Experiment 7’s own results table, the agent behind the profitable row loses money once the same 0.1% commission is applied.
  • The whole comparison is one 30-day window, during which the authors note BTC fell 3.55%. One month is one market regime, however many experiments run inside it.

The project’s own diagnosis is overtrading. The agent “Makes ~2,000+ trades in 30 days (~3-4 per hour)”, and fees eat whatever edge the direction calls had.

Put the 0.1% next to a real fee schedule

Bar chart of commission per fill: TensorTrade’s README test setting 0.1%, Kraken Pro spot lowest-tier maker fee 0.4%, Kraken Pro spot lowest-tier taker fee 0.8%

Kraken’s fee schedule (kraken.com/features/fee-schedule, read 19 October 2026) lists standard Kraken Pro spot crypto fees of 0.40% maker and 0.80% taker for Tier 1. That’s the entry tier, for accounts with under $2,500 of 30-day spot volume and under $20,000 held on the platform. So the commission at which the authors’ agents lost money is a quarter of an entry-tier maker fill and an eighth of an entry-tier taker fill. Here’s what each level costs over a full round trip:

# Illustrative: cost of one buy fill plus one sell fill at each fee level
fees = {
    "README test commission": 0.001,
    "Kraken Pro Tier 1 maker": 0.0040,
    "Kraken Pro Tier 1 taker": 0.0080,
}
for name, f in fees.items():
    round_trip = 1 - (1 - f) ** 2
    print(f"{name:<24} {f:.2%} per fill -> {round_trip:.2%} per round trip")

# README test commission   0.10% per fill -> 0.20% per round trip
# Kraken Pro Tier 1 maker  0.40% per fill -> 0.80% per round trip
# Kraken Pro Tier 1 taker  0.80% per fill -> 1.59% per round trip

A policy that trades three or four times an hour needs an edge larger than the round-trip cost on every pair of fills just to stand still. An RL environment with the commission set to zero is a backtest with the cost assumption deleted, the same mistake as treating fills as a rounding detail, which we catalogue in backtesting mistakes that only real data reveals.

The weaknesses are documented, including by the project

Each point below comes from a cited source, not from our opinion of RL.

  • Overfitting. TensorTrade’s tutorial “Common RL Trading Failures” warns: “These failures have destroyed countless trading agents.” Overfitting is failure #1. In EXPERIMENTS.md, the conclusion of Experiment 1 reads: “Model overfits to training patterns that don’t transfer.”
  • Reward hacking. The same tutorial lists it as failure #6, and its overfitting guide gives the tell: “If reward ↑ but pnl flat or ↓, agent is gaming reward.” Amodei et al., “Concrete Problems in AI Safety” (arXiv:1606.06565, 2016), list “avoiding reward hacking” among the problems that come from “having the wrong objective function”.
  • Fragile results. Henderson et al., “Deep Reinforcement Learning that Matters” (AAAI 2018, arXiv:1709.06560), found that “reproducing results for state-of-the-art deep RL methods is seldom straightforward,” because “non-determinism in standard benchmark environments, combined with variance intrinsic to the methods, can make reported results tough to interpret.”
  • Backtest to live. The authors themselves say their strong validation result “showed weaker generalization” on the test set and call it “the challenge of distribution shift in financial markets.”

The defences are the ones any strategy needs: hold out data the tuning loop never sees, and run every result under a pessimistic cost assumption. They’re steps two and three of how we validate a strategy before it trades a dollar. An agent that passes those still faces the operational failures that have nothing to do with its policy, which we cover in running an autonomous trading agent.

Should you install it?

As a sandbox for learning how RL environments, action schemes and reward functions fit together, it’s a permissively licensed codebase with unusually honest docs. Clone the repository rather than relying on pip install, budget about 2.6 GB, and know that the quickstart demonstrates plumbing, not learning. As evidence that an AI can trade profitably, the project’s own numbers argue the other way, and its README says so.

Frequently asked questions

Is TensorTrade a new library?

No. The GitHub repository was created on 30 July 2019 and the first PyPI release (0.0.1a1) shipped on 16 August 2019. The current release, 1.0.4, came out on 6 February 2026 after a gap of 1,733 days since 1.0.3. Release dates come from PyPI, read 19 October 2026.

Is the tensortrade package on PyPI the real project?

Yes. The PyPI listing names Adam King and Matthew Brulhardt as authors and links to github.com/tensortrade-org/tensortrade, the project’s repository. It isn’t a lookalike package.

Does TensorTrade’s quickstart train an AI model?

No. In v1.0.4, the quickstart script examples/training/train_simple.py picks actions with np.random.random(): 15% buy, 15% sell, 70% hold. Training an actual agent needs the Ray RLlib requirements and separate scripts such as train_best.py.

Can a TensorTrade agent make money trading?

We haven’t tested a trained agent, so we can’t say. The authors’ published backtest shows their agent beating buy-and-hold only with commission set to 0%. At 0.1% commission it lost money, by their own account, over a single 30-day test window in 2025.


Sources read 19 October 2026 unless stated: PyPI JSON API for tensortrade; GitHub API for tensortrade-org/tensortrade; the project’s README, docs/EXPERIMENTS.md and tutorials at the v1.0.4 tag; X’s public embed data for the three status IDs above; kraken.com/features/fee-schedule. The install and quickstart run are from our desk log for 17 October 2026.

This is educational content, not financial advice. The backtest figures quoted are the TensorTrade authors’ historical simulations over the stated period. They’re not live results, not predictions, and not a recommendation of any strategy, library or exchange. We have no affiliate or commercial relationship with TensorTrade, Quant Science or Kraken.