President Trump escalated his verbal volleys with North Korean leader Kim Jong Un on Friday, but key market indexes held steady as one of the worst stock weeks since the election eked out a tiny gain.

Markets defied gravity even as Trump issued perhaps his most provocative challenge yet to Kim, saying in a morning tweet that “military solutions” were “in place, locked and loaded,” and urged the North Korean leader to “find another path!” The Dow Jones industrial average of 30 major U.S. companies began the week at 22,100 and dropped 1.06 percent to notch it’s second-worst week of the year.

[A first lesson in the stock market: Don’t run from a good sale]

The Dow, Standard & Poor’s 500-stock index and technology-heavy Nasdaq rebounded slightly on Friday. But so did gold, which is the go-to asset for investors seeking a haven from international crises.

The North Korean tensions, so far at least, appear not to have crossed the threshold into a likelihood of war even as the U.S. president threatened that country with “fire and fury like the world has never seen” if it continues its development of an intercontinental nuclear missile capable of striking U.S. shores.

North Korea responded that it was preparing to fire four missiles near the U.S. Pacific territory of Guam, where America has military assets.

Traders said markets would be much worse if people thought that a conflict was at hand.

“The market isn’t pricing in a war with North Korea,” said Jeffrey Carbone, managing partner of Cornerstone Financial Partners in Charlotte, N.C. “If markets thought we were going to war with North Korea, they would be down 10 to 15 percent.”

[What’s behind the Dow’s stunning rise to 22,000]

David Kass, a finance professor at the University of Maryland, said “there is an expectation that the (Korean) crisis will be resolved diplomatically. Markets go down in the short run on fear of the unknown, such as whether a military confrontation between the U.S. and North Korea could occur. But crises eventually do get resolved and markets recover and go on.”

The VIX, a widely followed fear gauge, leaped on news of the evolving Korean peninsula crisis.

But it was difficult to say any one event caused the market pullback. Earnings season is winding down with some missed estimates, against a backdrop of high market valuations. The Walt Disney Company saw shares drop on disappointing earnings and the announcement that it would begin streaming content to deal with continuing pressure on its sprawling television business.

Macy’s, Kohl’s and J.C. Penney, all struggling mightily to revive their businesses, reported lackluster earnings.

“We were coming into the week at record highs,” said Jeremy Glaser, Morningstar.com’s markets editor. “Where there are signs things are less than perfect, we should not be surprised to see a sell-off. High valuations are more susceptible to potential corrections.”

[Turmoil over recent Trump controversies triggers the Dow’s biggest loss since September]

Bond trader’s Jeffrey Gundlach contributed to the fear factor after he predicted the priced-for-perfection S&P 500 — which has been breaking new records — will drop 3 percent by the end of the year.

Trump further stoked the uncertainty with a domestic war of words with Senate Majority Leader Mitch McConnell. The president taunted the Kentucky Republican for the failure of the GOP-led Senate to pass legislation to repeal Obamacare.

The extraordinary rise of the stock markets since 2009, and especially this year, has come courtesy of a trifecta of robust profits at big companies, low interest rates and a rare alignment of improving economies in the developed world.

So far, those have been more powerful forces on stocks than world events such as North Korean nuclear missile tests, Venezuela’s economic and political meltdown, or legislative gridlock in Washington.

“Markets have shrugged everything off,” Washington investment manager Michael Farr said. “Bull market psychology dismisses bad news and embraces good news. They shrugged off terrorist attacks in Paris and London, the mother of all bombs in Afghanistan. People forget the 59 missiles we launched into Syria. There is upheaval in Venezuela. Nobody cares anymore.”

[Macy’s, Kohl’s earnings are less terrible than feared]

Traders said Fridays in August are not a good judge of markets because they are unpredictable and historically light-trading days, with many senior money managers away on weekends or on vacation.

“Friday is a good lesson that timing the market is really hard,” Morningstar’s Glaser said. “You see these (Trump) comments, you think it’s going to have a huge negative impact. In fact, it’s just the opposite. The market weighs a lot of different things and it’s just too challenging to try to figure out on any given day what is going to happen.”

Carbone said August is historically the worst months for stocks, but investors are already looking ahead.

“The question I am hearing from clients is where are markets headed,” Carbone said. “If we knew, I would be on my yacht and cruising St. Tropez.”