June 24 (Reuters) - Gains in technology stocks helped the main Australian index round off the week on a positive note, although worries about a recession were a drag on the heavyweight sectors of energy and mining.

The S&P/ASX 200 index closed 0.77% higher at 6,578.7 on Friday and was up 1.61% for the week, its biggest weekly gain in over three months.

Stock markets globally have been whipsawed in recent sessions as investors debate whether equity valuations have hit a bottom in the wake of a sharp selloff induced by fears of an economic slowdown.

"I think the market is well and truly oversold at this juncture and the selling is now coming to an exhaustion," said Brad Smoling, managing director at Smoling Stockbroking.

"I suspect bargain hunters are starting to maybe have a nibble. Whether this is the bottom is hard to tell."

Tech stocks advanced 6%, mirroring gains in their Wall Street peers, which were propped up by a fall in benchmark U.S. Treasury yields.

Shares of buy now, pay later firm Zip Co soared 21.6% and was among the top gainer on ASX 200, while those of ASX-listed rival Block Inc climbed nearly 11%.

Gold stocks rose 0.23%, even as bullion prices headed for their second straight week of declines.

Resolute Mining rose 6.7% and was among the top gainer on the sub-index, while Northern Star Resources edged 0.6% higher.

Energy and mining stocks, however, slipped 1.45% and 0.2% respectively

Qantas Airways fell 1.6% after the carrier said it would cut domestic capacity through March 2023, citing higher fuel prices and staffing issues at airports.

New Zealand's stock market was closed on Friday due to a public holiday. (Reporting By Navya Mittal in Bengaluru; Editing by Anil D'Silva)