* Optimism about vote on Greek bailout due on Monday
* Market edges closer to levels not seen since June 2008
* Gilead slides on hepatitis drug data, drags Nasdaq lower
* Indexes: Dow up 0.4 pct, S&P up 0.2 pct, Nasdaq down 0.3 pct (Updates to close)
NEW YORK, Feb 17 (Reuters) - U.S. stocks edged higher on Friday, but investors stayed cautious before a long holiday weekend when hopes are set for Greece's bailout plan to be approved.
The S&P ended its sixth positive week out of seven so far in 2012, lifting it near levels not seen in more than three years. The index has risen 8.2 percent so far this year.
Friday's modest advance has pushed the benchmark index up nearly 24 percent from its October low. European shares ended the week higher ahead of the deal, with the FTSEurofirst 300 index up 0.6 percent.
Euro-zone finance ministers will meet to approve a 130 billion euro rescue package for Greece on Monday when the U.S. market will be closed for the Presidents Day holiday.
"The fact the European market is up the Friday before, knowing the U.S. market is off on Monday, is really a sign that the Greece situation is priced into the market," said Andrew Slimmon, managing director of Global Investment Solutions at Morgan Stanley Smith Barney in Chicago.
Analysts were wary of a pullback after Thursday's strong gains pushed the S&P to its highest since May 2 and viewed the market's resilience as constructive.
"It is encouraging that we obviously had some breakouts yesterday on the indexes and we are not giving anything back," said Ryan Detrick, senior technical strategist at Schaeffer's Investment Research in Cincinnati.
Technicians see the market at a short-term top, with the S&P at nine-month highs and within 10 points of hitting its highest level since 2008.
The Dow Jones industrial average gained 45.56 points, or 0.35 percent, to 12,949.64. The Standard & Poor's 500 Index added 3.17 points, or 0.23 percent, to 1,361.21. The Nasdaq Composite Index dropped 8.07 points, or 0.27 percent, to 2,951.78.
For the week, the Dow rose 1.2 percent, the S&P gained 1.4 percent and the Nasdaq advanced 1.7 percent.
Equity markets have tended to react positively on progress toward helping Greece avert a disorderly default, but past agreements have broken down at the last minute.
Wall Street stocks also typically pause near the end of earnings season as the market digests the results. According to Thomson Reuters data, 404 of the S&P 500 companies have reported results through Friday, with 64 percent beating expectations.
The Nasdaq underperformed the overall market, dragged lower by a 14.3 percent decline in shares of Gilead Sciences to $47. The drop came after some patients treated with its experimental hepatitis C drug relapsed.
HJ Heinz rose 4.5 percent to $54.47 and Campbell Soup gained 2.6 percent to $32.90 after both food makers posted better-than-expected quarterly profits.
In contrast General Mills lost 3.6 percent to $38.34 after it lowered its outlook.
Data showed U.S. gasoline prices jumped 0.9 percent in January, pushing overall consumer prices up and offering a reminder of the risks energy costs pose to the economic recovery.
Volume was modest with about 6.5 billion shares traded on the New York Stock Exchange, NYSE Amex and Nasdaq, below the daily average of 6.98 billion.
Advancing stocks outnumbered declining ones on the NYSE by 1,695 to 1,261, while on the Nasdaq, advancers beat decliners 1,266 to 1,235. (Reporting By Chuck Mikolajczak; Editing by Kenneth Barry)
Our 2024 Coverage Needs You
It's Another Trump-Biden Showdown — And We Need Your Help
The Future Of Democracy Is At Stake
Our 2024 Coverage Needs You
Your Loyalty Means The World To Us
As Americans head to the polls in 2024, the very future of our country is at stake. At HuffPost, we believe that a free press is critical to creating well-informed voters. That's why our journalism is free for everyone, even though other newsrooms retreat behind expensive paywalls.
Our journalists will continue to cover the twists and turns during this historic presidential election. With your help, we'll bring you hard-hitting investigations, well-researched analysis and timely takes you can't find elsewhere. Reporting in this current political climate is a responsibility we do not take lightly, and we thank you for your support.
Contribute as little as $2 to keep our news free for all.
Can't afford to donate? Support HuffPost by creating a free account and log in while you read.
The 2024 election is heating up, and women's rights, health care, voting rights, and the very future of democracy are all at stake. Donald Trump will face Joe Biden in the most consequential vote of our time. And HuffPost will be there, covering every twist and turn. America's future hangs in the balance. Would you consider contributing to support our journalism and keep it free for all during this critical season?
HuffPost believes news should be accessible to everyone, regardless of their ability to pay for it. We rely on readers like you to help fund our work. Any contribution you can make — even as little as $2 — goes directly toward supporting the impactful journalism that we will continue to produce this year. Thank you for being part of our story.
Can't afford to donate? Support HuffPost by creating a free account and log in while you read.
It's official: Donald Trump will face Joe Biden this fall in the presidential election. As we face the most consequential presidential election of our time, HuffPost is committed to bringing you up-to-date, accurate news about the 2024 race. While other outlets have retreated behind paywalls, you can trust our news will stay free.
But we can't do it without your help. Reader funding is one of the key ways we support our newsroom. Would you consider making a donation to help fund our news during this critical time? Your contributions are vital to supporting a free press.
Contribute as little as $2 to keep our journalism free and accessible to all.
Can't afford to donate? Support HuffPost by creating a free account and log in while you read.
As Americans head to the polls in 2024, the very future of our country is at stake. At HuffPost, we believe that a free press is critical to creating well-informed voters. That's why our journalism is free for everyone, even though other newsrooms retreat behind expensive paywalls.
Our journalists will continue to cover the twists and turns during this historic presidential election. With your help, we'll bring you hard-hitting investigations, well-researched analysis and timely takes you can't find elsewhere. Reporting in this current political climate is a responsibility we do not take lightly, and we thank you for your support.
Contribute as little as $2 to keep our news free for all.
Can't afford to donate? Support HuffPost by creating a free account and log in while you read.
Dear HuffPost Reader
Thank you for your past contribution to HuffPost. We are sincerely grateful for readers like you who help us ensure that we can keep our journalism free for everyone.
The stakes are high this year, and our 2024 coverage could use continued support. Would you consider becoming a regular HuffPost contributor?
Dear HuffPost Reader
Thank you for your past contribution to HuffPost. We are sincerely grateful for readers like you who help us ensure that we can keep our journalism free for everyone.
The stakes are high this year, and our 2024 coverage could use continued support. If circumstances have changed since you last contributed, we hope you'll consider contributing to HuffPost once more.
Support HuffPostAlready contributed? Log in to hide these messages.