President Donald Trump's tweets hit the market's perception of a stock for a day or so, but over time the impact is more mixed, analysis shows.
S&P Global Market Intelligence found that Trump's tweets do affect the way markets perceive the credit quality of companies he targets, at least in the short term.
For example, in early January, Trump threatened Toyota with a border tax if the automaker built a new plant in Mexico. The next day, perceived probability of default for the company jumped 26.2 percent from what markets had expected a day before the tweet, according to analysis from Jim Elder, director of risk services at S&P Global Market Intelligence.
Credit risk measures how likely it is that a company will default, or fail to pay back its debt.
On the flip side, positive Trump tweets improved market perceptions of credit risk. In late November, Trump praised United Technologies subsidiary Carrier for keeping jobs in Indiana, and S&P found the company's perceived probability of default fell 17.5 percent.
"Companies have to be concerned about" being the target of a Trump comment or tweet, said Larry Hatheway, chief economist and head of GAM Investment Solutions, an asset management firm. "Their reputation and other things are certainly at stake."
"Companies will probably also view this as an opportunity to be proactive," he said.
A company's response or a fact-check can often mitigate the market effect of a Trump mention.
S&P's Elder pointed out that Boeing's stock recovered from a 1 percent dip in December after the aircraft maker said contracts Trump criticized were worth about $170 million, far below the $4 billion figure Trump had stated.
Hatheway said that in the longer term, companies' business fundamentals are what will matter: "Ultimately what investors will be focused on is the core business models of these companies, whether they can growth their business," he said.
That said, some stocks clearly stay under pressure after a Trump tweet.
Lockheed Martin shares fell nearly 2.5 percent the day Trump slammed the company for the cost of its F-35 warplanes, and shares are 3.5 percent lower since that time, according to analysis using Kensho. Toyota shares fell 0.6 percent the day Trump slammed the automaker in January for saying it would build a plant in Mexico, and shares are 5.1 percent lower since then.
— CNBC's George Manessis contributed to this report.
Disclosure: NBCUniversal, parent of CNBC, is a minority investor in Kensho.