tradefloorStart free

Frequently asked questions

Short answers to what people ask about tradefloor most often. Each one links to the page in the docs with the details.

The basics

What is tradefloor?

tradefloor is a simulated stock market for testing trading strategies and AI agents. You give it a seed and a list of companies, and it runs a market forward with an economy underneath and a limit order book for every stock. It's a Python library with a Rust core, open source under MIT or Apache-2.0.

Is tradefloor a backtester?

It does the same job, testing a strategy before it trades real money, in a different way. A backtest replays prices that already happened. tradefloor generates new markets instead. Your orders move the prices they trade at, you can test on as many markets as you like, and you can fork one to see what a single change does. tradefloor compared sets it beside the main backtesters and simulators.

Does it use real market data?

The prices are always simulated. A market can start from generated companies, or from real companies' fundamentals taken from SEC EDGAR filings. That keeps their valuations, sector weights and the share of them that lose money. Real market data is also what the model is checked against.

Which languages and platforms does it run on?

It runs on Python 3.11 or later, with prebuilt wheels for Linux on x86_64 and aarch64, macOS on Apple silicon and Intel, and Windows on x86_64. Install it with pip install tradefloor. The engine is also a Rust crate, and cargo add tradefloor lets you embed it in Rust code.

Agents and bots

Can an LLM agent trade it?

Yes. Adapters run agents built with the OpenAI Agents SDK, PydanticAI, LangGraph or FinRobot, or any plain Python function, inside a market on your machine. A local MCP server lets Claude Code, Claude Desktop, Cursor, VS Code and other MCP clients build markets, score strategies and explain price moves. In Claude Desktop it's also in the connector directory, where you can add it without editing a config file.

Do I need an API key to run an LLM agent?

You need one for the model you call, and only the first time. tradefloor records every answer the model gives along with what it was shown. Anyone can replay the run later with no key and no cost. If anything about the experiment changes, the replay stops instead of reusing old answers.

Can I use it for reinforcement learning?

Yes. tradefloor ships a Gymnasium environment, TradingEnv, whose action is a target weight for each stock and whose reward includes the cost of the policy's own trading.

Does it support options or futures?

Not yet. Today it simulates stocks, with interest rates and a VIX in the economy underneath them. Futures and options are in development for the next model.

Realism

Is the simulated market realistic?

It's checked against real markets. Before the default model, pt-v21, was graded, 40 criteria were written down from real data, among them crash sizes in replays of 2008 and 2020, how often large falls happen, how long the VIX stays high, rate and bond moves, earnings and the cost of trading. It passes all 40 on seeds the tuning never saw, and the scripts and results are published with the docs.

Can tradefloor predict real prices?

No. It makes markets that behave like real ones on the measured figures, and it says nothing about what a real stock will do next. A strategy that makes money here may still lose money in live trading.

What doesn't the model capture?

The docs list each measured failure as a named gap, with the uses it rules out. The model is certified for runs of up to 252 trading days, and tf.envelope.check() tells you whether a question falls inside what was validated.

Reproducing a run

Will I get the same result if I run it again?

Yes. The same inputs on the same release give the same market, bit for bit, on Linux, macOS and Windows. tradefloor ships its own maths functions so the platform's maths library can't change a result, and a manifest saves every input so someone else can rebuild your run.

What does forking a market mean?

A fork copies a running market on any day. You change one thing in one copy, such as a rate shock or a different agent, and run both forward. The copies share their past exactly. Any difference afterwards comes from the change, not from luck.

Cost and the hosted app

Is tradefloor free?

The library is free and open source under MIT or Apache-2.0, with no account and no usage limits. The hosted app has a free plan during the beta, and the plans page lists its limits. Pro, at $25 a month with more included and usage past that billed up to budgets you set, is coming soon.

What is the hosted app?

It's the same simulator run on a server, for agents and bots that connect over MCP, an HTTP API or an API shaped like Alpaca's. Markets are saved there, and an agent can come back to one later. It's in beta, and you can sign in with your email address.

How do I cite tradefloor?

Cite the version and the preset with any result, for example tradefloor 0.10.2 with pt-v21, and the DOI 10.5281/zenodo.23091410. The docs' citing page has a BibTeX entry with the DOI in it, and the details to publish beside a result.

Ask us something else · Start with the Python quickstart