* HSBC to sell Brazil arm to Bradesco for $5.2 bln
* Hong Kong investors' China buying fuels profits
* CEO: "nothing alarming" in China
* Sets aside $1.3 bln to cover forex probes
* London shares up 0.4 pct (Adds CEO comments, details)
By Lawrence White and Steve Slater
HONG KONG/LONDON, Aug 3 (Reuters) - HSBC Holdings beat expectations with a 10 percent rise in first-half profit thanks to a strong performance in Hong Kong and has agreed a $5.2 billion sale of its business in Brazil.
Europe's biggest bank by market value is to sell the unprofitable Brazilian operations to Banco Bradesco SA , Brazil's second-biggest private-sector bank, for a higher than expected 17.6 billion reais ($5.2 billion).
The sale is part of a plan by Chief Executive Stuart Gulliver to shed underperforming business and reduce costs, including almost 50,000 job cuts, to try to improve returns. Gulliver said HSBC was likely to keep its bank in Britain because of its strong prospects.
HSBC said profit growth was driven by an investing frenzy in Hong Kong among individual customers prompted by China's soaring markets earlier in the year.
HSBC has become reliant on Hong Kong for profits as its businesses in Europe, the United States and other emerging markets slow. The London-based bank has said it is considering moving its headquarters back to the former British colony.
It intends to complete a review of its headquarters by the end of this year and Hong Kong is seen as the most likely alternative.
The market turmoil in China in the past few weeks could mean a gloomier second-half outlook. HSBC said its performance in July was satisfactory, but said the banking environment remained challenging and the economic climate was uncertain in China and the euro zone.
"We don't see anything alarming coming from what has happened recently in China, but there undoubtedly will be some muted impact on our business both from the sell-off in the stock market and from the more reduced economic activity we have seen," Gulliver told reporters.
China's stock markets have helped to drive profits for the bank's broking business in Hong Kong via the Stock Connect trading link with Shanghai because mainland shares soared prior to their June crash.
He said he still expected China's economy to grow by about 7.1 percent this year, but some of the bank's big corporate customers had seen a slowdown in Chinese sales and revenues in wealth management and equities could slip from the first-half.
China has forecast economic growth of around 7 percent for 2015, which would be the weakest rate in 25 years.
"The bank's profits benefited from the boost from Stock Connect before the market turned, so I wouldn't extrapolate the same level of performance into the third quarter and beyond," Ian Gordon, analyst at Investec Securities, said.
Asia now accounts for two-thirds of HSBC's profits, and Gulliver has pinned the bank's fortunes on a 'pivot' to the region.
HSBC is speeding up a cull of unprofitable businesses and countries and is close to selling its loss-making Turkish business to Dutch lender ING Group, sources have told Reuters.
Gulliver said HSBC was likely to keep its British business after warning two months ago it could look to sell if new rules left it without control over strategy, risk, management and dividends. "You should work on the assumption that it is a bank we would like to keep, because it's got excellent returns from what we see going forward and the UK is a profitable banking market."
HSBC's pretax profits in the first six months of the year were $13.6 billion, up from $12.3 billion a year earlier and well above analysts' average forecast of $12.5 billion according to a poll conducted by the bank.
Its London-listed shares were up 0.4 percent at 582.1 pence by 1100 GMT, in line with the European bank index.
The bank increased to $1.3 billion from $550 million the sum set aside to cover costs from various regulatory investigations into banks' rigging of foreign exchange markets worldwide.
It set aside $147 million to cover potential fines and settlements in its private bank, after allegations earlier this year that its Swiss business helped customers evade tax.
HSBC also took a hit of $92 million on its exposure to Greece.
HSBC said its investment bank had a good start to the year, led by growth in equities and a 21 percent rise in foreign exchange trading revenues.
Gulliver said he was happy with the size of the investment bank and its returns would start improving as assets were cut.
HSBC cut assets by $50 billion on a risk-adjusted basis in the first half, mostly in the investment bank, which helped to lift its core capital ratio to 11.6 percent from 11.1 percent a year ago.
Analysts said that strong capital position could help to lift future dividends.
Cutting costs remains a challenge, however. Costs rose 7 percent from a year ago, which the bank said was partly due to high regulatory and compliance costs. It added more than 2,200 compliance staff in the first half. (Editing by Susan Fenton and Jane Merriman)