London - Most world stocks markets were set to finish 2016 in positive territory despite shock votes in Britain and the United States, but the outlook for 2017 is clouded by looming European elections and Brexit.
This year witnessed a wave of anti-establishment populism, which saw Britain vote to leave the EU and maverick billionaire businessman Donald Trump elected as US president.
Both unexpected outcomes sparked a brief tumble on global equity markets - but many have since staged a stunning recovery to finish 2016 in the black.
London's FTSE 100 has gained 14.3% over the year, while Frankfurt's DAX 30 added about 6.7% and the Paris CAC 40 won 4.6%.
Since Brexit, London's FTSE 100 blue-chip index has soared to end the year in record-breaking form, as the British economy shrugged off the impact of the impending divorce from the EU.
In a half-day of trading on Friday, the FTSE 100 set a new intraday and closing high of 7 142.83 points.
Prime Minister Theresa May has vowed to trigger the two-year EU exit process by the end of next March.
"Fears of an imminent UK recession following Brexit proved wide of the mark thanks largely to the resilience of consumer spending," NFS Macro analyst Nick Stamenkovic told AFP.
"Indeed, Brexit was viewed as a local rather than global issue, prompting a sharp turnaround in the fortunes of world stock markets."
Markets also briefly tanked on November 9 after Republican Trump defeated Democrat market favourite Hillary Clinton to capture the White House.
Yet Wall Street has since enjoyed a blockbuster run with the Dow Jones Industrial Average now on the cusp of 20 000 points.
New York has been boosted by expectations that Trump - who will be inaugurated on January 20 - will honour election pledges to ramp up infrastructure spending, cut taxes and boost businesses.
"Rising optimism over possible tax reforms, increased infrastructure spending and reduced regulation have provided a spur for Wall Street - but there is a risk of disappointment once Trump becomes president in January 2017," cautioned Stamenkovic.
Looking ahead to 2017, the spotlight is now on upcoming European elections.
The Netherlands heads to the polls in March, followed by France in May, and Germany in the autumn.
"Populism is the rising mood of the moment," London Capital Group analyst Ipek Ozkardeskaya told AFP.
"Not only in the UK, but across Europe and the world.
"Brexit will remain in the headlines in 2017, yet of course as the picture gets clearer, investors and markets will find it easier to take a direction."
There are fears the current wave of populism in Europe could provide a boost to far-right leader Marine Le Pen in France.
"Change is afoot within politics (with) voters prepared to dare to try something different, tired of the status quo," noted Accendo Markets analyst Mike van Dulken.
German Chancellor Angela Merkel is however widely expected to win polls set for September.
"In 2017, the main focus will be elections in France and Germany," added VTB Capital analyst Neil MacKinnon.
"Voters are likely to reject further fiscal austerity and push back against further super-state integration," he predicted.
He added that Europe's equity markets were also lifted this year by the European Central Bank, which has embarked on an unprecedented stimulus programme to drive up lending and inflation in the euro area.
But MacKinnon also highlighted the region's banking problem after the ECB called for Italian lender Monte dei Paschi di Siena (BMPS) to receive a bailout of 8.8 billion euros ($9.2bn).
"The longer-term challenge of bank recapitalisation and restructuring in the eurozone area persists," he warned.
In foreign exchange, many economists predict the euro could slump to parity against the dollar next year, aided by the Federal Reserve's hawkish stance on interest rates.
The Fed's bullish outlook this month pushed the dollar to 10-month yen highs and sent it heading towards parity with the euro for the first time since 2002.
In Asia on Friday, Tokyo retreated again but Hong Kong rallied as Asian markets brought down the curtain on a volatile year.
Japan's Nikkei rose 0.42% in 2016, marking the fifth consecutive annual increase.
Shanghai slumped more than 12% on the back of massive capital flight and a languishing yuan currency.
Read Fin24's top stories trending on Twitter: Fin24’s top stories