US stock indexes returned to records on Tuesday as corporate profits continue to come in better than analysts expected.
McDonald's and Caterpillar were among the big companies that reported healthier-than-forecast results.
Sharp moves higher in prices for oil, metals and other commodities also helped lift companies that produce energy and raw materials.
That more than offset losses for health care companies and stocks that pay relatively big dividends, which were hurt by a rise in Treasury yields.
The Standard & Poor's 500 rose 7.17 points, or 0.3%, to an all-time high of 2,477.08. It was the first gain for the index in four days.
The Dow Jones industrial average rose 100.26, or 0.5%, to 21,613.43.
The Nasdaq composite added 1.37 points, or less than 0.1%, to 6,412.17, and the Russell 2000 index of small-cap stocks gained 12.33, or 0.9%, to 1,450.39.
Both the Nasdaq and Russell set records.
Leading the way for the market were energy stocks, which benefited from a second strong day for the price of oil.
Benchmark US crude rose 1.55 dollars, or 3.3%, to settle at 47.89 dollars per barrel. Brent crude, the international standard, gained 1.60 dollars, or 3.3%, to 50.20 dollars a barrel.
That helped energy stocks in the S&P 500 climb 1.3%, tied for the biggest gain among the 11 sectors that make up the index.
Devon Energy rose 1.24 dollars, or 3.9%, to 32.98 dollars, for example, while Marathon Oil gained 46 cents, or 3.9%, to 12.34 dollars.
Financial stocks were also strong after a pick-up in interest rates raised expectations that banks could charge more for loans and pocket bigger profits.
The yield on the 10-year Treasury note climbed to 2.32% from 2.26% late Monday. The two-year yield climbed to 1.38% from 1.36%, and the 30-year yield rose to 2.91% from 2.83%.
The rise in yields came as the Federal Reserve began a two-day policy meeting on interest rates.
The central bank has already raised rates three times since December, but few investors expect it to make another move when it announces its decision Wednesday.
Most expect the next rate increase to come later this year.
"There's a lot of hope built into the market at current levels," said Rob McIver, portfolio manager at the 6.3 billion dollar Jensen Quality Growth fund. "We're cautioning investors to be cautious and conservative."
Technology stocks have been the year's biggest stars so far, as investors have been hungry for anything with the potential to grow quickly in a slow-growing global economy.
But tech stocks in the S&P 500 dipped 0.2% Tuesday after several reported results that fell short of expectations.
Seagate Technology sank 6.56 dollars, or 16.5%, to 33.20 dollars after the maker of hard drives and other electronic data storage reported weaker revenue and earnings than analysts had forecast, for example.
On the opposite side was Caterpillar, which jumped 6.36 dollars, or 5.9%, to 114.54 dollars after reporting better results for the latest quarter than analysts expected. It also raised its forecast for revenue and profit for the full year, citing increased demand across many of its markets.
McDonald's rose 7.22 dollars, or 4.8%, to 159.07 dollars after its revenue and earnings for the latest quarter topped Wall Street's forecast. The burger chain has been drawing in customers with a new line of premium of burgers.