US.stocks climbed on Wednesday as investors cheered a report of stronger economic growth.
Technology companies, retailers and travel providers all made solid gains.
The Commerce Department raised its estimate for economic growth and said the US gross domestic product (GDP) grew at its fastest pace in two years between April and June.
Stocks were wobbly at the outset, but investors' concerns about tensions between the US and North Korea appeared to ease and stocks moved higher as the day wore on.
Along with technology companies and consumer-focused firms, health care companies and banks finished higher.
Big names such as Microsoft, Amazon and Facebook made some of the biggest gains.
"For all the tough times we've had the last couple of weeks, the thing that's kept the market afloat is the strong economic data," said Brent Schutte, chief investment strategist at Northwestern Mutual Wealth Management.
With more economic reports coming over the next few days, Mr Schutte said investors will be looking for evidence of higher pay and greater inflation, and said stocks should keep rising as long as the economy remains in good shape and inflation does not pick up.
The Standard & Poor's 500 index climbed 11.29 points, or 0.5%, to 2457.59. The Dow Jones industrial average picked up 27.06 points, or 0.1%, to 21892.43.
The Nasdaq composite gained 66.42 points, or 1.1%, to 6368.31 as technology companies rose for the third day in a row. The Russell 2000 index of smaller-company stocks added 7.64 points, or 0.6%, to 1391.32.
The government raised its GDP projection from last month, and the second-quarter estimate is much better than the first quarter, when growth was 1.2%.
Meanwhile, private businesses added 237,000 jobs in August with broad gains across several industries including construction, manufacturing and leisure and hospitality, according to a survey by payroll processor ADP.
Chipmaker Analog Devices advanced after it announced strong results in the third quarter along with a better-than-expected revenue forecast for the current period.
Its stock jumped 4.17 dollars, or 5.2%, to 83.72 dollars.
Microsoft gained 96 cents, or 1.3%, to 74.01 dollars and Facebook picked up 1.87 dollars, or 1.1%, to 169.92 dollars.
Amazon rose 13.53 dollars, or 1.4%, to 967.59 dollars, and Bank of America climbed 41 cents, or 1.7%, to 23.87 dollars.
Gasoline prices spiked to two-year highs and oil prices continued to fall as the Gulf region was inundated with rain by Tropical Storm Harvey, which has knocked out significant oil drilling and refining capacity.
On Tuesday the largest oil refinery in the US was shut down and the operator of a major pipeline carrying fuel to the East Coast said it was running at a reduced rate.
The tropical storm has dumped a record amount of rain on the Gulf Coast. It made landfall again in Louisiana overnight.
Authorities say more than 20 people have died in the storm and more than 32,000 people were in shelters in Texas alone.
Wholesale gasoline rose another 10 cents, or 5.7%, to 1.88 dollars a gallon.
Benchmark US crude lost 48 cents, or 1%, to 45.96 dollars a barrel in New York while Brent crude, the international standard, fell 1.14 dollars, or 2.2%, to 50.86 dollars a barrel in London.