Canada's main stock index closed with a modest gain Wednesday, while U.S. markets were mixed as rising bond rates continued to temper equities.

The Toronto Stock Exchange's S&P/TSX composite index closed up 32.75 points at 15,509.75, led by energy and industrials as the oil price showed a small gain.

In New York, the Dow Jones industrial average closed up 59.70 points at 24,083.83. The S&P 500 index ended up 4.84 points at 2,639.40 and the Nasdaq composite index closed down 3.62 points at 7,003.74.

Markets oscillated throughout the day as positive earnings data was countered by the rising bond rates in the U.S., said Michael Currie, senior investment advisor at TD Wealth.

"The three per cent on the 10 year treasury note is what everyone's still talking about...the earnings have been pretty good across the board, but the market's not really reacting to it, the market is almost discounting them after two years of earnings really driving things."

The 10 year bond rate is the highest in about four years and just a point or two away from the highest since 2011, so it's been tempering equities, said Currie.

"You've got strong earnings wrestling against rising rates, which could suppress earnings, so I think that's probably why we're seeing a lot of up and down on the markets today, we're up 50, down 50, up 100 down 100, I think there's a bit of a tug of war there."

He said bond rates are rising as inflation looks to be increasing, especially in the U.S. as oil prices rise. Rising crude prices could in turn temper future growth, but the rising bond rates should mean more benchmark rate increases especially in the U.S., said Currie.

"Lot of things pushing in different directions, but at least on the three per cent on the 10 year bond, we know we're going to see more rate hikes this year which eventually has to push it up."

Inflation is showing some increases in Canada, but Bank of Canada Governor Stephen Poloz said earlier this week he wasn't overly concerned with short-term inflation numbers above the bank's two per cent target.

The Canadian dollar averaged 77.71, down 0.24 of a US cent as the loonie continued to slip from the oil price-driven rise.

The June crude contract ended up 35 cents to US$68.05 per barrel and the June natural gas contract closed down one cent at US$2.80 per mmBTU.

The June gold contract closed down $10.20 at US$1,322.80 an ounce and the May copper contract closed down one cent at US$3.13 a pound.

Cenovus Energy reported a higher-than-expected $914-million net loss in the first quarter, blaming clogged export pipelines for its worst heavy oil price discounts in five years.

The company's stock price still saw a five per cent gain on the Toronto Stock Exchange as it said it was holding back on new investment and expects crude-by-rail shipments to increase in the second half of the year.