The S&P 500 closed lower Tuesday for the first time in nine sessions as investors took some profits after an October rally and awaited key inflation data ahead.

The broad equity index retreated nearly 0.4% to 4,685.25. The Dow Jones Industrial Average shed 112.24 points, or 0.3%, to close at 36,319.98. The Nasdaq Composite ticked down 0.6% to 15,886.54.

All three major averages dipped from record highs. The S&P 500 on Monday posted its 64th record close of the year and eighth straight positive day — its longest winning streak since April 2019.

Loading chart…

The October producer price index increased 0.6% month over month, the Labor Department said Tuesday, in line with the Dow Jones consensus estimate. Still, wholesale prices jumped 8.6% in October from a year ago, the hottest annual pace on record in nearly 11 years.

Investors are awaiting the release of another key inflation reading Wednesday. The closely watched October consumer price index is also expected to show a 0.6% jump compared to the prior month.

“Bottom line, while today’s data was as expected, the numbers are certainly eye opening in terms of the pace of gains,” Bleakley Advisory Group chief investment officer Peter Boockvar said in a note.

PayPal on Tuesday was a notable laggard on the S&P 500 and Nasdaq Composite, sinking roughly 10.5%. The digital payments company missed on quarterly revenue expectations and issued weaker-than-expected fourth-quarter and full-year guidance.

Tesla shares fell nearly 12%, also weighing on the S&P 500 and Nasdaq Composite. The stock continued its retreat after founder Elon Musk this weekend asked in a Twitter poll whether he should sell 10% of his stock, with nearly 58% of respondents saying yes. Even after Tuesday’s pullback, Tesla is up 45% this year.

On the upside, shares of GE added about 2.7% after the industrial giant announced it will split into three public companies focusing on aviation, healthcare and energy. The stock led gains on the S&P 500.

Stock picks and investing trends from CNBC Pro:

Despite Tuesday’s pause, the S&P 500 is up more than 24% in 2021.

Strong earnings results have boosted stocks to new highs. Through Tuesday’s close, 460 companies in the S&P 500 have reported quarterly results, with 81% beating earnings estimates, according to FactSet.

“With Q3 earnings season winding down, economic data and the progress in economic re-openings will gain in importance in investors’ focus from here to the end of the year,” noted John Stoltzfus, chief investment strategist at Oppenheimer Asset Management.