Stocks ticked higher as energy companies clawed back some of their sharp losses from earlier in the week, the AP reports. After getting off to a slow start, the Standard & Poor's 500 index finished with a modest gain Friday, leaving it slightly higher for the week. Energy companies benefited from a second day of gains in oil prices. EQT jumped 8%, the biggest gain in the S&P 500. Health care and technology stocks had the biggest gains of the week. Energy companies trimmed their weekly loss to 2.9%. Bed Bath & Beyond plunged 12% after reporting weak earnings. The S&P 500 added 3 points, or 0.2%, to 2,438. The Dow Jones industrial average slipped 2 points to 21,394. The Nasdaq gained 28 points, or 0.5%, to 6,265. (More stock market stories.)