Toronto stocks closed higher ahead of the Canada Day long weekend, getting a boost from technology and energy shares.

The S&P/TSX composite index closed 91.96 points higher, or 0.8%, at 11,612.87.

The index gained 363.85 points this week, but was down 4.1% for the second quarter compared with the January-March period.

Overall, nine of the 10 TSX groups were higher, with the information technology group up 2%.

Research In Motion Ltd. rose $4.86 or 6.64% to $78.06. On Thursday, RIM said it is on track to add as many as 700,000 subscribers for its BlackBerry service this summer.

ATI Technologies Inc. rose $1.16, or 7.7%, to $16.22 after the computer chip maker reported a return to profit on Thursday.

The energy group was ahead 1.35% as the August contract for crude oil on the New York Mercantile Exchange rose 41¢ to US$73.93 a barrel.

Canada Southern Petroleum shares rose 1¢ to $13.25 after Canadian Oil Sands Trust boosted its bid for the firm, raising it to US$11.10 per share a day after Petro-Canada offered US$11 a share.

Canada Southern has endorsed Canadian Oil Sands’ increased offer and is recommending that shareholders accept it.

The August price of bullion on the Nymex jumped $27.10 to US$616 an ounce.

The TSX is closed Monday while U.S. markets will be shut Tuesday for the July 4 Independence Day holiday.

The Canadian dollar was down 0.38 of a cent to US89.59¢.

The S&P/TSX Venture composite index gained 58.31 points, or 2.26%, to end the week at 2,635.20.

In New York, stocks ended what has been a rocky second quarter for investors on a lacklustre note

The Dow Jones industrial average was down 40.58 points, or 0.36%, to close at 11,150.22. The S&P 500 was down 2.68 points, or 0.21%, to at 1,270.19. The Nasdaq composite index was down 2.29 points, or 0.11%, to close at 2,172.09.

The tech-fueled Nasdaq tumbled 7.2% during the second quarter, while the S&P 500 lost 1.9%. The Dow finished the quarter up 0.4%.