FullStack Alpha logo BestAITradingTools.com by FullStack Alpha
Red and green candlestick chart recovering after a pullback on a dark background

Quant and ML deep dive

TensorTrade Review | Teaching AI to Trade, and Watching Fees Eat It

TensorTrade logoTensorTradetensortrade-org/tensortrade

TensorTrade is a free Python framework for training AI trading agents through reinforcement learning, where a program learns by trial and error and gets rewarded for good results. It gives you the building blocks: a simulated market, a portfolio, actions and rewards. The catch: its own published test shows the agent losing to buy-and-hold once a 0.1% trading fee is added, and it demands real machine-learning skill.

Think of it as a flight school for a robot pilot: you build the simulator, set the scoring rules, and let the robot crash thousands of times until it learns to land, or never does.

FullStack Alpha Editorial Team

Reviewed by Jay Rocco, Chief Editor

What Is TensorTrade and What Does It Actually Do?

GitHub page for TensorTrade (tensortrade-org/tensortrade)
tensortrade-org/tensortrade on GitHub · 2026

Here is the dream every quant-curious trader has had: skip writing rules, let an AI figure out the market by itself. TensorTrade is a toolkit for trying exactly that. It uses reinforcement learning, a type of machine learning where a program tries actions, gets a score, and slowly learns which actions earn higher scores. It is the same idea that taught computers to beat humans at video games.

The framework breaks a trading problem into parts you can swap. A trading environment ties together an observer (what the agent sees, like recent prices), an action scheme (what it can do, by default buy, sell or hold), a reward scheme (how it is scored, by default position-based returns), a portfolio of wallets and a simulated exchange with configurable commission. Data flows from a feed, through the exchange and broker, to trades. Change one part and you have a new experiment.

Training runs on Ray RLlib, a popular library for reinforcement learning that the README calls the recommended route, and example scripts cover simple training, long distributed runs and Optuna-based tuning (automatically searching for the best settings). The docs include tutorials on overfitting, commission analysis and walk-forward validation, which means testing on time periods the agent never trained on.

What sets this project apart is honesty. Its README asks, can they beat buy-and-hold? Then it shows the answer. On BTC/USD, a PPO agent (a standard reinforcement learning method) made a test profit of 239 dollars with zero commission, beating buy-and-hold. Add a 0.1% fee and it lost 650 dollars, worse than simply holding. The authors say commission costs currently outweigh the agent's prediction gains. That is the most useful sentence in the whole repo.

Community Score

60 / 100

How we score
Adoption · How many people starred it
23.2 / 30
Maintenance · How recently the code was updated
8 / 25
Community sentiment · What traders say on Reddit and Hacker News
8 / 20
Builder activity · How many people built their own copy
10.9 / 15
License clarity · Whether you are clearly allowed to use it
10 / 10

GitHub data checked 2026. Community read: not enough independent discussion yet.

Stars
7,252
Forks (people who built on it)
1,336
Written in
Python
License
Apache-2.0
Last update
2026-02-19
Markets
Crypto, Stocks
Skill level
Advanced

Works with

Any AI, through your own code
View tensortrade-org/tensortrade on GitHub ↗

Is TensorTrade Right for You?

Good fit if you are

  • Python developers who already know some machine learning and want a structured way to experiment with reinforcement learning in markets
  • Students and researchers who want readable building blocks and tutorials instead of starting from scratch
  • Skeptics who want to see for themselves why most AI trading bots do not survive real trading costs

Skip it if you are

  • You want a bot that trades your account. It is a research framework with a simulated exchange, and the README names no live broker or exchange connection
  • You are new to Python and machine learning. The learning curve is steep and training takes real computing power and patience
  • You expect AI to find easy money. The project's own results show fees erasing the edge

The jargon, in plain English

Reinforcement learning (RL)
A type of machine learning where a program learns by trial and error, earning a reward for good actions.
Agent
The AI program that makes the trading decisions inside the simulation.
Action scheme
The menu of moves the agent is allowed to make, such as buy, sell or hold.
Reward scheme
The scoring rule that tells the agent whether a move was good or bad.
Buy-and-hold
The baseline strategy of buying once and doing nothing. Most trading systems fail to beat it after costs.
Overfitting
When a model memorizes the past so well that it fails on new data, like a student who memorized last year's exam answers.
Walk-forward validation
Testing a model on later time periods it never saw during training, to check it learned something real.

What Do Traders Say About TensorTrade?

The public conversation is old. The only real thread we found was the 2019 Hacker News launch discussion, back when the project lived under a different account. The top caution from that thread still stands: a commenter told readers to check a disclaimer from the creator of Keras before putting money into this kind of system.

Since then, the project has kept a steady fan base, about 7,300 stars and over 1,300 forks (a fork is someone's copy they build on). The last code push we saw was February 2026, so it is maintained, but slowly. The README's open admission that fees beat the agent is, in our view, a sign the current maintainers are serious.

“For anyone considering putting money into this, make sure to read this disclaimer from François Chollet (who made Keras) first”
MasterScrat, Hacker News, 2019

What they like

  • Clean, swappable building blocks for RL experiments
  • Tutorials covering overfitting, fees and walk-forward testing
  • Honest published results, including the losing ones

What they complain about

  • Only an old 2019 launch thread found
  • That thread's top caution warns readers to see a disclaimer before risking money

How Do You Set Up TensorTrade Safely?

Plain steps, fake money first. Keep your keys in a private settings file, never pasted into the code.
  1. 01Create a Python 3.12 environmentMake a fresh virtual environment, a separate sandbox for this project's packages, using Python 3.12. The README mentions both 3.11 and 3.12, so 3.12 is the safer pick.
  2. 02Install the frameworkClone the repo, upgrade pip, then install requirements.txt and the package itself with pip install -e .
  3. 03Run the testsRun the unit tests with pytest as the README shows. If they pass, your install is working.
  4. 04Install training extrasInstall examples/requirements.txt to get Ray RLlib and the other training tools the example scripts use.
  5. 05Start with the tutorials and a simple scriptWork through the tutorial index, then run the simple training example. Set a realistic commission in the simulated exchange from day one.
  6. 06Validate on unseen dataUse walk-forward testing and compare every result against buy-and-hold. If you later wire up live data, keep any exchange keys in a .env file, not in notebooks.

What Do You Need to Run TensorTrade?

  • Python 3.11 or 3.12

    TensorTrade is a Python framework. The README gives both versions in different places.

  • Historical price data

    The agent learns from past prices. The README's examples use BTC/USD, and the framework includes a data module for fetching data.

  • Ray RLlib

    The recommended library for training agents, installed with the example requirements.

    Ray
  • A decent computer or cloud machine

    Training an agent means running thousands of simulated episodes. Longer runs benefit from more CPU power.

  • Docker (optional)

    The repo includes Docker shortcuts for running notebooks, docs and tests in a ready-made container.

    Docker

What Are the Risks of Using TensorTrade?

  • Fees erase the edge

    The README's own test shows a 0.1% commission turning a winning agent into a loser that trails buy-and-hold. Most real trading costs more than that once spreads and slippage are included.

  • Overfitting is the default outcome

    RL agents are very good at memorizing history. Without walk-forward testing, a beautiful training result usually means nothing.

  • Steep learning curve

    You need comfort with Python, machine learning concepts and debugging training runs. Beginners will spend weeks before their first meaningful experiment.

  • No live trading path in the README

    The exchange is simulated, and the README names no supported broker or exchange. Going live means building and securing that bridge yourself.

  • Slow maintenance pace

    The last code push we saw was February 2026, there are no tagged releases listed, and the community link still points to an older account.

Not ready to run code yourself? Our hands-on AI stock tool reviews on AIStockPickerApp.com score finished products on five pillars, the AI stock tools directory at AIStockPickerApps.com sorts 200+ tools by the job they do, and AIStockTradingBots.com walks through broker APIs, bot setup and backtesting step by step. Or head back to the Trading Workflows home page to match tools to your own routine and budget.

What Are the Best TensorTrade Alternatives?

Should You Use TensorTrade? Our Verdict

TensorTrade is the most honest reinforcement learning trading framework we have reviewed. It gives you clean parts, real tutorials on overfitting and fees, and published results that admit the agent loses after costs. For anyone who wants to learn how AI trading actually works, that candor is the lesson.

As a money-maker, it is not ready, and it does not pretend to be. Use TensorTrade to study, to test ideas and to cure yourself of the belief that an AI will print profits on its own. Systems beat hacks. The system here is the scientific method, and it starts by comparing everything to buy-and-hold.

Community Score

60

out of 100 · method

More TensorTrade Questions, Answered

What is TensorTrade?

TensorTrade is an open-source Python framework for building, training and evaluating reinforcement learning agents for trading. You combine a simulated exchange, a portfolio, an action menu and a reward rule, then let the agent learn by trial and error.

Is TensorTrade free?

Yes. It is free under the Apache-2.0 license. Your costs are computing power for training and any market data you buy.

Can TensorTrade make money trading?

Its own README says not yet. A test agent beat buy-and-hold with zero fees but lost to it once a 0.1% commission was added. Treat it as a research tool.

Does TensorTrade work with stocks or only crypto?

The README's examples use BTC/USD, and the framework works on price data you feed it, so you can experiment with other markets. It does not name specific supported exchanges or brokers.

Is TensorTrade still maintained?

Yes, but slowly. The last code push we saw was in February 2026, and the README has recent docs and experiment logs. Releases are not regularly tagged.

Sources we checked

Incoming transmission | Free weekly newsletter

Stop paying for tools that don't earn their seat.

FullStack Alpha has tested 200 AI stock tools. Be honest: how many of yours do the same job, and which one did you forget you signed up for?

One email a week fixes that: which tools are worth the money, what they cost right now, and how the traders on this site wire them into a routine. Five minutes to read. Zero noise.

Free. One email a week. Unsubscribe in one click. We never sell your email.

  • Hot stock picks
  • Paid signal pitches
  • Fake countdown timers
  • Gurus selling courses

Inside every issue

5 MIN READ

  1. 01

    The Verdict

    One AI trading tool tested and scored. What it does well, what it costs, and the catch the sales page leaves out.

  2. 02

    Price Watch

    Price changes and live promos on the tools traders actually use, monthly and annual side by side, so you stop overpaying.

  3. 03

    Workflow Teardown

    One educator's routine taken apart: the scan, the chart, the tools, and the free swap for every paid one.

  4. 04

    Scan of the Week

    Exact scanner settings you can copy, pulled from the educator's own lesson with the timestamp.

Process beats prediction. This is the email that keeps your process honest.

FullStack Alpha logo

FullStack Alpha Network