NEW YORK (Reuters) - Wall Street’s major indexes edged higher on Tuesday on a renewed rally fueled by trade optimism, capping off a decade of handsome returns in which the benchmark S&P 500 rose nearly 190%.

Both the S&P 500 and the Nasdaq notched their biggest annual percentage gains since 2013, while the Dow closed 2019 with its biggest yearly percentage gain since 2017. In 2019, the current bull run in U.S. stocks became the longest one on record as trade optimism, dovish monetary policy and an improving economic outlook fueled sharp gains.

On Tuesday, President Donald Trump said on Twitter that the Phase 1 U.S.-China trade deal would be signed on Jan. 15 at the White House, bolstering widespread expectations of a finalized preliminary agreement in early 2020. That development was offset, however, by news of violent protests outside the U.S. embassy in Baghdad.

The session’s modest gains marked a turnaround from Monday, when the S&P 500 and the Nasdaq posted their biggest daily percentage losses in nearly four weeks. U.S. stocks had become overbought, and Monday’s declines helped make room for future gains, said Alec Young, managing director of global markets research at FTSE Russell in New York.

“It helps to have two steps forward, one step back,” he said. “It helps sustain the rally.”

Volume was somewhat lower than usual, with 5.99 billion shares traded on U.S. exchanges, compared with the 6.84 billion average for the full session over the last 20 trading days.

U.S. stock markets will be closed on Wednesday for New Year’s Day.

Traders work at the New York Stock Exchange (NYSE) in New York, U.S., December 31, 2019. REUTERS/Bryan R Smith

(GRAPHIC: U.S. stocks post huge rebound in 2019 - )

The Dow Jones Industrial Average .DJI rose 76.3 points, or 0.27%, to 28,538.44, the S&P 500 .SPX gained 9.49 points, or 0.29%, to 3,230.78 and the Nasdaq Composite .IXIC added 26.61 points, or 0.3%, to 8,972.60.

Wall Street’s major indexes posted significant gains for the month, quarter and year. In December, the Dow added 1.73%, the S&P 500 2.87% and the Nasdaq 3.56%. In the fourth quarter of 2019, the Dow gained 6.02%, the S&P 500 8.55% and the Nasdaq 12.18%.

For the year, the Dow rose 22.33%, the S&P 500 28.9% and the Nasdaq 35.24%.

The benchmark S&P 500 also posted its biggest December percentage gain since 2010.

For the decade, the Dow advanced 173.67%, the S&P 500 189.72% and the Nasdaq 295.42%.

(GRAPHIC: S&P 500 performance by decade - )

Advancing issues outnumbered declining ones on the NYSE by a 1.81-to-1 ratio; on Nasdaq, a 1.64-to-1 ratio favored advancers.

The S&P 500 posted four new 52-week highs and no new lows; the Nasdaq Composite recorded 89 new highs and 26 new lows.