(Adds analyst quotes and background details and updates prices)
* TSX ends down 28.32 points, or 0.18 percent, at 15,615.52
* Six of the TSX's 10 main groups end lower
By Fergal Smith
TORONTO, Jan 26 (Reuters) - Canada's main stock index fell on Thursday but stayed close to its all-time high as a retreat among materials and energy stocks weighed and investors reacted to a string of earnings reports.
The Toronto Stock Exchange's S&P/TSX composite index closed down 28.32 points, or 0.18 percent, at 15,615.52.
"It's just taking a little bit of a breather," said Sid Mokhtari, market technician and director at CIBC World Markets.
"The price action today is very much reflective of what we have done over the last little while in a very strong move."
The index has advanced more than 2 percent this month after surging 17.5 percent in 2016. On Wednesday, it moved intraday within 11 points of its September 2014 record peak at 15,685.13.
A more protectionist United States is a risk to the outlook for stocks, but for now the market is betting that U.S. President Donald Trump will be able to carry out the policies he has promised, Mokhtari said.
Trump has said he supports lower taxes, fiscal stimulus and lighter regulation.
The most influential movers on the index included cable and wireless company Rogers Communications Inc, which rose 6.6 percent to C$56.04 after reporting better-than-expected adjusted profit on solid wireless growth.
Methanex Corp jumped 9.9 percent to C$67.44 after the methanol supplier posted a sharp jump in profit.
Still, the materials group that includes precious and base metals miners and fertilizer companies lost 1.8 percent as gold miners fell with bullion prices sliding to a two-week low.
Potash Corp declined 2.9 percent to C$25.21 after it forecast a less profitable year than analysts expected, and reported a surprisingly big drop in profit as a deep slump continued in the oversupplied fertilizer sector.
Agrium Inc, with whom Potash Corp plans to merge, fell 2.3 percent to C$139.88.
TransCanada Corp pulled back after hitting all-time highs in the wake of Trump's move this week to get its Keystone XL pipeline back on track. It ended down 1.4 percent at C$63.55.
The energy group fell 0.8 percent even as oil prices rose. U.S. crude oil futures settled $1.03 higher at $53.78 a barrel.
Altagas Ltd fell 6.4 percent to C$31.18 after the energy infrastructure company said it would buy U.S.-based WGL Holdings Inc in a C$8.4 billion deal.
Just four of the index's 10 main groups ended in positive territory, with telecoms jumping 1.8 percent and financials rising 0.4 percent. (Additional reporting by Alastair Sharp; Editing by James Dalgleish)