* TSX ends up 0.3% at 20,990.22

* Posts its highest weekly close since April 2022

* Technology rallies 0.7%

* Materials and energy post gains

Jan 12 (Reuters) - Canada's main stock index rose on Friday to post its highest weekly closing level in 21 months, helped by gains for technology and resource shares as well as bullish technical signals for the market.

The Toronto Stock Exchange's S&P/TSX composite index ended up 71.82 points, or 0.3%, at 20,990.22, its highest weekly closing level since April 2022. For the week, it was up 0.3%.

"There's a lot of confusion out there in the market among investors that are just following the news flow, the geopolitics and interest rates, but what they're missing out (on) is the big picture," said Brandon Michael, senior investment analyst at ABC Funds. "The market is being driven higher by technicals. The technicals are very bullish right now."

The Toronto market has posted a series of higher peaks and troughs since October, notching a gain of nearly 12% over that period.

The technology sector added to its recent rally on Friday, rising 0.7%.

Energy rose 0.6% as oil settled 0.9% higher at $72.68 a barrel following overnight air and sea strikes by the U.S. and Britain on Houthi targets in Yemen.

The materials sector, which includes precious and base metals miners and fertilizer companies, was up 1.6% as the price of gold benefited from safe-haven buying and the prospect of Federal Reserve interest rate cuts.

Some hopes of a speedy rate cut by the Fed were restored after a softer-than-expected reading on U.S. producer prices in December.

Shares of Canadian uranium miners Cameco, Denison Mines and NexGen Energy Ltd rallied after Kazakhstan-based miner Kazatomprom flagged a production shortfall in 2024. NexGen ended up 11.1%. (Reporting by Fergal Smith in Toronto and Purvi Agarwal and Amruta Khandekar in Bengaluru Editing by Ravi Prakash Kumar and Matthew Lewis)