Stocks were moving higher as Wall Street drew closer to ending the final day of trading in a volatile year and more in Monday’s Stock Market Update. Health care companies, retailers and technology stocks drove the market’s gains. Despite the upbeat day, the benchmark S&P 500 index was on track for its worst full-year showing in a decade.

STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 index rose 21 points, or 0.9 percent, to 2,506 at closing time. The Dow Jones Industrial Average gained 265 points, or 1.2 percent, to 23,327. The Nasdaq added 50 points, or .8 percent, to 6,635. The Russell 2000 index of smaller-company stocks picked up less than 6 point to 1,344.

Trading has been highly volatile in December, capping a year of turbulence for markets. The major indexes closed last week with their first weekly gain in what’s been an otherwise painful month. The indexes are still all down around 10 percent for the month and are on track for their worst December since 1931.

THE QUOTE: “Last week we really had such a volatile week, and a lot of that had to do with thin trading volumes, some computerized trading and investors just being exhausted from a very difficult fourth quarter,” said Jeff Kravetz, regional investment strategist at U.S. Bank Wealth Management. “Today is the last day of the year and investors are starting to look into next year.”

US-CHINA TRADE: Investors drew encouragement Monday from a tweet from President Donald Trump on Sunday, in which the president said he had a “long and very good call” with Chinese President Xi Jinping. Trump added: “Deal is moving along very well. If made, it will be very comprehensive, covering all subjects, areas and points of dispute. Big progress being made.” Meanwhile, the official Xinhua News Agency cited a Chinese Foreign Ministry spokesman as saying that “China stands ready to work with the United States to move forward the China-U.S. ties which are underpinned by coordination, cooperation and stability.”

Stocks also got a boost in early December when the U.S. and China agreed to a truce on trade, but then plunged when it was unclear what exactly both sides had agreed upon.

LOUSY YEAR: The S&P 500 index, the market’s main benchmark, is on track for a loss of 6.5 percent this year, or 5.2 percent once dividends are included. The last time the index fell for the year on that basis was in 2008 during the financial crisis, when it lost 37 percent. The S&P 500 posted tiny losses in 2011 and 2015, but eked out small gains in both years once dividends were included.

THAT HEALTHY FEELING: Health care stocks were among the biggest gainers. Regeneron Pharmaceuticals rose 2.6 percent to $372.22.

TECH RALLY: Big-name technology companies, a big driver of the market’s gains before things deteriorated in October, also rose. Advanced Micro Devices picked up 3.4 percent to $18.43.

READY TO SHOP: Traders bid up shares in department store chains and other retailers. Best Buy gained 2.5 percent to $52.60. Amazon rose 1.8 percent to $1,503.98.

WEAK SIGNALS: Shares in internet service providers and media companies slumped. DISH Network lost 1.9 percent to $24.49. Facebook slid 2.3 percent to $130.19.

ENERGY: Benchmark U.S. crude oil inched up 0.2 percent to settle at $45.41 a barrel in New York. Brent crude, the benchmark for international prices, gained 1.1 percent to $53.80 a barrel in London.

In other energy futures trading, wholesale gasoline slipped 0.2 percent to $1.32 a gallon. Heating oil rose 1 percent to $1.68 a gallon. Natural gas plunged 11 percent to $2.94 per 1,000 cubic feet.

BOND YIELDS: Bond prices rose. The yield on the 10-year Treasury note fell to 2.68 percent from 2.73 percent late Friday.

CURRENCIES: The dollar fell to 109.61 yen from 110.41 yen on Friday. The euro strengthened to $1.1445 from $1.1442.

METALS: Gold slipped 0.1 percent to $1,281.30 an ounce and silver gained 0.7 percent to $15.54 an ounce. Copper lost 1.9 percent to $2.63 a pound.

OVERSEAS STOCK MARKET UPDATE: In Europe, the CAC 40 of France rose 1.1 percent, ending the year down about 11 percent. Britain’s FTSE 100 closed down 0.1 percent for an annual loss of 12.5 percent. Germany’s DAX, which was closed Monday, has been one of the worst-performing European indexes. It ended in a bear market, down 22 percent from a high in January and 18 percent from the start of the year.

Earlier in Asia, Hong Kong’s Hang Seng rose 1.3 percent, while India’s Sensex gained 0.2 percent. Australia’s S&P ASX/200’s benchmark slipped 0.1 percent. Most other markets were closed for the New Year holiday.

© The Associated Press. All rights reserved.