* TSX rises 87.01 points to 10,476.77
* Quarter-end "window dressing" aids rise
* Energy shares boosted by oil prices (Adds details, comments and official numbers)
By Frank Pingue
TORONTO, June 29 (Reuters) - Toronto's main stock index ended higher on Monday as a rise in oil prices fueled energy shares while banks rallied as investors spruced up their portfolios ahead of the end of the quarter.
Canadian banks were among the key drivers behind the TSX's rally, and analysts said this was largely due to end-of-quarter "window dressing", when portfolio managers sell stocks with big losses and buy the quarter's better-performing issues to help improve their returns.
Shares of Royal Bank of Canada (RY.TO) rose 2.4 percent to C$48.69, followed by Bank of Nova Scotia (BNS.TO), whose shares closed up 2.8 percent at C$44.24. The TSX index's financial group ended up 1.7 percent.
"You don't want to have too much cash and at the same time you want to be prudent, so when it comes to buying things, the banks paying decent dividends are probably where people want to go," said Irwin Michael, portfolio manager at ABC Funds.
"People want to have a little money in the marketplace so they are buying the safer stocks. But the market is very thin and moves can be extremely exaggerated in this environment."
The index's energy sector ended the session up 1.4 percent, helped largely by the price of oil, which rallied more than 3 percent on reports of rebel attacks on an oil facility in Nigeria and hopes for an economic rebound. [ID:nN29393310]
The S&P/TSX composite index .GSPTSE rose 87.01 points, or 0.84 percent, to 10,476.77.
$1=$1.16 Canadian Editing by Peter Galloway