An Amazon warehouse in Joliet, Ill. (Scott Olson/Getty Images)

The United States is now the second-most competitive economy in the world, climbing to an eight-year high in global rankings, according to an analysis published Tuesday by the World Economic Forum.

The latest edition of the Global Competitiveness Report, an annual ranking of 137 economies based on data from international financial institutions, moved the United States up from the No. 3 position to second place, just behind Switzerland.

Singapore, the Netherlands and Germany rounded out the top five spots.

“The strength of the United States comes from its performance in efficiency enhancers and innovation and sophistication factors,” wrote economists Klaus Schwab and Xavier Sala-i-Martín for the WEF, a Swiss group focused on promoting growth worldwide.

China crept up the rankings, as well, inching from 28 to 27, thanks to technological advances and reduced barriers to starting a business in the country.

India moved from 39th place to 40th but showed improvements in infrastructure and education, with more students connecting to the Internet, the report said.

The United States leads much of the world in higher education, job training, quality of companies, market size and technological capabilities. However, the country lags behind when scored for health and primary education, landing in 29th place, the report said. Australia, Canada, Belgium and Estonia all fared better in that department.

And the United States comes in at 83rd place for its macroeconomic environment, down from 71st last year, the index shows — a reflection of continued slow growth since the Great Recession.

China, the world's second largest economy after the United States, received a ranking of 17th for its macroeconomic environment.

“Successfully meeting institutional challenges relating to both public and private institutions, improving the macroeconomic environment and investing in human capital — particularly in the areas of health and primary education — will be crucial for the United States to maintain its position near the top of the competitiveness rankings,” the authors wrote.

The United States, along with other advanced economies, must continue to prepare for a coming wave of automation, which is expected to create a new crop of computer-related jobs while eliminating low-wage positions, the researchers pointed out.

The report is based on research and data from the World Bank, the United Nations and other international bodies. It also depends on feedback from a survey of more than 14,000 business leaders.

This year’s results don’t necessarily reflect the Trump administration's policies, since economic trends today are rooted in years-old policy decisions, the report noted.

The biggest barrier to conducting business with the United States, the survey found, was taxes, followed by regulations and inflation.

President Trump and Republicans in Congress are poised to unveil their tax plan on Wednesday. Few details were released Tuesday, but the proposals are expected to lower the corporate tax rate from 35 percent to 20 percent.

Alan Viard, a resident scholar at the American Enterprise Institute, a right-leaning think tank, said the U.S. corporate tax rate is among the highest in the developed world and could be preventing some foreign firms from setting up shop on American soil.

“There’s agreement in the tax policy community that we need to do something about that,” Viard said. “What to do about it does not produce the same degree of consensus.”

The WEF report also offered warnings, suggesting the White House should approach changes to the Dodd-Frank Act with caution. Trump has said he wants to “do a big number” on the financial reform law, which President Barack Obama signed in 2010 as a check to Wall Street’s power. The House moved to repeal the law in June, but the Senate has yet to introduce legislation intended to finish the job.

Weakening Dodd-Frank, the researchers wrote, “may lead to the re-emergence of fragilities that post-crisis regulation aimed to tackle.”

Robert Barro, an economics professor at Harvard University, said sustaining economic growth in the United States depends on a complicated mix of factors. Cutting the corporate tax rate and investing in infrastructure both items on Trump’s wish list would support prosperity, he said.

However, Barro said a protectionist trade policy — another core part of Trump's economic agenda — could hurt the economy.

Trump withdrew from the Trans-Pacific Partnership and has threatened to “rip up” the North American Free Trade Agreement, asserting that allowing factories to make goods more cheaply elsewhere destroys U.S. jobs.

“Being against free trade is comparable to being against better technology,” Barro said. “Trade can be assigned to places that are more efficient at doing stuff.”