What I’ve Learned from Creating Strategies with AI

I currently trade a variety of strategies, many of which use machine learning and AI as a significant component.

Some of the strategies were built using AI while others include AI directly in the execution of the trades.

In the decade or so of using these techniques, I’ve learned valuable lessons about how best to use AI in trading.

What surprised me, however, was how much the lessons apply to creating profitable trading strategies in general.

In this post, I’ll share some of the lessons I’ve learned from creating these strategies you can apply to your trading.

Feature Selection is Everything

Feature selection, or determining which indicators should be included in your model, is the most important aspect of creating a successful strategy.

Most of your energy will be spent figuring out which indicators your model is allowed to consider.

The features you leave out are as important as the ones you include.

Features Should Be Minimally Correlated

When you add a feature to your model, make sure there is minimal correlation with another feature already in the model.

The model will get worse if you include features that are highly correlated with other features.

For example, let’s say you include a feature for Distance from the 50 Day Moving Average which seems to improve your model.

Adding a feature for Distance from the 200 Day Moving Average will likely worsen the model. Even if it seems it’s capturing something different than the 50 day moving average, those features will be statistically strongly correlated.

Having Too Many Trading Rules Is Terrible

When you add trading rules, you always risk significantly deteriorating the strategy.

This is how curve fitting occurs – adding a trading rule that doesn’t tell a coherent story.

When deciding whether to add a trading rule to your strategy, pretend you have to justify it to an experienced and skeptical trader.

Does the trading rule truly make sense?

Even if it improves the strategy, does it pass the sniff test?

In my experience, most traders are too quick to add trading rules to their strategy that don’t tell a coherent story.

As a result, their trading strategies are far less robust than they could be.

Add a Random Variable as a Control

One way to get better at creating strategies is a technique I accidentally stumbled upon.

Several years ago I was analyzing a backtest and decided to add a rule based on an indicator that seemed to improve the strategy significantly.

After trading the strategy for a while and reconciling my live results with the backtest, I realized that there was an error in the way I was collecting the data that this particular rule was based on.

As a result of this bug, the data for this indicator was just random noise.

And yet, when I originally examined the data it seemed to have a strong effect! I was fooled.

I realized, though, that purposefully adding a random variable to your backtest is an excellent quality check for your process.

If in the process of analyzing your data, your random variable starts appearing as being “important”, then you know you’re likely “torturing your data” too much.

A random variable has no predictive value to your strategy, so if it appears in your analysis it is a huge red flag.

Do you use AI in your trading or have you made attempts that didn’t seem to work? Reach out and let me know – I’m happy to share notes and point you in the right direction.

Leave a Reply

Your email address will not be published. Required fields are marked *