The S&P/TSX composite index gained 56.28 points to 12,685.13.
The Canadian dollar was up 0.08 of a cent to 96.46 cents US as new data showed that inflation was well under control in June. Statistics Canada said that inflation came in at an annualized rate of 1.2 per cent, in line with economist expectations and up from a low rate of 0.7 per cent the previous month.
On a month over month basis, prices rose at a seasonally adjusted 0.3 per cent.
U.S. indexes were generally lower after Google Inc. and Microsoft both missed forecasts for earnings and revenue while General Electric beat expectations.
The Dow Jones industrials lost 4.8 points to 15,543.74, the Nasdaq was down 23.66 points to 3,587.61 and the S&P 500 index edged 2.72 points higher to 1,692.09.
GE earned $3.13 billion or 30 cents a share in the latest quarter, up from $3.11 billion a year earlier. Earnings ex-items came in at 36 cents, a cent higher than estimates. Revenue fell four per cent, to $35.12 billion.
GE is viewed as an important bellwether because it sells a wide variety of industrial equipment and appliances around the world, including jet engines, medical diagnostic equipment, locomotives, washing machines, natural gas-fired turbines, and oil and gas drilling equipment. GE shares were up 4.6 per cent in New York.
Google earned $3.2 billion, or $9.54 per share, up 16 per cent from $2.8 billion a year ago. Earnings were $9.56 per share ex-items, lower than the $10.78 that analysts had forecast. Google handed in revenue of $14.11 billion versus expectations of $14.42 billion. Google’s average ad rate fell by six per cent from the same time last year during the quarter, marking the seventh consecutive quarter of falling ad prices. Its shares fell 1.55 per cent .
Microsoft’s quarterly net income came to $4.97 billion, or 59 cents per share, reversing a loss of $492 million a year ago when it wrote down almost the entire value of its 2007 purchase of online ad service aQuantive. Earnings ex-items were 66 cents per share, short of the 75 cents per share expected by analysts. Revenue grew 10 per cent to $19.90 billion, also below the $20.72 million expected.
The world’s largest software company also booked a $900 million write-down to account for the deep price cut it applied to its Surface RT tablet this week, a move to spur sales amid sluggish demand. Microsoft shares fell 11.4 per cent.
Technology "has definitely been a sector that people have been expecting big things from and it has not delivered," said Randy Frederick, Managing Director of Active Trading & Derivatives at the Schwab Center for Financial Research in New York.
The TSX advanced for a fourth week, up 223 points or 1.8 per cent as investors have picked up resource stocks badly beaten down this year.
But stocks around the world have had a generally solid week especially after U.S. Federal Reserve Chairman Ben Bernanke indicated that the scale and scope of the central bank’s monetary stimulus may remain in place for longer than many in the markets had been predicting.
At the same time, markets including the TSX are getting a lift from improving U.S. economic conditions, seen lately in strong housing sector numbers and improving job creation.
"We have seen upward growth in the U.S., not stellar growth but continuous growth and... that’s leading the U.S. market higher and pulling the Canadian market higher," said Jeff Bradacs, a portfolio manager at Manulife Asset Management, adding that the second-quarter earning season has generally pleasantly surprised investors.
"What we have seen this week is a number of large U.S. companies' financials and industrial companies that beat expectations and that’s helped continue the rally on the market."
Commodity prices advanced with August bullion up $8.70 to US$1,292.90 an ounce on the New York Mercantile Exchange, and the gold sector moved up about four per cent. Barrick Gold Corp. (TSX:ABX) climbed 82 cents to C$17.16.
August crude was edged up one cent to US$108.05 a barrel after rising as high as $109.32, the highest price since March 1, 2012.
Crude's advance this week has been underpinned by another sizable decline in U.S. oil supplies. U.S. crude inventories fell by 6.9 million barrels last week, bringing the three-week decline to 27.1 million barrels. Prices are up 15 per cent over the last four weeks.
The energy sector was ahead 1.07 per cent and Canadian Natural Resources (TSX:CNQ) gained 43 cents to C$34.35.
The base metals sector led decliners, down two per cent while September copper rose one cent to US$3.14 a pound. First Quantum Minerals (TSX:FM) dropped 57 cents to C$15.95.