NEW YORK - U.S. stocks were little changed on Thursday and crude oil prices retreated as investors prepared to close the book on a turbulent year of pandemic, recession and recovery.

All three major U.S. stock indexes were near flat, on track to exit 2020 like a lamb, much the way they entered it. But in the intervening months, they both roared and plummeted as economic shutdowns to contain the coronavirus brought markets to their knees.

The indexes are on course to end the year on a high note. Equities bounced back with a vengeance following the plunge in March, and the Nasdaq, S&P 500 and Dow are set to show respective annual gains of around 43%, 15% and 6%.

"Unless there's a big news item, traders and investors are happy with a 15% year for the S&P 500," said Oliver Pursche, president of Bronson Meadows Capital Management in Fairfield, Connecticut. "The vaccine rollout is coming along - that's a positive that's being offset by surging coronavirus cases."

Pursche believes the momentum could carry over into the new year.

"I'm optimistic for 2021 in terms of equity returns," he said. "We could see another double-digit year for the S&P, which would make it an unbelievable four-year run."

Initial jobless claims unexpectedly dropped for the second straight week, according to the Labor Department, but remain elevated, suggesting layoffs remain stubbornly high as the economy stumbles through a COVID-19 resurgence. 

President Donald Trump was expected to fly back to Washington on Thursday, cutting his New Year's Eve festivities short to pick up his fight with Congress over a defense bill and stimulus checks. 

Nations around the world struggle to deploy vaccines to end the global health crisis. About 2.8 million Americans have been inoculated so far, falling well short of the year-end goal of 20 million.

Worldwide, deaths from COVID-19 have surpassed 1.8 million. In the United States, more than 340,000 have died from the disease.

The Dow Jones Industrial Average fell 19.05 points, or 0.06%, to 30,390.51, the S&P 500 gained 1.42 points, or 0.04%, to 3,733.46 and the Nasdaq Composite dropped 10.55 points, or 0.08%, to 12,859.45.

European stocks ended the session lower as tighter coronavirus restrictions in the UK and higher U.S. tariffs on some EU products dampened optimism on Britain's last day as a member of one of the world's largest trading blocs. 

The pan-European STOXX 600 index lost 0.32% and MSCI's gauge of stocks across the globe shed 0.13%.

Emerging market stocks rose 0.21%. MSCI's broadest index of Asia-Pacific shares outside Japan closed 0.07% higher, while Japan's Nikkei lost 0.45%.

Crude oil prices dipped on continued weak demand and are on course to end 2020 about 20% lower than they were at the start of the year.

U.S. crude fell 0.41% to $48.20 per barrel and Brent was last at $51.18 per barrel, down 0.87% the day.

U.S. Treasury yields were lower on the last trading day of the year, pulling the yield curve flatter, as thin volume exaggerated market moves.

Benchmark 10-year notes last rose 3/32 in price to yield 0.9165%, from 0.926% late on Wednesday.

The 30-year bond last rose 9/32 in price to yield 1.6502%, from 1.662% late on Wednesday.

The dollar was slightly higher against a basket of world currencies, but remained on track for its worst year since 2017 as expectations for further fiscal aid and easy monetary policy from the U.S Federal Reserve prompted investors to shun the greenback. 

The dollar index rose 0.22%, with the euro down 0.49% to $1.2235.

The Japanese yen weakened 0.05% versus the greenback at 103.25 per dollar, while Sterling was last trading at $1.3664, up 0.31% on the day.

Gold prices rose, and the safe-haven metal was set to notch its best year in a decade due to economic uncertainties caused by the pandemic.

Spot gold added 0.3% to $1,899.13 an ounce.

(Reporting by Stephen Culp; Additional reporting by Tommy Wilkes in London; Editing by Dan Grebler) ((stephen.culp@thomsonreuters.com; 646-223-6076;))