The U.S. economy gained momentum in 2017, but growth slowed at the end of the year.

The economy grew 2.3% for the year, the Commerce Department said Friday. That's well ahead of the 1.5% growth in 2016, but slower than 2015. It's also below the 3% target President Trump has set for his first term.

Overall, the economy is healthy. Americans are shopping, businesses are investing, and the stock market is booming. Consumer confidence is the highest since 2000, unemployment is the lowest in 17 years, and the country has added jobs every month for more than seven years.

But some things are still holding the economy back.

A major increase in imports at the end of the year -- the biggest since 2010 -- pushed down growth because it increased the U.S. trade deficit. Some of that was offset by solid consumer spending, the main engine of U.S. growth.

Business investment didn't rise as quickly at the end of the year. And inventories are high: Businesses still have a lot of products sitting on shelves in back rooms. That tends to ebb and flow every six months or so.

For the year overall, the economy started sluggish, picked up considerably in the spring and summer, and then slowed a bit in the fall.

For the final three months, the economy grew at a 2.6% annual rate. Federal government spending helped: It rose at the fastest pace in seven years, led by a surge in defense spending. But the economy was growing at a 3% pace or better for the previous six months.

Related: Davos loves the Trump tax cuts

Trump and other Republicans sold their tax cut last year by saying it would create jobs and boost growth even more. Many economists expect that the tax cuts could help boost growth this year, but that growth will gradually slip back to 2%, where it has hovered since the Great Recession.

One big question mark for economic growth is Trump's trade policy.

The administration announced tariffs this week on imported washing machines and solar panels, a move seen by some experts as a harbinger of tariffs on other things, like steel and aluminum.

Related: LG is raising washing machine prices due to new Trump tariff

Trump's trade team is also renegotiating NAFTA, the trade pact between the United States, Canada and Mexico. Trump has threatened to withdraw altogether if negotiations don't produce a deal he thinks will create American jobs.

Experts say that if Trump takes drastic, protectionist steps on trade, it will hurt economic growth by raising consumer prices and cooling spending.

The administration emphasized at the World Economic Forum in Davos, Switzerland, that it does not have a protectionist trade policy and is only trying to level the playing field.