The major equity indexes all moved into positive territory on Tuesday, as Wall Street closed the book on October trading. Part of the reason the Street was able to end October on a positive note was due in no small part to the fact that both Mondelez and Kellogg saw their shares appreciate after they released their quarterly earnings on Tuesday. The three major indexes chalked up their best monthly gains since February.

Mondelez rose 5.4 percent after the Oreo cookie maker reported better-than-expected earnings and revenues, while Kellogg ended the trading day up 6.2 percent following its first sales increase in more than two years. The two

Those stocks enabled the S&P consumer staples sector to lead all the other sectors with a gain of 0.8 percent.

Apple saw its share price close up 1.4 percent to a record high after positive reviews of its much-anticipated iPhone X. The stock provided the largest boost to all the three major indexes.

The tech sector rose 0.4 percent, building on gains following a batch of strong quarterly reports last week.

Investors are awaiting an announcement on the next Federal Reserve chair, which could come this week. President Donald Trump is likely to pick Fed Governor Jerome Powell, who is dovish on interest rates and therefore relatively stock market friendly.

The Fed started its two-day meeting in Washington on Tuesday, although the central bank is widely expected to leave interest rates unchanged in its statement on Wednesday.

The Street is also tracking developments of the tax-cut plan being Congress.

Third-quarter earnings in general have come in modestly above expectations. With more than half the S&P 500 components reported, earnings are estimated to have climbed 7 percent in the quarter, up from an expectation of 5.9 percent growth at the start of October, according to Thomson Reuters I/B/E/S.

However, not all reports have earned a positive stock reaction. Pfizer fell 0.3 percent after the company released its results.

Under Armour fell 23.7 percent after the sportswear company slashed its 2017 forecast.

Qualcomm ended the trading day down 6.7 percent and was the largest drag on the S&P and the Nasdaq after word hit the Street that Apple had designed iPhones and iPads that would no longer use Qualcomm chips. The news sent the shares of Intel up 2.5 percent.

Rockwell Automation rose 7.4 percent. The automation equipment maker said it had rejected an unsolicited acquisition bid from Emerson Electric for more than $27 billion. Emerson fell 3.6 percent.

Approximately 6.8 billion shares changed hands in on the major domestic equity exchanges, a number that was above the 6.1 billion share daily average over the last 20 sessions.