Investors should keep buying UniCredit (UNCFF) stock, analysts say, but sell Banco BPM (BPSAF) and cool it on the rest of the Italian banking sector.

With UniCredit having raised close to €20 billion ($22.1 billion) of new money since late last year, through a rights issue and various asset sales, the analyst community has now buried the hatchet on concerns over capital at Italy's largest lender.

However, with the exception of Credit Emiliano, investors should either sell or cool it on the remainder of the banking sector as it is facing increasing pressure from the European Central Bank to address its bad loan problem.

"It is telling that the CEO of Italy's largest bank, UniCredit, believes that selling down (non-performing loans) is important as it de-risks the balance sheet, lowering the cost of capital and leading to greater value creation for shareholders. We applaud this approach," said Eoin Mullany, an analyst Berenberg, in a note to clients.

The NPL ratio of Italian banks is three times the European average at 15.3% and the ECB has said it is coming down hard on banks whose NPLs are "considerably above" this average. But many banks still lack the capital to take the write downs that may be needed in order for them to sell off these loans.

"They have never gone through a period of price discovery like Irish and Spanish peers," Mullany explained. ...We still do not have certainty on asset values in Italy,"

Banco BPM is the most exposed to ECB action and investors should sell the shares, according to Mullany, who has a price target of €1.90 on them.

BPM stock fell nearly 3% to change hands at an intraday low of €3.00 Thursday.

Formed through the 2016 merger of Banco Popolare and Banco Popolare di Milano, BPM must sell €8 billion of bad debt before 2019 as a condition of the deal but even if it achieves this, the lender's NPL ratio will still be close to 20%.

"Recovery rates in Italy continue to fall. NPLs sold to third-parties recover just 20% of gross book value," said Mullany.

Write downs of the NPL portfolio will mean losses for shareholders and, according to Mullany, may leave it with a €3.5 billion capital shortfall by the time that it is done.

The Berenberg analyst wrote that investors can hold Credit Emiliano but should also sell their holdings in Monte dei Paschi (BMDPY) , Intesa Sanpaolo (ISNPY) and UBI Banca (BPPUY) .