Stocks are edging lower on Wall Street in midday trading Tuesday on the final day of 2019.

Losses in health care, technology and communication services companies outweighed gains in banks, materials and industrial stocks. Bond prices fell, sending yields higher. Gold rose and crude oil fell.

The S&P 500 is on pace to finish the year up 28.6%, the biggest annual gain since 2013. The benchmark index has risen five straight weeks, hitting all-time highs along the way. It's on track to close out December with its fourth consecutive monthly gain.

The market's trajectory to a strong finish for the year began in October as stocks emerged from a late-summer slump caused by fears that the U.S. economy could be headed for a recession. Those concerns eased as investors drew encouragement from surprisingly good third-quarter corporate earnings, a third interest rate cut by the Federal Reserve and other data showing the economy was not slowing as much as economists feared.

A truce in the 17-month U.S.-China trade war helped keep investors in a buying mood through the end of the year. Washington and Beijing announced in December they reached an agreement over a “Phase 1” trade deal that calls for the U.S. to reduce tariffs and China to buy larger quantities of U.S. farm products.

On Tuesday, President Donald Trump tweeted that he will sign the initial trade deal with China at the White House next month. He also said that he plans to travel to Beijing at a later date to open talks on other sticking points in the U.S.-China trade relationship that remain to be worked out, including Chinese practices the U.S. complains unfairly favor its own companies.

KEEPING SCORE: The S&P 500 was down 0.1% as of noon Eastern time. The Dow Jones Industrial Average was down 41 points, or 0.1%, to 28,420. The Nasdaq composite rose less than 0.1%. The Russell 2000 index of smaller company stocks rose 0.4%.

U.S. markets are open for a full trading day before the New Year's Day holiday on Wednesday. They re-open Thursday.

BOND YIELDS: Bond prices fell. The yield on the 10-year Treasury note rose to 1.91% from 1.89% late Thursday.

COMMODITIES: Benchmark U.S. crude oil lost 66 cents to $61.01 per barrel. Brent crude, the international standard, gave up 67 cents to $66 per barrel.

The price of gold tose $5.50 to $1,524.10 per ounce.

MARKETS OVERSEAS: Britain's FTSE 100 slipped 0.6%, while the CAC 40 in Paris shed 0.1%. Germany's markets were closed. In Asia, Hong Kong's Hang Seng index lost 0.5%, while in Australia the S&P ASX 200 declined 1.7%. Many markets, including those in Tokyo and Seoul, have already ended trading for 2019.