Canada's main stock index rose on Tuesday as energy and cyclical shares gained after investors returned from a long weekend, although losses in U.S. equities kept sentiment in check.

At 9:47 a.m. ET (13:47 GMT), the Toronto Stock Exchange's S&P/TSX composite index was up 44.19 points, or 0.22%, at 20,241.8, and could rise for a third straight session, if gains hold.

The energy sector climbed 2.4% with oil producers Whitecap Resources and MEG Energy, up nearly 3%, the largest percentage gainers on the TSX, while the consumer staples advanced 1.0%.

The financials sector gained 0.5%, ahead of earnings from Canada's major lenders with Bank of Nova Scotia and Bank of Montreal reporting results on Wednesday.

"We had last lockdowns coming off over the course of the quarter in Canada, so what does this mean for dividends and loan lots? So there's going to be quite a bit to digest in the earnings reports," said Colin Cieszynski, chief market strategist at SIA Wealth Management.

Canada's top six banks are expected to post an average 12% drop in second-quarter earnings sequentially, as increased expenses and loan-loss reserves and lower investment banking revenues outweigh strong loan growth and margin expansion from rising interest rates.

The materials sector, which includes precious and base metals' miners and fertilizer companies, added 0.4% as bullion prices strengthened.

The benchmark index, down 4.8% so far this year, has outperformed its North American counterparts, as resilience in commodities has helped it cushion the impact of the broader risk-off sentiment.

On the economic front, domestic factory sales most likely rose 1.6% in April from March, while wholesale trade most likely edged up 0.2% in April from March, Statistics Canada said.

(Reporting by Amal S in Bengaluru; Editing by Vinay Dwivedi)