(Bloomberg) -- Brazil’s top hedge fund has notched another win: helping turn one of last year’s worst-performing stocks into one of this year’s best.

The XP Long Biased FIM fund, whose total return for the past five years beat all 155 peers tracked by Bloomberg, started clashing with management at Qualicorp SA over corporate-governance issues in October. Since then, shares of the Sao Paulo-based health-care company, in which XP is a major investor, have more than doubled.

Qualicorp’s chief executive officer and biggest shareholder, Jose Seripieri Filho, had been battling with the duo running the XP fund, Joao Braga and Marcos Peixoto. When Seripieri finally agreed this month to sell a 10% stake to Rede D’Or Sao Luiz SA and to eventually resign as CEO, the shares surged a record 37% in a single day.

“Qualicorp was a very cheap name struggling with a governance issue last year, which made us turn activist,” Braga said in an interview at Bloomberg’s Sao Paulo office. “Some investors didn’t look at the company due to governance, and the stock gained during the last months without an actual upward earnings revision.”

The XP fund has been holding shares of Qualicorp for at least five years. The bet seemed headed for disaster on Oct. 1, when the stock tumbled 29% after the company agreed to pay Seripieri 150 million reais ($38 million) to keep him from selling shares for six years while also signing a non-compete agreement.

XP Asset Management balked at the proposal, sending a letter to the company demanding revisions. A few days later, a truce was reached: Seripieri would use the 150 million reais to buy shares of the company, while agreeing to have his compensation package more closely tied to the firm’s performance. XP also appointed former banking executive Rogerio Calderon to replace Claudio Bahbout as a member of the board, and Qualicorp announced the creation of a governance committee.

The changes kicked off a steady rise in Qualicorp’s shares. XP Asset Management almost doubled its stake to 7.7% during the second quarter, when the stock was trading at an average of about 20 reais, according to data compiled by Bloomberg.

The whipsaw in the share price left a mark on returns at the XP Long Biased fund, which has 2.5 billion reais under management. The fund’s health-care holdings during 2018 posted a negative total return of 56%, its worst-performing sector, dragging the portfolio down 6.7%, according to data compiled by Bloomberg. So far this year, health-care holdings have had a roughly 78% positive return, the highest-contributing sector.

Via Varejo SA is the fund’s largest holding, followed by Qualicorp, Cia de Saneamento do Parana, Banco do Brasil SA and Azul SA, according to Braga.

“We like to be what we consider the good type of activists,” Braga said. “We talk to the company, we show them our database of people, try to find a good fit, someone to help with cutting costs, with goodwill. But if we have to be more aggressive defending our clients, we will.”

--With assistance from Shin Pei and William Spada.

To contact the reporters on this story: Vinícius Andrade in São Paulo at vandrade3@bloomberg.net;Felipe Marques in Sao Paulo at fmarques10@bloomberg.net

To contact the editors responsible for this story: Brad Olesen at bolesen3@bloomberg.net, Steve Dickson, Daniel Taub

©2019 Bloomberg L.P.