* Profits at Royal Bank, TD Bank, CIBC top estimates
* Domestic lending drives the profit beats
* Wholesale banking a weak spot
* TD, Royal Bank boost dividends
* Shares of all three banks rise, TD hits record high (Adds comments from TD CEO and from a fund manager, details on TD branch plans in the United States)
TORONTO, Aug 29 (Reuters) - Three of Canada's biggest banks posted better than expected quarterly results on Thursday, pushing their shares higher as surprisingly strong retail lending and wealth-management income offset weakness in trading and investment banking.
Royal Bank of Canada and Toronto-Dominion Bank , the country's top two banks, both announced dividend hikes, while No. 5 lender Canadian Imperial Bank of Commerce said it would buy back as much as 2 percent of its stock over the next 12 months.
The results close out a financial third-quarter reporting season in which Canada's top six banks all exceeded market earnings estimates on the back of domestic lending profits that churned higher despite predictions that a cooling housing market would slow growth to a trickle.
"These aren't 'knocking out of the park' numbers, but they are better than my expectations," said Tom Lewandowski, a St. Louis-based analyst for Edward Jones.
While loan growth has slowed slightly over the past year as the country's housing market has begun to cool, it has not slowed to the extent feared by many analysts.
And while rock-bottom mortgage rates have pressured lending margins, the banks have been able to blunt the impact by refocusing on higher-margin businesses, such as credit cards and auto lending.
The results also affirm the wisdom of recent efforts by the banks to diversify their revenue bases. TD, for instance, had a profit surge at its U.S. retail banking unit, while RBC was buoyed by strong results from its wealth management division, which it has been expanding, particularly in Europe.
BEATING ESTIMATES, RAISING DIVIDENDS
Excluding a favorable income tax adjustment and other small items, RBC earned C$1.48 a share, topping analysts' estimates of C$1.38, according to Thomson Reuters I/B/E/S.
TD's profit excluding items was also better than expected at C$1.65 a share versus a market forecast of C$1.55. CIBC's earnings per share, excluding items, were C$2.29, ahead of expectations of C$2.15.
TD shares ended up 2.7 percent at C$89.93, and hit a record high of C$90.54 during the session. RBC rose 1.2 percent to C$65.24, and CIBC gained 2.8 percent to C$82.66.
The Canadian banking sector has largely traded sideways in recent months as some investors have opted for U.S. bank stocks, which were slow to rebound from the 2008 financial crisis and are now seen by some as a recovery play.
Tim Johal, a portfolio manager at Investors Group, said the U.S. banks may offer better returns as they recover, but that Canadian banks were still appealing at current levels.
"These banks are still cheap relative to the profitability that they are able to generate and relative to the consistent earnings that they are able to produce," he said.
RBC raised its quarterly dividend 6 percent to 67 Canadian cents, while TD boosted its payout by 5 percent to 85 Canadian cents a share.
STRONG RETAIL, WEAK WHOLESALE
On a net basis, RBC earned C$2.30 billion ($2.19 billion), or C$1.52 a share, in the quarter ended July 31, compared with C$2.24 billion, or C$1.47 a share, a year earlier.
Earnings at RBC's retail bank climbed 7 percent to C$1.2 billion, while wealth management income jumped 51 percent to C$236 million.
Weighing on the result was the bank's capital markets wing, where income slid 10 percent to C$388 million on lower investment banking activities and a drop in fixed-income trading revenue.
Wholesale banking was also a weight for TD, which saw overall net profit decline due to a previously announced C$418 million insurance charge for higher provisions in its auto lending unit as well as losses from floods in Alberta and Ontario this summer.
Net income fell 10 percent to C$1.53 billion, or C$1.58 a share, from C$1.70 billion, or C$1.78 a share, a year earlier.
But TD's retail bank earnings rose 13 percent to C$973 million in Canada and jumped 57 percent to C$445 million in the United States, helped by the acquisition earlier this year of Target Corp's $5.9 billion U.S. credit card portfolio.
Stymied by slim growth prospects in Canada, TD began building its U.S. bank from scratch in 2004 and now boasts about 1,300 branches spread along the Eastern Seaboard.
However, TD, which has a goal of containing expense growth to 3 percent on the year, will close 33 U.S. branches in November and may consolidate other facilities to keep costs down, Chief Executive Ed Clark said on a conference call.
"We still see 2014 as tough revenue year and we're saying we've just got to go through every part of the company and say is there a way that we could do this for less and actually do better," he said.
Bank officials noted that the branch closures are in addition to the opening of 30 new branches this year in the United States and about 20 in 2014.
CIBC's net income rose 6 percent to C$890 million, or C$2.16 a share, from C$841 million, or C$2.00 a share, a year earlier.
Much more domestically focused than RBC or TD, profit at CIBC's retail and business banking division rose 7 percent to C$638 million, while wealth management profit jumped 34 percent to C$102 million.
($1=$1.054 Canadian) (Editing by Chizu Nomiyama; and Peter Galloway)