* TSX ends up 0.1% at 21,656.05

* Materials, tech stocks lead gains

* CIBC raises PT on goeasy; shares climb

* Industrials fall 0.7%

April 17 (Reuters) - Canada's main stock index ended higher on Wednesday as mining stocks rallied and investors looked ahead to quarterly earnings reports, but gains for the index were held in check after the federal budget proposed raising a tax on investment profits.

The Toronto Stock Exchange's S&P/TSX composite index ended up 13.18 points, or 0.1%, at 21,656.05, after five straight days of declines.

"There is some dip buying going on at the margins," said Elvis Picardo, a portfolio manager at Luft Financial, iA Private Wealth. "Mining stocks, we've seen the rebound after being sold off yesterday."

The materials group, which includes metal miners and fertilizer companies, was up 0.8% as copper prices climbed.

"The big question is whether Q1 earnings will be strong enough to provide the impetus for the markets to grind higher," Picardo said.

Technology was another bright spot, rising 0.6%, and heavily weighted financials added 0.1%. It was helped by a gain of 6.3% for the shares of goeasy Ltd after CIBC raised its price target on the lender to C$200 from C$175.

Canada's budget on Tuesday proposed raising the share of capital gains that is subject to taxation for wealthy individuals as well as for companies and trusts. The measure would come into effect on June 25.

"There might be some selling on stocks that people have big gains in before the tax rate goes up. It could have an impact on the market", said Greg Taylor, a portfolio manager at Purpose Investments.

Among the sectors that declined was industrials. It lost 0.7% and energy was down 0.3% as oil settled 3.3% lower at $82.69 a barrel. (Reporting by Fergal Smith in Toronto and Purvi Agarwal in Bengaluru; Editing by Ravi Prakash Kumar and Josie Kao)