Facial recognition can be used for things like capturing criminals, tagging photos on social media platforms, and figuring out if hospital patients are in pain. One professor thought that he could take this software development a step further, which is why he created facial recognition software to read CEOs’ minds.

An assistant finance professor at University of Central Missouri, James Cicon, built software that analyzed video of the faces of Fortune 500 executives for signs of emotions like fear, anger, disgust or surprise. He found that emotions correlated with profit margins, returns on assets, stock price moves, and other measures of performance for their companies, according to a report in the Wall Street Journal.

(Related: MIT researchers are working on object recognition through AI)

Cicon and his colleagues scanned more than 200 videos of CEOs and former CEOs of companies like Citigroup, ConAgra Foods, FedEx and Macy’s. These videos included media interviews and footage shot during quarterly earnings calls.

Having fear, anger, and disgust are considered negative emotions, but Cicon found these emotions correlated positively with financial performance.

“CEOs whose faces during a media interview showed disgust—as evidenced by lowered eyebrows and eyes, and a closed, pursed mouth—were associated with a 9.3% boost in overall profits in the following quarter,” the report said. “CEOs who expressed fear—raised eyebrows, widened eyes and mouth, and lips pulled in at the corners—saw their companies’ stock rise .4% in the following week.”

Fear is recognized as a powerful motivator, which is why a CEO who appears fearful under interrogation is perceived by the market as a CEO who will work harder to increase firm value, according to research by Steve Ferris of the University of Missouri, and Ali Akansu and Yanjia Sun of the New Jersey Institute of Technology.

Cicon’s approach to analyzing emotions based on facial imagery dates back to the 1970s. A psychologist named Paul Ekman developed more than 5,000 micro-expressions that signal feelings across human culture. He tried to prove that facial expressions betray emotions that run counter to people’s words, so, a person might say that they liked something while their facial expressions say otherwise.

Cicon hopes that eventually he can teach the software to measure degrees of sincerity or truthfulness, although accuracy is currently an issue. He said that his emotion coding system is 90% accurate, but software inspired by his work hasn’t been tested independently, according to the WSJ.