Canada's main stock index closed up Friday as mining and energy stocks rose, while U.S. stocks also notched gains and the loonie moved higher following positive economic data.

The rise in energy stocks came as crude prices continued their run this week with a 70-cent gain Friday for the August crude contract to close at US$74.15 per barrel.

Over the past four days oil has climbed US$6.07 or 8.9 per cent, sparked in part by a U.S. crackdown on allies buying Iranian oil and supply disruptions at the Syncrude oilsands operation.

The S&P/TSX energy index was up more than one per cent Friday, as were indexes for gold, base metals and materials to help the S&P/TSX composite index close up 97.84 points at 16,277.73. For the week the index was down 1.05 per cent.

High oil prices have helped support the Canadian dollar, but the loonie jumped following the release of stronger-than-expected Canadian GDP figures and Bank of Canada survey results that showed high business confidence.

Overall, the Canadian dollar averaged 75.94 cents US, up 0.57 of a US on Friday.

The Bank of Canada survey showed the highest level of confidence since the second quarter of 2011, though the bank noted many companies were interviewed before the U.S. announced steel and aluminum tariffs.

Economic data was also encouraging, as Statistics Canada said the real gross domestic product edged up 0.1 per cent in April over the previous month, topping the expectations of economists for no change for the month.

The combined data has increased expectations from some that the Bank of Canada will go ahead with a July rate hike.

Benjamin Reitzes, Canadian rates and macro strategist at BMO Capital Markets, said the solid increase in the outlook survey indicator shows the economy was in good shape.

"With governor Poloz saying that the bank will not be shaping policy based on headlines, and the economic backdrop in generally good shape, there's a solid case for a July rate hike," Reitzes wrote in a report.

Allan Small, a senior investment adviser at HollisWealth, however, said there's still a lot of uncertainty of a July hike.

"Right now it's a bit of a coin toss whether they raise rates in July."

He said the move in the loonie can be as much attributed to weakness in the U.S. dollar after a strong run for the currency lately.

"I think it's actually more on U.S. weakness than Canadian strength. I think recent data out of the U.S. has been a little weak, I think that's what's causing the U.S. dollar to fall against a lot of currencies."

He said currencies in general are showing wider swings in value lately.

"Markets are definitely a lot more volatile, moving a lot more quickly, and currency markets are probably even more volatile than the stock market."

In New York, the Dow Jones industrial average closed up 55.36 points at 24,271.41. The S&P 500 index was up 2.06 points at 2,718.37 and the Nasdaq composite index was up 6.62 points at 7,510.30.

The climb in U.S. stocks came after investors focused on business indicators rather than trade disputes, said Small.

"When investors can focus on, in my opinion, what really matters, earnings at corporations, the economy, I think that's when the market moves higher."

The August gold contract closed up $3.50 at US$1,254.50 an ounce and the September copper contract was unchanged at US$2.97 a pound. The August natural gas contract was down two cents at US$2.92 per mmBTU.

Enbridge Inc. closed up $3.10 or 7.06 per cent to $47.00 after Minnesota regulators approved the company's plans to replacing its Line 3 pipeline.

Canadian financial markets are closed on Monday, July 2, in lieu of Canada Day.