NEW YORK (AP) -- U.S. stocks bounced back to record highs Tuesday as investors put an end to a two-day drop for technology companies. Energy and consumer-focused companies also made outsize gains.
In a reversal from the two previous days, investors put money into companies that stand to benefit from faster economic growth, including retailers, makers of basic materials like paints and chemicals, energy companies and banks. Big-dividend companies, which are usually considered safer investments, did not do as well as the rest of the market.
Tech companies reversed their losses from Monday, although they remain well below their peak from last week.
"There's no question that the rally in that sector can continue as long as investors' sentiment remains positive," said Brian Rehling, co-head of global fixed income strategy at Wells Fargo Investment Institute. Rehling said he believes tech stocks are a bit too high, but not by a huge amount.
The Standard & Poor's 500 index picked up 10.96 points, or 0.5 percent, to 2,440.35. The Dow Jones industrial average rose 92.80 points, or 0.4 percent, to 21,328.47.
The Nasdaq composite, which has a large concentration of technology companies, rose 44.90 points, or 0.7 percent, to 6,220.37, but did not get back to its record highs. The Russell 2000 index of smaller-company stocks added 6.77 points, or 0.5 percent, to 1,425.98.
Technology companies led the way once again. Facebook rose $2.24, or 1.5 percent, to $150.68 while Microsoft gained 87 cents, or 1.2 percent, to $70.65. Hard drive maker Western Digital added $3.41, or 3.9 percent, to $90.05.
Even after their recent skid, technology companies have done much better than the rest of the market in 2017. Big tech companies like Apple and Alphabet have been responsible for a huge portion of the stock market's gains this year.
Amazon helped retailers trade higher. The online giant picked up $15.88, or 1.6 percent, to $980.79 and Best Buy rose $1.07, or 1.9 percent, to $57.85. Home Depot climbed $1.25, or 1.2 percent, to $153.99.
Among materials companies, Dow Chemical jumped $1.25, or 2 percent, to $65.26 and Sherwin-Williams gained $5.31, or 1.5 percent, to $353.25.
Energy companies joined the gains as the price of oil reversed an early loss. U.S. crude futures added 38 cents to settle at $46.46 a barrel in New York. Brent crude, used to price international oils, picked up 43 cents to $48.72 a barrel in London.
Among energy stocks, Halliburton climbed 92 cents, or 2 percent, to $45.84 and oil refiner Tesoro rose $3.03, or 3.3 percent, to $94.22.
Wholesale gasoline rose 1 cent to $1.50 a gallon. Heating oil finished up 2 cents at $1.45 a gallon. Natural gas slumped 6 cents, or 1.9 percent, to $2.97 per 1,000 cubic feet.
The Federal Reserve began a two-day policy meeting on Tuesday. On Wednesday, investors expect the central bank to raise interest rates for the third time since December. Rehling, of the Wells Fargo Investment Institute, said investors will scrutinize the Fed's views on inflation and how aggressive it will be in raising interest rates in the future.
"The market's going to be looking to see if they're still on track," he said. Rehling added that investors also want to know about the Fed's plan to start reducing its huge portfolio of bonds. He doesn't think that will have much effect on the bond market.
Information technology company Science Applications International Corp. slumped after its sales fell short of Wall Street's projections. The company said tight budgets for customers are hurting its sales, and greater costs affected its profits. The stock lost $6.92, or 8.5 percent, to $74.52.
Restaurant chain Cheesecake Factory said sales at established restaurants have fallen in the current quarter. Those sales, an important measure of how a retailer is doing, down about 1 percent, while FactSet says analysts expected growth of 1.7 percent. The stock lost $5.75, or 9.9 percent, to $52.58.
Verizon officially bought Yahoo's internet business for $4.5 billion. That brought an end to Yahoo's 21 years as a publicly traded company. Yahoo is being combined with AOL in a new Verizon unit called Oath, which is run by AOL CEO Tim Armstrong. Verizon stock lost 73 cents, or 1.5 percent, to $46.46.
Bond prices edged higher. The yield on the 10-year Treasury note dipped to 2.21 percent from 2.22 percent late Monday.
Gold slipped 30 cents to $1,268.60 an ounce. Silver fell 18 cents, or 1 percent, to $16.77 an ounce. Copper dipped 2 cents to $2.60 a pound.
The dollar rose to 109.96 yen from 109.79 yen. The euro inched up to $1.1212 from $1.1208.
Germany's DAX gained 0.6 percent and the CAC 40 in France advanced 0.4 percent. In Britain the FTSE 100 index lost 0.2 percent. Asian markets finished mostly higher. In South Korea the Kospi rose 0.7 percent and the Hang Seng in Hong Kong advanced 0.6 percent. Japan's Nikkei 225 dipped 0.1 percent.