TORONTO — National Bank of Canada on Wednesday reported second quarter results which were ahead of market expectations, helped by a strong performance from its wealth management division.

Canada’s sixth biggest lender reported earnings per share of C$1.28 per share, compared with C$0.52 in the same quarter a year ago. The previous year’s performance was affected by write-offs on bad loans to clients in the energy sector.

Analysts on average had expected earnings per share of C$1.26, according to Thomson Reuters I/B/E/S data