In the past week President Donald Trump has criticized Amazon five times over tax issues and CEO Jeff Bezos' ownership of the Washington Post, sparking a decline of more than 8 percent in the company's shares since the first tweet over three trading sessions.

But many of the companies Trump criticized on social media since his election victory thrived following his negative tweets.

For example Trump repeatedly attacked The New York Times including a tweet on Nov. 13. 2016.

Tweet Link



The media company's shares rallied about 90 percent through Wednesday versus the S&P 500's approximate 22 percent gain in same time period due to its strong earnings and digital subscription growth.



Defense companies have come under Trump's fire.

The president went after Boeing for its Air Force One price tag on Dec. 6, 2016.

Tweet Link



Boeing shares are up more than 110 percent since the post versus the S&P 500's approximate 20 percent gain. The White House reached a new deal with the company for two new Air Force One planes in February.

Lockheed Martin was also criticized by Trump for its F-35 "cost overruns" on Dec. 22, 2016.

Tweet Link

Its shares rallied about 35 percent through Wednesday versus the S&P 500's approximate 17 percent gain since the tweet.

To be sure, much of the gains for Boeing and Lockheed came after meetings Trump had with the chief executives of both companies to discuss his criticism.

The two stocks also benefited from Trump's budget, which increased defense spending by nearly $80 billion.

And not every company rallies after a Trump critique. Merck suffered after the president blasted the drug maker for its prices on Aug. 14, 2017



Tweet Link

Merck shares declined about 13 percent versus the market's 7 percent gain since the post.

But overall it seems Trump's attacks aren't materially affecting stock prices over the long run.

Trump may take more direct regulatory actions against Amazon. But using history as a guide, investors in the e-commerce giant shouldn't be too concerned.