Canada's main stock index rebounded on Wednesday from a 2017 low hit in the previous session, led by gains for natural resource shares as commodity prices rallied, while investors took the latest Federal Reserve interest rate hike in stride.

The Fed raised rates for the second time in three months, while officials at the U.S. central bank stuck to their outlook for two more rate hikes this year and three in 2018.

"If they raise rates because the economy is moving ahead and inflation is relatively benign ... then I think the market will readily accept it," said Ian Nakamoto, equity specialist at MacDougall, MacDougall & MacTier, a division of Raymond James.

"The last thing we need is for them to be behind the curve, because we always get rates much higher than expected and then you come down with a thud, the economy and the stock market."

The Toronto Stock Exchange's S&P/TSX composite index closed up 141.30 points, or 0.92 per cent, at 15,520.91. The index had its lowest close of the year on Tuesday.

The energy sector climbed nearly three per cent as oil prices pulled out of a dive, with the most influential gainers including Encana Corp, which rose 5.7 per cent to $14.69.

U.S. crude oil futures settled US$1.14 higher at US$46.86 a barrel on a surprise drawdown in U.S. crude inventories and data from the International Energy Agency suggesting OPEC cuts could create a crude deficit in the first half of 2017.

The materials group, which includes precious and base metals miners and fertilizer companies, jumped 4.4 per cent as higher prices for copper and other industrial metals boosted base metal miners. Gold producers also gained as bullion prices rose.

Copper prices advanced 0.8 per cent to US$5,863.85 a tonne and gold futures rose 1.6 per cent to US$1,221.2 an ounce.

The financials group was the only one of the index's 10 main groups to lose ground, falling 0.5 per cent as bond yields fell and after Canada's financial watchdog said it will review business practices at federally regulated institutions following allegations they sold products to consumers without obtaining their consent.

Higher bond yields would lower the value of insurance companies' liabilities and increase net interest margins of banks.

Still, Manulife Financial Corp rose 0.7 per cent to $24.49. It has been granted a license that will allow it to launch investment products in China through a wholly-owned local subsidiary.  

U.S. MARKETS

U.S. stocks rose sharply on Wednesday after the Federal Reserve raised interest rates for the second time in three months, as expected.

The Fed, which raised its target rate by 25 basis points, or a quarter of a percentage point, to between 0.75 and 1.00 per cent, did not however flag any plan to accelerate the pace of monetary tightening, a concern that had lingered among some market participants.

Markets were expecting the Fed's decision and traders had priced in more than a 90 per cent chance of a quarter-point rate increase, according to federal funds futures.

"People were thinking the Fed might be more aggressive, so the fact that they weren't means more complacency and a continued course," said Eric Schoenstein, co-portfolio manager of the Jensen Quality Growth Fund in Portland, Oregon.

"The statement was not as hawkish as it might have been."

The Dow Jones Industrial Average rose 112.73 points, or 0.54 per cent, to close at 20,950.1, the S&P 500 gained 19.81 points, or 0.84 per cent, to 2,385.26 and the Nasdaq Composite added 43.23 points, or 0.74 per cent, to 5,900.05.

The Russell 2000 index of small-cap stocks rose 1.5 per cent, while financials on the S&P 500 were the worst-performing sector.

U.S. retail sales recorded their smallest gain in six months in February, setting U.S. gross domestic product on track to grow at a 0.8 per cent annualized pace in the first quarter, according to the Atlanta Fed's latest forecast.

Energy stocks boosted the S&P 500 as oil prices rose for the first time in more than a week on a surprise drawdown in U.S. crude inventories. U.S. crude gained 2.7 per cent to US$49.01 per barrel and Brent added 2.1 per cent to US$51.99.

Exxon shares rose 1.2 per cent and Chevron added 1.4 per cent.

Apple was up 1.1 per cent at US$140.46 after RBC raised its price target on the stock.

Twitter was down 1.9 per cent at US$15.03 after a number of prominent accounts on the microblogging website were hacked.

Advancing issues outnumbered declining ones on the NYSE by a 6.84-to-1 ratio; on Nasdaq, a 2.28-to-1 ratio favored advancers.

The S&P 500 posted 74 new 52-week highs and two new lows; the Nasdaq Composite recorded 125 new highs and 42 new lows.

About 7.82 billion shares changed hands on U.S. exchanges, higher than the 6.98 billion daily average over the last 20 sessions.