LONDON (CNNMoney) - 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.
The Dow Jones industrial average shot up by 25%, the S&P 500 surged by 20% and the tech-heavy Nasdaq index outshined them with all with a stunning 29% gain.
Argentina's Merval index surged 73% this year and hit a record high the day after Christmas.
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 43% rally in 2017 has helped to close the gap.
The index suffered mightily in 2015 and 2016 as low oil prices, militant attacks, currency troubles, elections and Ebola hit investor sentiment.
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.
An attempted coup in 2016 and a series of terror attacks sent chills through the Turkish economy.
Yet the country's benchmark index rallied by 43% 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 nearly 35%, 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 19% 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.
Copyright 2017 by CNN NewSource. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.