How to Test a Trading Hypothesis With AI

From idea to data to indicator — in less than an hour

AI is pretty good at doing a lot of the legwork you’d otherwise have to do yourself… or pay someone to do.

Data analysis. Indicator coding. That kind of thing.

And even though you should always check for mistakes (it makes some corkers!), it can be surprisingly good at giving you solid ideas and frameworks to work with…

In less than an hour, you can test a hypothesis and write an indicator to help you properly backtest and trade it.

Now that’s cool af… (as the kids say, oh wait, no kids don’t say cool anymore)

Let’s look at the steps…

STAY FOCUSED

What’s your hypothesis?

It could be anything.

“Do pairs that trend on a Tuesday follow through on a Wednesday?”
“Does a wide Asian session indicate a narrow London?”
“Do Sunday night FX gaps fill?”
“Does the Bollinger Band Thief strategy work?”

Even a strategy you’ve read about… like Linda Raschke’s Holy Grail. 

Once you have your hypothesis, you can work with Claude or ChatGPT to figure out the testing process. (I find Claude better right now)

eg:

Let the LLM guide you on how to test it. 

Some ideas are easy to test; others need a bit more input. In this case, the stumbling block is “what do you define as a trending Tuesday?”… but it’s easy enough to figure out with some thought and idea brainstorming.

Then head to TradingView and download the OHLC data for the appropriate timeframe in CSV format using the Download Chart Data button.

Upload it to Claude…

It will even visualise the data for you… like Claude did here for my ORB testing query.

The sky’s the limit…

Notwithstanding my words on checking for errors… You can now finally put some logic and data behind your observations or theories.

  1. Hypothesis. 
  2. Upload data in CSV format. 
  3. Interrogate and probe. 
  4. Done.

And if you want to take it one step further… you can even get an indicator coded up for your trading platform to test the idea properly.

For example, getting Claude to code me up an indicator for TradingView to test the Bollinger Band Thief strategy

Claude made this first time…

Even came up with user input variables for the stop loss and take profit parameters. Perfect if you want to actually see the play on the chart, not just in a spreadsheet.

Pretty wild times to be a trader!

Happy testing.