NEW YORK (AP) -- Stocks around the world climbed on Thursday, and U.S. indexes hit records as markets continued a rally sparked after the United States and Iran appeared to step away from the edge of war.
Money flowed into riskier investments, such as technology stocks, and trickled out of traditional hiding spots for investors when they're nervous, such as gold. A measure of fear in the stock market had its largest drop in a week.
Stocks have been rallying since Wednesday, after investors took comments from President Donald Trump and Iranian officials to mean no military escalation is imminent in their tense conflict. It was a sharp turnaround from earlier days, when markets tumbled on the threat of war after the United States killed a top Iranian general in a drone strike.
The S&P 500 rose 21.65 points, or 0.7%, to 3,274.70 and surpassed its record set last week. The Dow Jones Industrial Average climbed 211.81 points, or 0.7%, to 28,956.90, and the Nasdaq composite rose 74.18, or 0.8%, to 9,203.43. Both also hit records.
Diminishing worries about a U.S.-Iran war put more of the market's focus on the economy, corporate profits and other inputs that directly affect stock prices.
"The market is in pretty solid shape," said Matt Hanna, portfolio manager at Summit Global Investments. "We could see some volatility in the beginning of 2020" following a well-worn path of choppy first halves for stocks during presidential election years, "but we don't see any sort of recession on the horizon."
Across markets, worries about a recession have faded since last year as central banks cut interest rates and pumped stimulus into the global economy. The United States and China also moved toward an interim deal in their trade war. China confirmed on Thursday that its chief envoy in tariff talks with Washington will visit next week to sign their "Phase 1" trade deal.
The spotlight will move next to Friday's labor report, and economists expect it to show employers added 160,000 jobs last month. They also forecast the unemployment rate to hold at its low level of 3.5%. The numbers are key because a strong job market has been propping up the economy and allowing U.S. households to continue to spend, even as manufacturing weakens due to tariffs and trade wars.
Technology stocks powered to the biggest gains in the S&P 500 and accounted for more than a third of the index's gain. Apple's 2.1% rise added momentum, and Advanced Micro Devices rose 2.4% for one of the larger gains in the S&P 500.
On the losing end were shares of several big retailers. Kohl's fell 6.5% for the largest loss in the S&P 500 after it reported weaker sales during the holiday season versus a year earlier. Bed Bath & Beyond plunged 19.2% after its results for the latest quarter fell well short of analysts' expectations.
Asian stock markets jumped on the heels of Wednesday's rally, which really took hold after trading had closed in the region.
Japan's Nikkei 225 leaped 2.3%, Hong Kong's Hang Seng jumped 1.7% and South Korea's Kospi rose 1.6%.
European markets also gained, but more modestly. Germany's DAX returned 1.3%, and France's CAC 40 added 0.2%. The FTSE 100 in London rose 0.3%.
The yield on the 10-year Treasury dipped down to 1.86% from 1.87% late Wednesday.
Gold fell $5.70 to $1,551.70 per ounce as investors felt less need for safety. It was the second drop in a row for the metal, following 10 straight days of gains.
In other commodities trading, benchmark U.S. crude slipped 5 cents to settle at $59.56 a barrel. Brent crude, the international standard, fell 7 cents to end at $65.37 a barrel. Wholesale gasoline was little changed at $1.65 per gallon. Heating oil fell 1 cent to $1.95 per gallon. Natural gas rose 3 cents to $2.17 per 1,000 cubic feet.
Silver fell 23 cents to $17.86 per ounce, and copper fell 1 cent to $2.81 per pound.
The dollar rose to 109.52 Japanese yen from 109.22 yen on Monday. The euro fell to $1.1106 from $1.1111.