Profits at Canada’s five biggest banks rose 6% in the first quarter of 2012 as improvements in retail banking offset a weaker performance in their trading divisions.

RBC (TSX:RY), TD (TSX:TD), BMO (BMO), CIBC (TSX:CM) and Scotiabank (TSX:BNS) earned a combined profit of $6.71 billion in the three months ended Jan. 31, up 6% from $6.34 billion in the same quarter a year ago.

However, the earnings picture was uneven as overall profits at the three smaller banks – Bank of Montreal, Scotiabank and CIBC – offset a decline in earnings at the two biggest, Royal Bank and Toronto-Dominion.

RBC’s profits fell to $1.86 billion from $1.95 billion, as a record performance in Canadian banking failed to offset weakness in several other divisions.

TD Bank’s were down to $1.48 billion from $1.56 billion in the same quarter a year ago, with the bank taking a number of one-time charges including a $285-million provision related to a series of lawsuits over a Ponzi scheme in the U.S.

But at Bank of Montreal, profits rose sharply to $1.1 billion from $825 million, weighted heavily on the integration of Marshall & Ilsley Corp., a U.S. bank focused in the recovering Midwest, into the results.

Scotiabank’s profits rose to $1.44 billion from $1.25 billion, largely due to an after-tax gain of $94 million from the sale of its office in Calgary.

And at CIBC, profits grew to $835 million from $763 million a year ago as mortgages and other lending in its Canadian retail segment helped push first quarter profits up 9%.

Meanwhile, three of the banks – Royal, TD and Scotiabank – also increased their dividend payouts this quarter in a sign of optimism about the year ahead.

Still the banks are contending with tougher regulations, investor insecurity, low interest rates and a slowing housing market in Canada.

Many of the banks reported improvements in consumer deposits and lending, as well as fewer loan defaults, which drove combined profits in their retail divisions – which includes credit cards, personal banking, auto lending and business banking – up 4% in the quarter.

Overall profit in the retail banking divisions grew to $3.3 billion from $3.16 billion a year ago.

Most banks aside from CIBC, reported lower provisions for credit losses – or money set aside to cover bad loans – a sign that fewer customers are defaulting and that finances could be improving.

However, the banks’ warned that the strength of their mortgage lending could drop off this year as the housing market slows and consumers focus on reducing debt loads.

The banks are locked in an intensely competitive market to attract mortgage customers, and heated up again this week after BMO said it would offer a five-year mortgage at 2.99% until March 28. TD followed, and other banks are expected to as they often move in lockstep.

A similar promotion in January set off a race to the bottom.

Meanwhile, shaky confidence in volatile stock markets drove down profits in the banks’ capital markets divisions by 19%. Capital markets profits fell overall to $1.28 billion from $1.58 billion a year ago.

Bank of Montreal, which reported a slowdown in capital markets last week, has also cut about 60 jobs in the division to keep staffing in line with demand.

Many of the banks also reported they were clamping down on costs in order to buffer against potential challenges in the year ahead.