I Built a Gold Trading Bot That Retrains Itself with Claude & NotebookLM
I bolted a self-improving loop onto a free gold RL model. Now it trades XAUUSD live and retrains itself every week while I sleep.
Two days ago, I caught a headline.
Gold had dropped to its lowest level in months.
The same metal that printed an all-time high of $5,591 back in January was now sitting near $4,040.
It made me curious because I have been testing trading bots all year.
I built a Polymarket bot that made 2.1x in 18 days, a copy-trading bot that copies millionaires on Hyperliquid, and a crypto bot that hit a 77.8% win rate.
But I had never pointed any of this at gold.
One of the oldest currencies on earth, and I had no bot for it.
I am not a finance expert, so I did what I always do.
I went looking for someone who already cracked it.
I found a guy who trained a reinforcement learning model on 23 years of gold data. The same family of methods is used to train our LLMs.
He reports around 60% out-of-sample returns, and he gave away the code.
The prediction brain is his. I added the part he never built. Every week, NotebookLM grades the bot’s trades against trading books, and Claude retrains the model on the findings.
A dashboard shows me the live position.

The Gold Bot I’ve Built with Claude Code and Hermes
Let me first show you the dashboard, live.

At the top left, you see the portfolio. It started at $10,000.

In the middle, you see the current signal. It comes from the RL model, trained on 23 years of gold data.
On the right, the equity curve shows how the portfolio changes over time.
And below it, the gold price itself.
Every minute, the trained model reads the latest gold bars and decides. Long, Short, or sit this one out.
Every decision and every fill gets logged.
The dashboard is one window. The other is Telegram, where the bot reports its position every two hours.
Now, let me explain to you how the gold bot works.
How the Gold Bot Works

The whole thing runs on three pieces.
The bot.
Claude Code wrote it. Every minute, it reads the latest gold bars and takes the RL model’s call. Long, Short, or Hold.
The model wrote its own trading rules by running millions of simulated trades on 23 years of gold data.
I never touched the math.
The agent.
The bot lives on a Hermes agent on my Mac Mini.
Hermes runs it on schedule, sends the reports to Telegram, and keeps the trading journal, every decision and every fill.
The journal matters because the third piece reads it.
The notebook.
NotebookLM holds the library, trading books, and RL papers, and answers questions against them.
Once a week, Claude carries the journal into the notebook.
What comes out trains the model.
The weekly loop is the part that the other bots never had, so it gets its own section.
The Weekly Loop: It Retrains Itself with NotebookLM
Here is my NotebookLM notebook. It holds trading books and RL papers.

I customized it for one job. Reading weekly trade journals and answering hard questions about them.

Every week, a Claude routine runs the autopsy. No approval from me. It fires on schedule.

It carries the week’s journal into the notebook and asks the hard questions.
Where did the model bleed?
Which setups failed?
What do the books say the model should have done?
NotebookLM answers with three concrete changes.
Then the retrain. Claude takes those changes and retrains a second model, the challenger.

The changes stack week over week, so the challenger keeps evolving while the champion, the original bot, keeps trading untouched.
Setting Up the Gold Bot
You do not write any of this from scratch.
I packaged the whole thing into one folder. Five pieces. The trained RL model, the live loop, the weekly autopsy, the dashboard, and the connection skills.
You point Claude Code at it and answer a few questions. Three things you set up once. One, the bot. Two, the NotebookLM CLI. Three, the weekly loop.
Here is the folder.







