A big bump in energy shares helped drive Canada’s main stock index higher on Thursday as the loonie took back some gains built over the past few weeks.

The Toronto Stock Exchange’s S&P/TSX composite index finished ahead 19.97 points to 15,191.36, largely due to a 2% gain from shares in the country’s largest oil producers.

Several major Canadian companies released their latest corporate earnings on Thursday.

Among them included Cenovus Energy Inc., which reported a second-quarter profit thanks to its recent purchase of most of the Canadian assets of ConocoPhillips. Its stock was up almost 10%, or 94¢, to $10.89.

The September crude contract was ahead US29¢ to US$49.04 a barrel, but the Canadian dollar lost 0.10 of a U.S. cent to US79.87¢.

Elsewhere, commodities continued to gain as the August gold contract climbed US$10.60 to US$1,260 an ounce, September natural gas jumped US5¢ to US$2.97 per mmBTU, and September copper was up US1¢ to US$2.88 a pound.

In New York, the Dow Jones industrial average climbed 85.54 points to 21,796.55, the S&P 500 index lost 2.41 points at 2,475.42, and the Nasdaq composite index declined 40.56 points to 6,382.19.