The Toronto Stock Exchange's S&P/TSX composite followed U.S. stocks in ending slightly up as investors focused on President Donald Trump's struggle to push through a healthcare bill and snapped up stocks after a steep drop the day before.

The Toronto Stock Exchange's S&P/TSX composite index <.GSPTSE> ended up 35.33 points, or 0.23 percent, at 15,348.46.

"It's just the correlation with the U.S. market," said Marcus Xu, president and director, portfolio manager, of M.Y. Capital Management Corp.

"Yesterday there was some jitter on the financials and the market was down quite a bit, and today I think it's just a little bit of rebound."

The energy group climbed 0.4 percent, with Suncor Energy Inc (>> Suncor Energy Inc.) up 0.4 percent at C$40.70, and TransCanada Corp (>> TransCanada Corporation) up 0.7 percent at C$61.50.

The increase came even as the price of oil, one of Canada's leading exports, slipped to its lowest since late November after data showed record-high U.S. crude inventories rising faster than expected, raising doubts over the viability of OPEC-led output cuts.

U.S. crude prices were down 0.3 percent to $48.12 a barrel, while Brent crude lost 0.5 percent to $50.72.[O/R]

The financials group slipped 0.2 percent. Royal Bank of Canada (>> Royal Bank of Canada) fell 0.2 percent to C$95.21, and Toronto Dominion Bank (>> Toronto-Dominion Bank) slipped 0.2 percent to C$64.72.

Industrials rose 0.2 percent.

The materials group, which includes precious and base metals miners and fertilizer companies, added 0.3 percent. Barrick Gold Corp (>> Barrick Gold Corp) was down 0.04 percent to C$25.98.

Gold futures rose 0.1 percent to $1,247.7 an ounce. [GOL/]

Copper prices advanced 0.6 percent to $5,808.25 a tonne. [MET/L]

Investors had been waiting on a federal budget released after the close.

Canada posted a slightly larger surplus in January of C$1.24 billion, up from C$1.07 billion a year ago as revenues increased in most areas, including corporate income tax, the Finance Department said on Wednesday.

(Reporting by Ethan Lou in Calgary, Alberta; Editing by James Dalgleish)