(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 .GSPTSE 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 RCIb.TO , which rose 6.6 percent to C$56.04 after reporting better-than-expected adjusted profit on solid wireless growth. Corp MX.TO jumped 9.9 percent to C$67.44 after the methanol supplier posted a sharp jump in profit. 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. GOL/
Potash Corp POT.TO 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. Inc AGU.TO , with whom Potash Corp plans to merge, fell 2.3 percent to C$139.88.
TransCanada Corp TRP.TO 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 CLc1 settled $1.03 higher at $53.78 a barrel. O/R
Altagas Ltd ALA.TO fell 6.4 percent to C$31.18 after the energy infrastructure company said it would buy U.S.-based WGL Holdings Inc WGL.N in a C$8.4 billion deal. four of the index's 10 main groups ended in positive territory, with telecoms jumping 1.8 percent and financials rising 0.4 percent.