Morgan Stanley used deep learning and artificial intelligence to study the text of its own analyst reports and has developed a market-beating trading strategy based on how computers read the author's sentiment.

For each of the brokerage's 41,758 company research reports from January 2013 to May 2019, Morgan Stanley's model produces a score reflecting how confident the artificial intelligence was that the analyst was bullish or bearish on the stock.

Buying after the notes that the AI was most certain were bullish tended to outperform the broader market. Later refining the analysis to only reports that include price target adjustments, the new Morgan Stanley model showed 9.6% outperformance between the group of stocks top-rated by the model and the lowest group.

"Rather than isolating key words as in existing sentiment models, we used a deep learning approach to analyze complete sentences," stock strategist Qingyi Huang wrote in a note to clients.

"Overlaying revised price targets helped us focus on critical market-moving events, while providing a sufficient number of opportunities for entering trades," Huang added.

The strategy showed a solid performance over the whole January 2013 to May 2019 backtest period, with a positive return in 2018 despite the market being down by 5%, according to the Morgan Stanley team.

Analysts at brokerages across Wall Street often remind clients of their opinions on the equities under their coverage, applauding those with improved performance and critiquing those with riskier outlooks. It is often up to clients to read between the lines on these reports if the analyst doesn't make an official change in his or her rating. Plus, analyst ratings don't always hold credibility with investors and traders. Many take a downgrade to "hold" as a sign to sell a stock. On Wall Street, "sell" ratings still remain rare.

Analysts can often reveal their true feelings toward a stock simply though their choice of words and Morgan Stanley's work now offers proof. Phrases like "great things," "definitely a plus" and "much better" can be read and loosely understood as nearly always positive by a deep learning platform. And that, in turn, can be leveraged, Huang wrote.