The global economy is doing great ... for now

Global economic growth is in full swing, but the party could come to an end in a couple of years.

The World Bank just upgraded its forecast for this year after a stronger than expected 2017.

Countries around the world are experiencing a broad upturn that's expected to last for "the next couple of years," the bank said Tuesday in its latest Global Economic Prospects report.

It predicts the global economy will expand 3.1% in 2018, up from the 2.9% it previously forecast in June. That's also faster than the 3% growth the world managed last year, according to the bank.

The growth spurt has been helped by a turnaround in tradeyears of low interest rates and a rebound in oil prices, which have all boosted confidence, according to the bank.

This year will be the first since before the global financial crisis that the world's economy is running at almost its full potential, the report said. That means unemployment is low, productivity is high and inflation is in check, leading to a surge in demand for goods and services among consumers.

But the report warns that growth may soon peak and then start tailing off in 2019 and 2020 as big economies like the U.S., China and the European Union begin to cool.

china global economy trade