Mongol Forex

News

RL Gold Research Kit: test your own trading agents

Most reinforcement-learning trading code online never gets past its first run: no real costs, a random-walk dataset, a win rate that is not a win rate. The RL Gold Research Kit is the Python code we built to test our own gold agents properly, packaged so you can test yours. It is a research framework, not a trading robot: it places no orders and it contains no market data.

Built like production software

  • About 2,200 lines of Python in 16 files, and self-tests that cover every part.
  • More than 1,200 automated checks in the main suite alone: hand-calculated trades for entry, exit, stop, gap, short and size cap; a money identity (final balance minus the start equals the sum of the trade results, to the cent); and look-ahead tests that rewrite every bar after a chosen point and require that nothing before it moves.
  • Released from an empty folder. Before every release the zip is unpacked into a clean directory and twelve steps run from scratch: the self-tests, a synthetic dataset, the data-integrity gate, the baselines, the plain breakout rule, short training runs and the pass / fail gates. All twelve must pass.
  • Cross-checked against an older implementation. The breakout engine was compared trade by trade with an independently written earlier version: 1,296 of 1,296 trades identical.
  • One fixed order of events inside every bar: a gap through the stop fills at the open, then the new target is applied at the open, then the stop is checked against the bar's low or high, then the account is marked at the close. No guessing which came first.
  • Reproducible. Seeds are fixed, every run is saved, and every saved run can be replayed to the cent.

What you get

  • A strict execution simulator. The agent decides at the close and is filled at the next open. Every fill pays a round-trip cost, the stop is sized from the 14-bar ATR and the position size comes from your risk percentage.
  • Two lab setups. First, an hourly environment where the agent chooses long, short or flat. Second, a 4-hour breakout engine with a trailing stop, where the agent only chooses to skip a signal, take it at half size or take it at full size.
  • Walk-forward testing. Train on the past, test on the next year, several random seeds per window, a final period you keep untouched.
  • Honest baselines. Buy and hold, a linear model, and a random-order version of the agent's own trades. An agent has to beat the random version, not just make money.
  • Reports in plain units. Percent per month on your deposit, the deepest drawdown in dollars, profit factor and the win rate counted from the real trade ledger.
  • A data-integrity gate that refuses a damaged price file, and a synthetic data generator so you can run the whole pipeline before you have your own history.

What it is not

It is not a signal service, not an expert advisor and not investment advice. You bring your own H1 price history (the MetaTrader 5 export format works). Python 3.10 or newer and the packages in requirements.txt are needed; no GPU is required.

Our own tests with it

How we used this same code on our own gold agents, step by step and with every number, is written up in the article We built an RL trading bot for gold: what the tests showed. The methods behind it (PPO, reward designs, a hidden Markov regime model, leak-free features) are explained in How we trained an RL gold bot: HMM, Sortino and PPO. The kit lets you run the same kind of tests on your own ideas.

Price and delivery

99 USD, one payment, personal-use licence, delivered as a zip file. Write to us on Telegram at t.me/fx4you_chat and we will send the payment details privately. If you would like us to test someone else's robot instead, see the strategy test report.

Risk

The kit is for research and education. Backtests are not real-account results and do not predict future returns. Trading leveraged products can lose more than you expect. You decide how to use the code and you are responsible for your own account.

Send it to someone who needs it:FacebookMessengerTelegramX

← All newsQuestions? Message us on Telegram