The S&P 500 rose slightly to a fresh an all-time high on Tuesday and posted its longest winning streak since November.

The broad index closed just above the flatline at 3,192.52 and reached an intraday record of 3,198.25. The S&P 500 also closed higher for the fifth straight session. The Dow Jones Industrial Average and Nasdaq Composite ended the day with record closing highs. The Dow climbed 31.27 points, or 0.1% to 28,267.16 while the Nasdaq also advanced 0.1% to 8,823.36.

Netflix jumped more than 3% after the streaming giant disclosed strong membership growth numbers in key regions, including Asia-Pacific and Europe, the Middle East and Africa. Johnson & Johnson climbed 1.3% after a Morgan Stanley analyst upgraded the stock, noting many of the company's structural issues "have been addressed." Shares of Apple closed 0.2% higher and hit a fresh record high.

Tuesday's move added to the solid upside moves from Monday. The S&P 500 gained 0.7% in the previous session while the Dow advanced more than 100 points. The Nasdaq closed 0.9% on Monday.

"Yesterday's surge has helped this parabolic rally to continue, and while overbought now, … there hasn't been any evidence of price reversing course," said Mark Newton, managing member of Newton Advisors, in a note.

The move higher follows a preliminary trade agreement between the world's two largest economies. Late last week, President Donald Trump and Chinese officials announced that the U.S. and China had agreed to a so-called "phase one" agreement.