Stocks ended with gains on Thursday, following news that House and Senate negotiators had approved a $318 billion tax-relief measure . Solidly in the green for most of the day, the Dow Jones Industrial Average ended up 77.59 points, or 0.9%, at 8594.02, while the Nasdaq rose 17.68 points, or 1.2%, to 1507.55. The S&P 500 gained 8.45 points, or 0.9%, to 931.87. Negotiators from both chambers of Congress said Wednesday night that they had the votes to pass the tax-cut measure, which would temporarily lower levies on dividends and capital gains. While the bill was largely expected and wasn't as strong as what the Bush administration had proposed, markets applauded the news. "After three long years with the bear, relative to other vehicles, stocks are looking attractive, which is the hang-tough mentality markets have had lately," said Bryan Piskorowski, equity analyst at Prudential Securities. "Volume has been decent and breadth is good, too. The rising tide is supporting more boats, but we're going to need to see some better economic data to boost us a lot higher from where we are." Markets also retained a little optimism created Wednesday when Federal Reserve chief Alan Greenspan said the risk of deflation is small, even though the central bank might need to adopt measures to prevent it. Greenspan also said the economy is set to accelerate, although he refrained from predicting when. But one economic gauge remains worrisome: the labor market. Jobless claims for the week ended May 22 rose to 428,000, above 417,000 a week earlier. This marks the 14th straight week the measure has topped 400,000. On the corporate front, Aetna ( AET) agreed on a settlement in a class-action lawsuit filed by U.S. doctors who claimed the company had unjustly cut reimbursements and interfered with treatment. Prudential told investors that Aetna's news bodes well for the rest of the HMO industry, saying damages appear reasonable. Despite the positive comments, shares of Aetna were down 34 cents, or 0.6%, to $56.90, while the Morgan Stanley HMO Index was up 0.3%. Altria ( MO) was a big boost for the Dow, gaining $2.75, or 7.2%, to $41.05 after CSFB upgraded the tobacco maker to outperform from neutral, telling investors that litigation against tobacco companies will wane over the next year or so.