Despite escalating trade tensions and slowing growth around the globe, the U.S. stock market just had its best first half of the year since 1997.

The S&P 500 has risen 17 percent since the start of the year, the biggest gain for the first six months of the year in over two decades. The broad index of stocks saw its best June since 1955.

The Dow Jones Industrial Average rallied 7.2 percent in June, its best June since 1938, when it rose 24.3 percent.

Stocks have been boosted by the continued strength of the U.S. consumer, itself bolstered by a very strong labor market. As well, the Federal Reserve has signaled that it will likely cut rates later this year to stave off economic sluggishness around the globe and any drag coming from trade disputes.

President Trump tweeted about the strength of the stock market on Friday.