(Bloomberg Markets) -- Machine learning is enabling investors to tap huge data sets such as social media postings in ways that no mere human could. Yet, despite the enormous potential, its record remains mixed. The Eurekahedge AI Hedge Fund Index, which tracks the returns of 13 hedge funds that use machine learning, has gained only 7 percent a year for the past five years, while the S&P 500 returned 13 percent annually. This year the Eurekahedge benchmark dropped 5 percent through September.

One of the potential pitfalls for machine learning strategies is the extremely low signal-to-noise ratio in financial markets, says Marcos López de Prado, who joined AQR Capital Management as head of machine learning in September and is the author of the 2018 book Advances in Financial Machine Learning. “Machine learning algorithms will always identify a pattern, even if there is none,” he says. In other words, the algorithms can view flukes as patterns and hence are likely to identify false strategies. “It takes a deep knowledge of the markets to apply machine learning successfully to financial series,” López de Prado says.

Nigol Koulajian echoes that view. The founder and chief investment officer at Quest Partners, a New York-based systematic macro hedge fund that manages $1.7 billion, says that quants coming out of finance programs and high-tech companies often expect to create optimizations at a much higher level of precision than is warranted in finance. “They’re coming with a mindset that we’re going to conquer the world with big data,” Koulajian says. In finance, though, the market regime is not static, and markets aren’t closed systems like a chess game. “You can have one little pin drop that can basically make you lose over 20 years of returns,” he says.

Consider one risk-on strategy that had worked well in the decade since the financial crisis: bottom-fishing equity indexes. “Everyone’s buying the dips,” Koulajian says. “There are all these people who have learned to basically suppress the vol,” or volatility. If you use machine learning, you can implement dozens of versions of this strategy. The risk, according to Koulajian, is that the relentless bull market that made such strategies work so well was driven by central bank liquidity—and that’s being pulled away now. Meanwhile, skew, a measure of tail risk, is implying the S&P 500 could fall 30 percent, Koulajian says: In August, the CBOE Skew Index, which tracks out-of-the-money index options, reached a record high. If you’re buying the dips with machine learning, Koulajian says, it’s easy to congratulate yourself on using much more complex model optimization and lose sight of the larger risks.

Machine learning isn’t really new, says Robert Frey. Frey in the late 1980s started a hedge fund that was absorbed a few years later into Renaissance Technologies, where it became the nucleus of the statistical arbitrage strategy in the enormously successful Medallion Fund. “You hear all this stuff about machine learning and AI,” Frey says. “Most of those techniques, however, have been around for decades—and we, in fact, used a lot of them at Renaissance,” he says. “The fundamental processes that we’re talking about here are a combination of advanced statistics—computationally intensive statistical analysis—and then the neural-network-type branch where you’re looking at these models, which are basically classifiers.”

After retiring from Renaissance in 2004, Frey started the quantitative finance program at Stony Brook University and opened a family office, which became FQS Capital Partners LP. At FQS, Frey uses machine learning techniques to evaluate hedge funds, focusing on modeling their underlying behavior and tying it back to systematic market and economic trends.

Stephen Cucchiaro is another longtime user of machine learning techniques. The president and CIO of 3Edge Asset Management LP, a Boston-based exchange-traded fund strategist that oversees $850 million, started off managing portfolios of ETFs in 1994 with the observation that capital markets represent a nonlinear complex system, which was exactly what he’d studied in the branch of mathematics called system dynamics. Cucchiaro says trying to tease out relationships from correlations in market data is a fool’s game. “No scientist or engineer would ever use correlation analysis for analyzing a nonlinear complex system of interrelated variables,” he says, “because those correlations are often nothing more than statistical coincidences, not true cause-and-effect relationships.” 3Edge’s model is based on causal factors that are regime-dependent and nonlinear, and the firm uses algorithms derived from AI to search for optimizations that also take into account key portfolio characteristics. “Our end solution is very different from more traditional AI approaches since we end up with a model that provides us with not only a prediction of market behavior but also an explanation of why,” Cucchiaro says.

Jamie Wise, chief executive officer at Periscope Capital Inc., a $250 million Toronto hedge fund, says there’s a general idea out there that AI is all-knowing and that it’s going to take all of our jobs. Yet after developing a strategy that uses neural networks and machine learning, he sees it in considerably more mundane terms. “It’s really just a tool—and it’s a very task-specific tool, too,” he says.

How Wise got into it goes like this: About six years ago, he looked at how people were posting on social media about restaurants and hotels and observed that they would likely start talking online about stocks and investment portfolios in similar ways.

So Wise asked himself what his firm could do with that. “The exciting concept for us was this idea of measuring sentiment directly at the individual stock level,” he says. Sentiment is obviously a key driver of stock prices, yet it’s typically gauged indirectly through proxies such as put-call ratios, inferred from a comment by someone on TV, or tracked with a lag in surveys. “Intuitively, sentiment has these predictive measures, but we could never measure it for stocks,” he says.

So Wise’s firm began researching stock chat rooms. At first, he says, they found a lot of what you might expect: Stock promoters touting thinly traded, small-cap, pump-and-dump candidates. But then the conversation started to grow. “StockTwits was a really big part of that,” Wise says, referring to the social network for investors and traders that started in 2008. “So was Twitter.” In 2012, Twitter added cashtags—$ followed by a ticker symbol—to tag tweets related to a given company. That led to more people posting about their stocks on the platform, Wise says. “And the bigger the stock, the more likely it was that people were talking about it,” he says.

To develop an investment strategy based around that conversation, Periscope hired three people with backgrounds in natural language processing and machine learning. It was important to build from scratch, Wise says, because models trained on hotel reviews, for example, wouldn’t know what to make of a comment like “XYZ going to 50.” By itself, such a statement has no clear positive or negative meaning. “But you and I know that that can be clearly positive or clearly negative depending on where the stock was when that person said that,” he says. “Then it’s really easy.”

The firm’s neural network was thus trained so when a tweet, blog posting, or comment went in, a sentiment score would pop out. Once the model was up and running, Wise says, another question emerged: How to build a portfolio based on that?

In contrast to sentiment-based strategies that seek to jump in and trade based on, say, a spike in social media postings, Periscope took a longer view. Its first criterion was that a stock had to have a certain breadth of conversation to be eligible for the portfolio. “The way I think of sentiment is like an ocean,” Wise says. Once you have big enough volume of posts on a given stock on a regular basis, there can be an ebb and flow to the aggregate sentiment they express. “If you can identify some kind of wave building in the ocean,” Wise says, then it should carry forward for some amount of time. “But it won’t be hours—it will probably be weeks, maybe even months.”

Wise’s intention for this strategy was to implement it in a hedge fund, which opened in May this year. But along the way, as a proof of concept, he also started an ETF based on the approach. The $11 million BUZZ US Sentiment Leaders ETF has returned an average of 21 percent a year from inception in 2016. It gained 25 percent this year through Oct. 5.

Consider this: The ETF held 75 stocks. Sixty-four of them were included in the S&P 500 Index, yet the ETF almost doubled the performance of the S&P 500 this year, according to Bloomberg data.

So what are some of the best uses of machine learning in finance? López de Prado has a couple of favorites. One is factor investing. “Traditionally, econometric—linear regression—methods have been deployed to find investment factors,” he says. “There is no reason to believe those factors must be linear, hence it is very likely that new factors will be found in the near future that respond to nonlinear effects.”

Another is portfolio construction. “Machine learning algorithms can model complex data structures much better than Markowitz-style solutions—and yield superior performance out-of-sample,” he says, referring to the mean-variance model of portfolio construction developed by Nobel laureate Harry Markowitz.

Finally, in a bit of jiujitsu, given the risk of finding spurious patterns in data, machine learning can also be used to detect false strategies, says López de Prado. “Most empirical discoveries in finance are false, particularly when they lack economic intuition. The culprit is backtest overfitting,” he says. “Machine learning can help determine the probability that an investment strategy is false.”

While machine learning and AI are becoming more and more ubiquitous, investing is still a challenging area to apply such techniques, López de Prado says. Beating the collective wisdom of the crowds is much more difficult than recognizing faces or driving cars. “My dog can recognize faces,” he says. “My teenage daughter speaks three languages. I would not entrust my savings to either of them.”

Asmundsson is GO editor of Bloomberg Markets.

To contact the author of this story: Jon Asmundsson in New York at jasmundsson@bloomberg.net

To contact the editor responsible for this story: Christine Harper at charper@bloomberg.net

©2018 Bloomberg L.P.