HONG KONG -  Asian and European markets climbed following news Chinese factory gate prices increased for the first time in more than four years, while the death of Thailand's king sparked bargain-buying after suffering a sell-off in his final days.

Beijing said the producer price index rose last month after 54 consecutive months of falling, beating estimates for a drop and providing some much-needed hope for the Chinese economy a day after market-sapping trade figures.

Chinese firms have for years been battered by falling prices for their goods in the face of chronic overcapacity and weak demand, putting a damper on growth in a key driver of the world economy.

Consumer prices also rose more than expected.

"The end of PPI deflation is a good signal for the economy's stabilisation," Gao Yuwei, a researcher at Bank of China in Beijing, told Bloomberg News. "PPI is expected to be remain expansionary in the coming months."

Traders around Asia broadly welcomed the news on the world's number two economy, which is struggling with a years-long fight against slowing growth.

Hong Kong ended 0.9 percent higher and Shanghai gained 0.1 percent, while Seoul was up 0.4 percent and Tokyo added 0.5 percent. Sydney was flat.

- Thai stocks, baht bounce -

In Bangkok the Stock Exchange of Thailand soared 4.2 percent in the afternoon, paring huge losses built up through the week as news filtered out that King Bhumibol Adulyadej was gravely ill. The baht climbed one percent against the dollar.

Thai stocks plunged around six percent this week and the baht lost around three percent as investors grew uneasy about political and economic stability following the death of the monarch who reigned for seven decades.

While he wielded no official power, Bhumibol was considered a uniting force in a fractured nation where political tensions are still raw two years after a military coup.

However, analysts said the king's death had been priced into the market and investors were rushing in for bargain stocks, while attention will now be on the succession process for his son.

"Thailand's economic fundamentals remain unaffected, which should help it to weather this storm," Jingyi Pan, a Singapore-based strategist at IG Asia Pte, said before the announcement.

"The military government, which has overseen the economy during a period of increasing (economic) growth, could help to guide the country through the period."

And Margaret Yang, an analyst at CMC Markets in Singapore, added: "Eventually smart money will flow in to support the market."

In Seoul Samsung Electronics rose 1.3 percent as investors brushed off its warning that it expects another $3 billion-plus hit to profit over the next two quarters owing to the impact of its exploding Note 7 crisis.

It said it hoped a pick-up in sales of its other flagship handset would help cushion the impact.

The warning came two days after it slashed its operating profit outlook for the third quarter by $2.3 billion as it announced it was scrapping the model entirely.

In early European trade London, Paris and Frankfurt each added 0.4 percent.

Meanwhile, European stock markets rebounded with London's benchmark index headed back towards its record-high level on upbeat Chinese data, while bank results boosted Wall Street.

The death of Thailand's king meanwhile sparked bargain-buying in the country after Bangkok stocks suffered sell-offs in his final days.

Europe's rally Friday "has probably taken many people by surprise, although this shouldn't be the case given that the markets in both the UK and US are still very close to their all-time highs", said Forex.com analyst Fawad Razaqzada.

London's FTSE 100 index this week hit an intra-day high of 7,129.83 points, fuelled by a plunging pound in the wake of Britain's vote earlier this year in favour of quitting the European Union.

"There is a reason why the markets are still elevated despite all the doom and gloom out there, and it continues to be this: cheap central bank money," Razaqzada added.

The situation could soon change however, if only in the US, as the Federal Reserve prepares to possibly hike interest rates before the end of the year.

US retail sales data released Friday coming in as expected with a 0.6 monthly gain in September after a summer in which consumers had shown a slackening appetite to spend kept alive the possibility of a December rate hike.

Wall Street stocks opened higher as a trio of leading banks beat analyst forecasts for third quarter earnings despite the tough low interest rate environment.

The three -- Wells Fargo, JPMorgan Chase and Citigroup -- all saw net profits fall as low rates pared lending margins, but they beat forecasts from analysts, driving their shares higher in early trade.

Citigroup led a rebound in banking shares, adding 2.2 percent; Wells Fargo rose 0.4 percent and JPMorgan 1.4 percent.

Ahead of the US numbers, Beijing said China's producer price index rose last month after 54 consecutive months of falling -- providing some much-needed hope for the Chinese economy a day after market-sapping trade figures.

Chinese firms have for years been battered by falling prices for their goods in the face of chronic overcapacity and weak demand, putting a damper on growth in a key driver of the world economy.

Consumer prices also rose more than expected.

"Markets were in more positive spirits on Friday," said CMC Markets analyst Jasper Lawler.

"Higher than expected inflation data (from China) has unwound some of the global growth concerns brought about by its ugly trade data."

- Thai stocks, baht bounce -

The Thai king's death this week saw a recovery in the country's stocks Friday, but analysts warned uncertainty over the nation's future without its uniting figure posed fresh risks for an economy already battered by a decade of political turmoil.

Thai stocks plunged around six percent this week and the baht lost around three percent as investors grew uneasy about political and economic stability following the death of the monarch who reigned for seven decades.

In Seoul, Samsung Electronics rose 1.3 percent as investors brushed off its warning that it expects another $3.0-billion-plus hit to profit over the next two quarters owing to the impact of its exploding Note 7 crisis.

It said it hoped a pick-up in sales of its other flagship handset would help cushion the impact.

The warning came two days after it slashed its operating profit outlook for the third quarter by $2.3 billion as it announced it was scrapping the model entirely.