* European stocks set to open flat to slightly higher
* Asia ex-Japan to post 3.8 pct gain in 2016 after 2 yrs of losses
* Nikkei poised for worst year in five on yen strength
* Dollar gains after sell-off, euro steadies after 2 pct spike
* Oil heading for best year since 2009
By Nichola Saminather
SINGAPORE, Dec 30 (Reuters) - Asian stocks looked set to end 2016 on an upbeat note, with the benchmark headed for its first annual gain in three years, while the dollar reversed earlier losses and oil was poised to record its biggest gains in seven years.
European stocks are set for a more subdued start, with financial spreadbetter IG Markets expecting Britain's FTSE 100 to open marginally lower, France's CAC 40 to start the day fractionally higher, and Germany's DAX to climb about 0.1 percent on the open.
MSCI's broadest index of Asia-Pacific shares outside Japan advanced 0.5 percent on Friday, diverging from Wall Street, which posted slight declines overnight.
Europe's STOXX 600 index also closed lower as appetite for risk remained subdued ahead of the new year.
In a year marked by major political shocks, including Brexit in June and the unexpected election of Donald Trump as U.S. president in November, Asia Pacific ex-Japan stocks are poised to record a 3.8 percent gain.
Despite the modest figure -- the Dow Jones Industrial Average, in contrast, is up a whopping 14 percent -- 2016 had the Asia-Pacific index's best performance in four years.
China's CSI 300 index added about 0.1 percent in its first session of gains this week. But mainland stocks are poised to be this year's worst performers in the Asia Pacific with declines of about 12 percent.
Hong Kong's Hang Seng rose 1 percent, its biggest one-day rally in 5 1/2 weeks, helping the index eke out a 0.6 percent gain for the year.
Thailand, after an almost 20 percent surge, is set to be the region's best-performing major market, followed by Indonesia, which has soared 16 percent. Along with China, Malaysia, down 3.4 percent, and the Philippines, down 1.5 percent, were the only other markets poised to post losses for the year.
Japan's Nikkei closed down 0.2 percent on Friday, erasing most of this year's meagre gains and ending 2016 up only 0.4 percent. While this is its fifth straight year of increases, it is also its worst performance in the time, with the index slammed by the safe-haven yen's 21 percent surge from the start of 2016 to its peak after the Brexit vote.
The Japanese currency has fallen more than 15 percent since that peak -- with most of the losses since November driven by a surge in the dollar, reflecting exuberance over Trump's anticipated stimulatory policies -- but is still set for a 3 percent gain versus the dollar this year.
"2016 has been a year of changes and these changes have hardly been slight," Jingyi Pan, market strategist at IG in Singapore, wrote in a note. "A preference for safe haven assets to tide through the year-end have set in, with gold and yen taking off."
The dollar, which earlier fell to the lowest in more than two weeks, climbed 0.1 percent to 116.74 yen, recording gains of 10.7 percent against the yen since its pre-election close.
The dollar index, which tracks the greenback against a basket of six major global peers, dropped 0.25 percent to 102.41 on Friday, following a 0.6 percent slide on Thursday, but is poised to end 2016 3.8 percent higher.
The euro jumped as much as 2 percent early on Friday, its biggest intraday gain since Nov. 8, before settling back down to trade 0.3 percent higher at $1.0525.
"It's a really thin market today, and suddenly, offers disappeared and short-term players pushed the euro higher and took out stops. That's all," said Kaneo Ogino, director at foreign exchange research firm Global-info Co in Tokyo.
The common currency is still down 3 percent for the year.
The Chinese yuan is on track to record its biggest annual loss since 1994. The dollar has strengthened 7 percent versus the Chinese currency this year, as China's efforts to shore up its currency by selling the greenback have been undercut by worries about slowing Chinese economic growth and expectations for faster U.S. expansion.
U.S. bond yields, which had been climbing since the U.S. election on expectations of higher interest rates, have reversed course over the past two weeks as investors have sought shelter from risk. They were little changed at 2.4774 percent on Friday, lingering near a two-week low touched overnight.
Gold touched a two-week high on Friday, basking in its safe haven status amid the broad pull-back in risk.
Spot gold edged up 0.3 percent to $1,161.50 an ounce, building on Thursday's 1.4 percent surge. It is headed for a 9.5 percent jump this year, snapping a three-year losing streak.
Oil prices inched up as optimism over a deal to curb outputs that is set to take effect at the start of the new year offset an unexpected increase in U.S. inventories.
U.S. crude added 0.4 percent to $53.99 a barrel on Friday, after losing 0.5 percent on the U.S. stock rise. It is on track for a 47 percent surge this year, its best annual performance since 2009, recovering all of its 2015 losses.
Brent crude added 1.8 percent to $57.16, despite a paltry 0.1 percent loss on Thursday. It is headed for an eye-watering 53 percent gain this year, within a hair of where it was at the start of 2015.
Reporting by Nichola Saminather; Additional reporting by Lisa Twaronite; Editing by Eric Meijer