Investors were encouraged by comments from police that the gunman who shot a soldier in Ottawa on Wednesday and then entered Canada's parliament buildings, where he was shot dead, had acted alone and that there was no apparent link to an attack on two soldiers in Quebec on Monday.

The Toronto stock market's benchmark TSX index is up about 6 percent since hitting an eight-month low last week. It dropped 1.6 percent on Wednesday after the shootings.

“It’s a big reversal relative to yesterday. The market is back to its natural tendencies as we approach yearend,” said Sid Mokhtari, market technician and director, institutional equity research, CIBC World Markets.

He said the Canadian market hit a bottom last week and could go higher from here as it benefits from positive seasonal trends.

The Toronto Stock Exchange's S&P/TSX composite index <.GSPTSE> closed up 174.76 points, or 1.22 percent, at 14,486.83. All of the 10 main sectors on the index were higher.

The index's industrial sector, home to Canadian National Railway Co (>> Canadian National Railway Company), climbed 2.3 percent. CN Rail added 2 percent to C$76.71, and Canadian Pacific Railway Ltd (>> Canadian Pacific Railway Limited) was up 3.5 percent at C$229.

Energy shares jumped 2.3 percent, reflecting solid gains in the prices of Brent and U.S. crude oil. Canadian Natural Resources Ltd (>> Canadian Natural Resources Limited) gained 2.8 percent to C$39.55, and Suncor Energy Inc (>> Suncor Energy Inc.) climbed 2.9 percent to C$38.98.

The market also digested corporate earnings from major Canadian companies such as oil producer Cenovus Energy Inc (>> Cenovus Energy Inc) and fertilizer maker Potash Corp (>> Potash Corp./Saskatchewan Inc.).

Cenovus jumped 6.5 percent, to C$27.97, after its quarterly results beat expectations.

Potash narrowed its full-year earnings forecast range and the company reported a lower-than-expected quarterly profit as income fell from its overseas investments. The stock slipped 0.7 percent to C$36.63.

(Editing by Peter Galloway)

By Solarina Ho and John Tilak