TORONTO — A big bump in energy shares helped drive Canada’s main stock index higher Thursday, as the loonie took back some gains built over the last 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 two per cent surge from shares in the country’s largest oil producers.A number of major Canadian companies released their latest corporate earnings.Among them included Cenovus Energy (TSX:CVE), which reported a second-quarter profit thanks to its recent purchase of most of the Canadian assets of ConocoPhillips.The Calgary-based company reported a quarterly profit of $2.64 billion or $2.37 per share, including a $1.8-billion non-cash revaluation gain on its interest in an oilsands joint venture with ConocoPhillips that it acquired full ownership in.The profit compared with a loss of $267 million or 32 cents per share in the same quarter last year. Gross sales totalled $4.08 billion, up from nearly $2.75 billion.Its stock was up nearly 10 per cent, or 94 cents, to $10.89.Crude prices rallied for a third day in a row amid hopes that Saudi Arabia’s pledge to cut exports next month will make a significant dent in the global supply glut.The September crude contract was ahead 29 cents to US$49.04 per barrel.“I believe the era of high oil prices is over,” said Allan Small, a senior investment adviser at Holliswealth. “Prices may go higher temporarily but I’m not getting excited about oil.”Small believes demand for crude will decrease as electric vehicles become more popular and growth worldwide begins to stagnant.In currency markets, the Canadian dollar lost 0.10 of a U.S. cent to 79.87 cents US.Earlier this week, the loonie hit 80 cents US, a level it hasn’t closed at in more than two years. It’s march upwards has been helped by a weakening greenback and expectations that the Bank of Canada is tightening monetary policy.Since May, the loonie has risen about 10 per cent, fuelled by the central bank’s decision earlier this month to hike its key benchmark interest rate for the first time in close to seven years.It’s now anticipated that there will be one or possibly two more rate hikes before the end of the year as signs continue to point to a strengthening economy.Elsewhere, commodities continued to gain as the August gold contract climbed $10.60 to US$1,260 an ounce, September natural gas jumped five cents to US$2.97 per mmBTU, and September copper was up one cent to US$2.88 a pound.In New York, the Dow Jones industrial average climbed 85.54 points to 21,796.55, capping a second straight day of record highs. The S&P 500 index lost 2.41 points at 2,475.42, while the Nasdaq composite index declined 40.56 points to 6,382.19.Follow @LindaNguyenTO on Twitter.