NEW YORK (AP) — U.S. stock indexes returned to records 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.

On Tuesday:

The Standard & Poor's 500 index rose 7.17 points, or 0.3 percent, to an all-time high of 2,477.08.

The DoSolid earnings reports from several big companies helped drive U.S. stock indexes to more record highs. w Jones industrial average rose 100.26, or 0.5 percent, to 21,613.43.

The Nasdaq composite added 1.37 points, or less than 0.1 percent, to 6,412.17.

The Russell 2000 index of smaller-company stocks gained 12.33, or 0.9 percent, to 1,450.39.

For the week:

The S&P 500 is up 4.54 points, or 0.2 percent.

The Dow is up 33.36 points, or 0.2 percent.

The Nasdaq is up 24.42 points, or 0.4 percent.

The Russell 2000 is up 14.55 points, or 1 percent.

For the year:

The S&P 500 is up 238.25 points, or 10.6 percent.

The Dow is up 1,850.83 points, or 9.4 percent.

The Nasdaq is up 1,029.06 points, or 19.1 percent.

The Russell 2000 is up 93.26 points, or 6.9 percent.