Dec 30 (Reuters) - Australian shares closed higher on Friday, helped by a rally on Wall Street, although the benchmark index posted an annual loss and marked its worst year since 2018.

The S&P/ASX 200 index ended up 0.3% at 7,038.7.

For the year, the benchmark index lost 5.5%. While the index rose 8.7% in the final quarter, this could not outweigh losses from the Ukraine war-led uncertainties seen throughout the year.

"I think there's a lot of money on the sidelines that'll come back into the market in the new year because I think a lot of people are positioned to short the market, and that trade is not coming off," said Brad Smoling, managing director at Smoling Stockbroking.

U.S. data overnight showed the Federal Reserve's policy tightening had begun to impact labour market strength, a sign that rate hikes may slow down soon, helping local markets.

Financials led gains, with the subindex rising 0.4%. Top lender Commonwealth Bank of Australia rose 0.5%, while financial conglomerate Macquarie Group gained 0.6%.

For the year, the index shed 2.7% as rising costs and slowing demand for credit dented the outlook.

Energy stocks added 0.9%, with Woodside Energy advancing 0.9%. The sector is up nearly 40% this year, as oil prices soared on supply worries.

Local mining stocks fell 0.1%, with BHP Group , Rio Tinto and Fortescue falling between 0.4% and 0.7% each.

However, losses were limited by a rally in lithium and rare earth miners. Pilbara Minerals, Liontown Resources and Core Lithium climbed between 1.9% and 5.1% each.

The mining index has risen 7.4% this year.

New Zealand's benchmark S&P/NZX 50 index fell 0.6% or 65.21 points to 11,473.24, while it slid 12% for the year.

(Reporting by Harshita Swaminathan; editing by Uttaresh.V)