How AI Can Help You Increase Returns while Lowering Risk

By TradeSmith Editorial Staff

Listen to this post
As I covered in Monday’s issue of TradeSmith Daily, using advanced computers to analyze huge data sets is not a brand-new thing.

Data analytics allowed Jim Simons to become the most successful, highest-performing hedge fund manager of all time. It allowed the Boston Red Sox and Chicago Cubs to break long World Series droughts. It has allowed AI programs to defeat the world’s best chess and “Jeopardy” players.

For those of us steeped in the data science world, all that is familiar history. However, the relatively new development in data science is something called “machine learning.”

Machine learning is changing the world as you read this… and will change it even more in the years ahead.

Here’s how machine learning shaped the massive research project I mentioned on Monday.

The way traditional investment data analytics worked a decade ago, a human would think of a set of parameters he or she wanted to test and then would enter those parameters into a computer. There were predefined data rules to generate an output.

The computer would then perform a “test” of those parameters using past financial market data and analyze the results. If the results were great, you might implement the investment strategy in real life.

For example, you might want to “test” what kind of returns you would have earned in the past by buying when the stock market traded at a cheap 12 times earnings.

Or you could test what happens if you only own a stock index like the S&P 500 when it trades above its 200-day moving average.

Or you could test what happens if you buy when the stock market trades down to 12 times earnings and is above its 200-day moving average.

Over the years, people have tested hundreds of thousands of indicators and combinations of indicators.

The key here is that a human selected the strategy or “parameters” that were tested.

Machine learning flips this traditional script in a powerful way.

Instead of having a human select a set of parameters to test, machine learning asks a hyperintelligent computer program to select the parameters. The machine doesn’t require any predefined rules to generate a selected outcome.

The human simply suggests a desired outcome — like “find a reliable stock-picking method that does well with 30-day holding periods” — and then the machine crunches trillions of data points to determine whether it can create a useful system.

The machine can analyze single indicators. It can analyze two indicator combinations, three indicator combinations, and even multi-hundred indicator combinations. The combinations a machine can test are essentially endless.

For Project An-E, we loaded over 100 distinct variables into the machine learning program. Our goal was to create a system that has strong predictive ability over the short term (around 30 days). These data sets included macroeconomic data such as interest rates and inflation figures. We also included fundamental data like profit margins and price-to-sales ratios, as well as technical data like relative price strength and moving averages.

As I mentioned, we brought no preconceived notions or biases to the project. There wasn’t a fanatical fundamental investor on the team rooting for his strategy. There wasn’t a dedicated technical analyst rooting for her strategy.

We just gave the machine a desired outcome (find stocks poised to rise over the short term) and let it do the rest. We didn’t teach the program anything. It taught itself.

The results — which I’ll show you in a moment — are fantastic.

But at this point in the story, we need to quickly discuss a fascinating aspect of machine learning and how it creates brand-new ways of thinking about the stock market.

When designers of AI-powered chess-playing programs started testing their systems years ago, they noticed something peculiar about the strategies their programs employed. The AI programs tended to use strategies that human players would never come up with and, in many cases, would ridicule if they came from another human player.

For example, in chess, a player can “sacrifice” a key piece if he or she believes that sacrifice will lead to ultimate victory. Sacrificing pieces in the pursuit of ultimate victory has been a strategy in chess for centuries.

However, to the surprise of human players, AI chess programs often make sacrifices that seem bizarre and nonsensical. AI chess programs create wild and complex strategies humans would never think of. These AI-created chess strategies have been called “alien” and “chess from another dimension.” And they end up crushing human players.

AI chess programs make seemingly bizarre moves because they have the computational firepower to “see” much further into the future than a human can. They can analyze millions of potential outcomes and create multi-move contingency plans for each outcome… all in less than the time it takes a human to take a sip of water.

The chess strategies that AI produces aren’t actually bizarre. With its ability to analyze millions of possible outcomes, AI’s moves make sense. They only seem bizarre compared to the primitive and unimaginative strategies that the feeble human brain, with its poor computational ability, can make.

Even a chess super genius, such as the legendary Garry Kasparov, has just a fraction of the computational ability an AI chess program has. It’s not even a contest.

Knowing this fascinating aspect of AI, our team was not surprised to see that our AI-powered stock market data analysis produced a specific type of trading strategy that most people would be very surprised by.

As I mentioned, we gave the computer a huge variety of data sets to work with. Macroeconomic data. Company-specific fundamental data. Technical analysis data.

We expected to find a telling indicator — something that would matter more than the other factors.

Maybe it would be momentum.

Maybe stock fundamentals.

But as I said, sometimes the moves can seem bizarre to the human mind.

And it so clearly demonstrates the futility of picking stocks with the human brain instead of with a super-intelligent computer.

We found that while some factors matter more than others, An-E doesn’t stick to one generalized course over time.

Sometimes the best-performing stocks over a 30-day period have strong momentum.

Sometimes the best are severely oversold.

Sometimes the best are boosted by shifting macroeconomic indicators. To the computer, there are no biases based on previous successful strategies. It simply analyzes the data and produces the prediction for the best outcome.

There is no chess player with favorite moves. No stock analyst who picks based on fundamentals alone, or who favors only momentum stocks.

With the human element removed, the system freely ranks based on the data analysis regardless of where it leads.

What Our Results Look Like

After the machine created its strategy by analyzing 15 years of historical data, we analyzed the results it would have produced in various time frames in different market environments.

Our program analyzes hundreds of stocks and ranks them every day on its expectation of what the stock will do over the next 21 trading sessions.

Stocks with a high likelihood of going up are ranked in the top decile (1).

Stocks with a high likelihood of going down are ranked in the lowest decile (10).

Here are the results of the system over a five-month time period.

Decile Prediction Count Avg. Prediction Avg. Return % with Gain
BEST → 1 5,768 +5.95% +5.59% 65.5%
2 5,767 +4.37% +5.55% 69.2%
3 5,767 +3.78% +4.40% 67.3%
4 5,767 +3.38% +3.33% 63.3%
5 5,768 +3.03% +3.46% 63.9%
6 5,767 +2.68% +3.37% 64.9%
7 5,767 +2.35% +2.68% 62.1%
8 5,767 +2.04% +1.29% 55.6%
9 5,767 +1.68% -0.13% 48.8%
WORST → 10 5,768 +0.91% -3.26% 33.7%
Grand Total 57,673 +3.02% +2.63% 59.4%



As you can see, stocks in the top decile tend to go up over the next 21 days, while stocks in the lowest decile tend to go down over the next 21 days.

The average annualized return of top-tier stocks is 92.1%, while the average annualized return of bottom-tier stocks is -32.8%.

This is a strong, statistically significant set of results. We believe it can provide you with a big edge in the markets.

Proprietary trading algorithms like the one we’ve developed can be worth their weight in gold. They are the financial equivalent of closely guarded recipes like Coca-Cola and Heinz ketchup.

We don’t want someone replicating our strategy and “front-running” our trades, so I can’t tell you the exact makeup of our program.

But next time, I’ll explain why this kind of technology is not only desirable but, frankly, necessary as we move into an AI-dominated future.