Canada's main stock index edged higher on Thursday, helped by a jump in Canadian Pacific Railway shares on prospects of consolidation in the railroad industry and a rebound of uranium producer Cameco Corp.

Canadian Pacific Railway (CP.TO) rose nearly four per cent to $200.11 a day after saying its chief executive, Hunter Harrison, would leave five months earlier than originally expected and reporting a lower-than-expected adjusted quarterly profit.

"Many people believe that there will be consolidation in this industry," said John Stephenson, president and CEO of Stephenson & Company Capital Management.

"Someone who has the operational record of a Hunter Harrison is probably going to be one of the people to do it."

Harrison is in advanced talks to team up with a former Pershing Square Capital partner, seeking to shake up rival railroad CSX Corp, according to a person familiar with the matter.

The industrials group rose 0.5 per cent overall, while the heavyweight financials group gained 0.2 per cent.

Uranium producer Cameco Corp (CCO.TO) bounced 10.2 per cent higher to $15.85. It fell nearly 17 per cent on Wednesday after a profit warning.

The Toronto Stock Exchange's S&P/TSX composite index closed up 11.96 points, or 0.08 per cent, at 15,409.81.

Gains were tempered by investor caution ahead of Donald Trump's inauguration on Friday.

"It's going to be a little bit challenging over the next week or two as the reality of what a Trump presidency might be settles in and more importantly just how long it will take to actually get anything implemented in terms of policy," Stephenson said.

Just five of the index's 10 main groups ended higher.

The energy group, which includes Cameco, dipped 0.1 per cent even as oil rose.

U.S. crude oil futures settled 29 cents US higher at US$51.37 a barrel as the International Energy Agency said oil markets were tightening even before cuts agreed by OPEC and other producers took effect.

Milestone Apartments Real Estate Investment Trust  surged 9.9 per cent to $21.60 after a unit of private investment firm Starwood Capital Group said it would buy the REIT in a deal valued at about US$2.85 billion.

The materials group, which includes precious and base metals miners and fertilizer companies, added 0.3 per cent, with Barrick Gold Corp climbing 1.2 per cent to $22.56.

Gold edged 0.1 per cent higher after being pressured earlier in the day by strong U.S. economic data and support from Federal Reserve Chair Janet Yellen for higher U.S. interest rates

U.S. stocks fell on Thursday, continuing to pull back from the post-election rally, on investor caution ahead of Donald Trump's inauguration as president on Friday.

The Dow fell for a fifth straight day, its longest losing streak since just before the Nov. 8 U.S. election.

Still, Trump's swearing-in will mark one of the best performances for stocks for any presidential transition period of modern times. The S&P 500 is up 5.8 per cent since the vote.

And though the S&P 500 sank 5.3 per cent on President Barack Obama's inauguration day and tumbled 20.4 per cent during the first 34 trading days of his administration, bottoming on March 9, 2009, the index has nearly tripled in price off that low. Including reinvested dividends, it has delivered a total return of nearly 295 per cent.

That is the second-best run for the stock market under any president since Dwight Eisenhower.

The rally in stocks since Trump's election has slowed in recent weeks as investors look for more details on his policies.

Traders in the options market have grown increasingly cautious and have been loading up on defensive contracts, even as overall levels of stock market volatility are close to record lows.

"There has been a lot of talk about selling the inauguration because it's going to take so long to get some of these initiatives pushed through ... so the market seems to have stalled out and consolidated," said Robert Pavlik, chief market strategist at Boston Private Wealth in New York.

"The next logical move may be down before it regroups and moves higher. Why start accumulating new positions when you don't have a real directional reason to do it?"

The Dow Jones Industrial Average closed down 72.32 points, or 0.37 per cent, to 19,732.4, the S&P 500 lost 8.2 points, or 0.4 per cent, to 2,263.69 and the Nasdaq Composite dropped 15.57 points, or 0.28 per cent, to 5,540.08.

While S&P 500 utilities, real estate and energy led sector losses, S&P financials weighed the most on the market, falling 0.6 per cent.

The financial index, which rallied sharply following the election on Trump's promises of reduced regulations and expectations of higher interest rates, is now down one per cent since the start of the year.

Rail shares were among the day's big gainers. Railroad CSX Corp jumped 23.4 per cent after news of Harrison's plan to acquire an activist stake in CSX.

Union Pacific was up 2.4 per cent after a better-than-expected quarterly net profit.

Declining issues outnumbered advancing ones on the NYSE by a 2.99-to-1 ratio; on Nasdaq, a 2.55-to-1 ratio favored decliners.

The S&P 500 posted 15 new 52-week highs and two new lows; the Nasdaq Composite recorded 75 new highs and 35 new lows.

About 6.3 billion shares changed hands on U.S. exchanges, compared with the 6.1 billion daily average for the past 20 trading days, according to Thomson Reuters data.