The Toronto Stock Exchange's S&P/TSX composite index <.GSPTSE> closed up 32.75 points, or 0.21 percent, at 15,509.75.

Some investors have worried about the prospect of higher global borrowing costs after the U.S. 10-year Treasury note yield reached 3 percent on Tuesday for the first time in four years.

The energy group rose 1.5 percent on Wednesday as oil prices climbed.

U.S. crude oil futures settled 0.5 percent higher at $68.05 a barrel as investors shrugged off data showing rising domestic fuel inventories and production. Oil is one of Canada's major exports. [O/R]

The largest percentage gainer on the TSX was Baytex Energy Co, which rose 7.6 percent, while the largest decliner was Aurora Cannabis, down 5.3 percent.

Among the most active Canadian stocks by volume were Cenovus Energy, up 5.0 percent to C$12.80; Baytex Energy and Katanga Mining, down 16.1 percent to C$0.94.

Cenovus expects Canada's railways to be able to carry more oil in the second half of this year, easing transport bottlenecks and allowing it to stick to previous annual forecasts.

Gains for railroad shares helped boost industrials, which ended up 0.9 percent.

Five of the index's 10 main groups rose.

The materials group, which includes precious and base metals miners and fertilizer companies, lost 0.5 percent.

Gold futures fell 0.7 percent to $1,322.0 an ounce. [GOL/]

The TSX posted seven new 52-week highs and seven new lows.

(Reporting by Fergal Smith; Editing by James Dalgleish)

By Fergal Smith