U.S. stocks drifted to a mixed finish on Tuesday following several weeks of sharp swings.

The S&P 500 rose 0.4% to pull within 3% of its record set in July. It flipped between small gains and losses through the day.

The Dow Jones industrial average fell 92 points, or 0.2%, and the Nasdaq composite rose 0.8%.

Oracle jumped 11.4% to an all-time high and helped lead the market after delivering better profit and revenue for the latest quarter than analysts expected. Gains for several influential Big Tech stocks also helped drive indexes, including rises of 2.1% for Microsoft and 2.4% for Amazon.

But banks weighed on the market following discouraging comments from several executives at an industry conference.

JPMorgan Chase fell 5.2% after its chief operating officer said analysts’ expectations for an underlying measure of its profit may be “too high.” Goldman Sachs dropped 4.4% after its chief executive said its trading revenue for the current quarter is trending down at the moment.

Stocks of energy producers were also weak after oil prices fell. A barrel of Brent crude, the international standard, is near its lowest price since 2021, and it’s been sinking amid worries about how much fuel a fragile global economy will burn. That helped drag Exxon Mobil down 3.6% and Chevron down 1.5%.

All told, the S&P 500 rose 24.47 points to 5,495.52. The Dow dropped 92.63 to 40,736.96, and the Nasdaq composite added 141.28 to 17,025.88.

In the bond market, Treasury yields eased. The yield on the 10-year Treasury fell to 3.64% from 3.70% late Monday.

Like stocks, Treasury yields have been swinging sharply ahead of the Federal Reserve’s meeting next week, where the widespread expectation is for it to cut its main interest rate for the first time since the COVID crash of 2020.

On Wednesday, economists expect the latest report on inflation to show prices for U.S. consumers were 2.6% higher in August than a year earlier. That would be a slowdown from July’s inflation rate of 2.9%

— Associated Press