U.S. stocks were on a first-class ride into record territory in 2017. But they weren't alone.
The value of public companies on global stock markets grew by $12.4 trillion in 2017, according to S&P Dow Jones Indices, which included dividends in its calculation. A number of markets even outperformed the U.S.
Here's a look at the biggest stock market winners of 2017:
The United States
U.S. stocks were front and center as investors bet on strong economic growth, solid corporate earnings and hopes that President Trump would roll back regulations. Trump also boosted markets with a big corporate tax cut.
Argentina's Merval index surged 77% this year and hit a record high in the final week of 2017.
The election of President Mauricio Macri in late 2015 proved to be a turning point: The economy is growing and stocks have rallied strongly. The Merval gained 45% in 2016.
Macri pursued a number of economic reforms this year, helping to further boost business confidence.
"President Macri navigated political risks well in 2017, and with no elections scheduled in 2018, Argentina actually stands out as a political safe haven in Latin America for the year ahead," said asset management firm Algebris Investments.
Still, there's more to be done: Inflation is above 20% and the currency continues to weaken.
The Nigerian All-Share index is still miles below record highs set in early 2008, but a 42% rally in 2017 has helped to close the gap.
But oil prices have moved higher, the central bank has made it easier to swap currencies and the economy has snapped out of recession, explained Zin Bekkali, founder and CEO of Silk Invest.
Many analysts are optimistic that stocks could keep rising in 2018.
"If you look at where we stand today, the [Nigerian] market is still one of the cheapest markets on the planet," said Bekkali.
Yet the country's benchmark index rallied by 48% this year as the government implemented temporary tax cuts and a loan guarantee program that encouraged banks to lend to small businesses. GDP growth soared, reaching 11.1% in the third quarter.
The stock market performance was also helped by the falling Turkish lira, said Neil Shearing, chief emerging markets economist at Capital Economics.
Now experts are warning that the good times can't last forever.
"From here on we think the economy is getting close to overheating," said Daniel Salter, global head of equities at Renaissance Capital.
The Hang Seng charged ahead by 36%, but China's major mainland indexes in Shanghai and Shenzhen floundered.
Why the disparity?
It's all about Tencent, said Dickie Wong, the head of research at Kingston Financial Group.
Shares in the Hong Kong-listed tech giant more than doubled over the past year and the company's valuation briefly eclipsed that of Facebook.
WeChat, the company's popular mobile messenger, has close to 1 billion users, and investors have cheered forays into mobile gaming and video streaming.
Meanwhile, the Shanghai and Shenzhen markets have languished after state media convinced local investors to be cautious, said Wong.
The biggest loser: Qatar
While most major stock markets posted sizable gains, the rising tide didn't lift all boats.
Gulf nation Qatar's stock market tumbled by 18% amid a spat with its neighbors: Saudi Arabia, Bahrain and the United Arab Emirates.
Their decision to cut diplomatic ties and transport links with Qatar in June took the region by surprise.
The nations accused Qatar of funding terrorism, a charge it denies. Efforts to restore ties have so far failed.
Qatar has found workaround strategies and different trade routes to get by, said Shearing.
"A lot of the initial economic disruption has faded," he said. "It doesn't look like [this] will be resolved quickly, but it doesn't look like it's doing vast damage to Qatar's economy."
Correction: A previous version of this article incorrectly spelled the name Zin Bekkali.
- U.S. stocks had a banner year in 2017. These markets did even better
- Market experts hopeful for another strong year for stocks
- London's stock market is the world's worst this year
- China will link its stock market to London this year
- Turbulence returns to the stock market
- Global stock market turmoil: What's going on?
- Why stock market upheaval was inevitable
- The biggest losers: Global stock market edition
- Trade war slams stock markets again
- Stock market rebounds: Dow rises 401 points