The stock market struggled to hang on to meager gains after investors found little to like in weak corporate earnings reports and news of only tepid growth in the U.S. economy in the third quarter.The Dow Jones industrial average was up eight points at 13,111 shortly before the close of trading. The Standard & Poor's 500 index fell a fraction of a point to 1,413 and the Nasdaq composite rose seven points to 2,993.Stocks rose in the morning before a mild midday sell-off, then recovered somewhat in the afternoon.The morning gains came after the Commerce Department estimated that the U.S. economy expanded at a 2 percent annual rate from July through September. That was better than the previous quarter, and better than analysts expected, but not strong enough to bring down the unemployment rate.Even economic data that is mixed or positive won't outweigh weak earnings, said Lawrence Creatura, a portfolio manager with Federated Investors. Reports like the one on Friday that measure gross domestic product tend to be backwards-looking, while companies are offering forecasts about the months ahead, he said."Company earnings trump macro data. Because investors own Apple, they don't own GDP," Creatura said.Apple was down $4.46 to $605.08 after saying its profit will decline this holiday season.Even with Friday's rise, stocks lost ground this week, inflecting a sort of death-by-a-thousand-cuts on the rally that began in September. The Dow was down 220 points for the week, or 1.7 percent. The S&P has fallen 20 points, or 1.4 percent.Goodyear Tire & Rubber sank 10 percent after a steep dropoff in sales in Europe delivered a blow to its earnings. Shares fell $1.26 to $11.04.The advertising conglomerate Interpublic also turned in results that fell short of analysts' forecasts, and its stock fell 3.9 percent -- down 15 cents to $10.40.Of the 10 industry groups in the S&P 500, the biggest gains were in technology and telecom stocks. Intel and Microsoft both rose more than 1 percent.Amazon shares rose $13.62, or 6.1 percent, to $236.60 despite a smaller-than-expected quarterly profit and a prediction for smaller-than-expected holiday revenue.Among other companies making big moves, cable TV provider Comcast jumped $1.36, or 3.7 percent, to $37.32 after reporting that its income more than doubled in the latest quarter. Revenue was higher than analysts were expecting, and more customers signed up for premium services like high-definition video recorders.Varian Medical Systems jumped $8.96, or 15 percent, to $67.06, the biggest increase in the S&P 500 index. The company, which sells medical imaging equipment and radiation-emitting devices for treating tumors, reported a 20 percent rise in income because of higher sales of devices.On its first day of trading, Dairy company WhiteWave Foods lost 18 cents to $16.82, down from its initial public offering price of $17, after rising as high as $19.17 earlier.The yield on the 10-year Treasury note fell to 1.76 percent from 1.82 percent on Thursday.