(AP) -- A last-minute burst of selling pulled the major U.S. stock indexes mostly lower Wednesday, ending the market's five-day winning streak.
The S&P 500 index and Dow Jones Industrial Average finished with tiny losses that left them just below their all-time highs set a day earlier. The Nasdaq composite eked out a slight gain, giving it its fifth-straight record high.
Trading was listless most of the day in the absence of major new economic data and only a few corporate earnings reports for investors to mull over. Stocks have jumped recently on optimism around a "Phase 1" trade deal announced last week between the United States and China, among other factors. But after five straight days of gains, the S&P 500 had less fuel to push higher.
"The market doesn't seem like it's stretched, so it's not surprising that we're seeing it kind of slowly moving up higher," said Veronica Willis, investment strategy analyst at Wells Fargo Investment Institute. "But I would not be surprised to see a little bit of profit-taking as we're getting these record highs."
Losses in banks, industrial stocks, household goods makers and technology companies helped pull the market lower. They offset gains in real estate, communication services, health care and elsewhere in the market.
The S&P 500 fell 1.38 points, or less than 0.1%, to 3,191.14. The Dow dropped 27.88 points, or 0.1%, to 28,239.28. The Nasdaq composite rose 4.38 points, or 0.1%, to 8,827.73, a record.
Smaller-company stocks outperformed the rest of the market. The Russell 2000 index gained 4.17 points, or 0.3%, to 1,661.73.
More stocks rose than fell on the New York Stock Exchange.
Treasury yields rose slightly. The yield on the 10-year Treasury climbed to 1.92% from 1.89% late Tuesday.
Despite the last-minute dip, stocks are on track for strong gains this year. The benchmark S&P 500 is up 27.3%, while the Dow is up 21.1%. The Nasdaq, which is heavily weighted with technology stocks, is up 33%.
Stocks have been mostly hovering near their recent all-time highs this week. Investors have appeared content this week to hold on to their gains from a fall runup in the market. Traders have drawn encouragement from the U.S. and China's steps to de-escalate their trade conflict, including reaching a limited deal on trade on Friday.
For now, at least, the pact has helped ease a key source of uncertainty for investors heading into next year.
Wednesday's historic House of Representatives session to impeach President Donald Trump on charges of abuse of power and obstructing Congress didn't appear to have any impact on the market.
"This is what the market already expected, that it would go to a vote in the House and once it eventually moves on to the Senate the president won't be removed from office," Willis said. "There are no surprises on that front, which is why the market isn't reacting much to it."
Investors like Trump's approach of low taxes and less regulation for businesses, but they see his removal from office as unlikely because the Republican-controlled Senate would decide his fate following a House impeachment vote.
Traders had their eye on a mixed batch of corporate earnings reports Wednesday.
FedEx was the biggest loser in the S&P 500 after the package delivery giant cut its profit forecast for its fiscal year and reported weaker quarterly earnings than analysts expected. The company cited "weak global economic conditions" and higher expenses.
The stock slumped 10%. FedEx's woes also pulled shares in rival UPS lower. That stock gave up 1.9%.
General Mills added 1.9% after it reported stronger profit for the latest quarter than analysts expected. The company behind Haagen-Dazs ice cream and Yoplait yogurt said its sales were flat from a year ago, which was a touch weaker than analysts expected, but it made more in profit from each $1 in sales than Wall Street forecast.
Cigna climbed 2.4% after the company agreed to sell its group life and disability coverage business for $6.3 billion.
Cintas added 2% after it reported stronger earnings and revenue for the latest quarter than Wall Street expected. The company, which provides uniforms, restroom supplies and other products for businesses, also raised its profit forecast for the fiscal year.
Tesla shares rose 3.7%, reaching an all-time high. The electric car maker's stock is up 18.1% so far this year. It's jumped 54.4% since Oct. 23, when it reported a surprise profit and reaffirmed its goal to sell 360,000 vehicles this year.
Several department store chains also notched solid gains. Macy's rose 3.1%, L Brands climbed 3.3% and Nordstrom picked up 3%.
Benchmark crude oil fell 1 cent to settle at $60.93 a barrel, snapping a five-day winning streak. Brent crude oil, the international standard, rose 7 cents to close at $66.17 a barrel.
Wholesale gasoline fell 1 cent to $1.68 per gallon. Heating oil declined 1 cent to $2.02 per gallon. Natural gas fell 3 cents to $2.29 per 1,000 cubic feet.
Gold fell $2.00 to $1,472.60 per ounce, silver fell 3 cents to $16.95 per ounce and copper was unchanged at $2.82 per pound.
The dollar rose to 109.60 Japanese yen from 109.49 yen on Tuesday. The euro weakened to $1.1115 from $1.1147.
Major European markets closed mostly lower.