Stocks rose modestly for a third straight day on Thursday after Greece reached a deal to secure a financial bailout, but investors were cautious after weeks of gains.

Tech shares, led by Apple Inc , gave a lift to the Nasdaq index and were the session's strongest sector. Skepticism that Greece would follow through on promised austerity measures kept investors hesitant to boost stocks further.

The market's steady march higher also left investors reluctant to buy aggressively without a significant catalyst. Well over 75 percent of S&P 500 stocks are trading above their 26-week moving average, according to Thomson Reuters data. The index has finished higher on six of the last seven trading days.

We've had a very strong run without a meaningful pullback, and a lot of people would feel like chumps for buying before we see some kind of dip, said Nicholas Colas, chief market strategist at the ConvergEx Group in New York.

Leaders from major Greek parties agreed on reforms and austerity measures needed in exchange for a new bailout package to avoid a chaotic default.

There's some relief that they've made it this far, since the negotiations could've gone meaningfully wrong, but this was largely priced in, said Colas. At the same time, there's still some concern that this deal isn't enough and we'll be back in this situation again later.

Euro zone officials say the full package must be agreed with Greece and approved by the EU, IMF and European Central Bank by February 15, so legal paperwork can be completed in time to avoid a chaotic default that could destabilize the global financial system.

The Dow Jones industrial average <.DJI> was up 6.51 points, or 0.05 percent, at 12,890.46. The Standard & Poor's 500 Index <.SPX> was up 1.99 points, or 0.15 percent, at 1,351.95. The Nasdaq Composite Index <.IXIC> was up 11.37 points, or 0.39 percent, at 2,927.23.

Providing support to the market was a report showing jobless claims fell last week, underscoring improvement in the labor market. That followed Friday's report of a better-than-expected rise in the number of jobs created in January.

Apple's stock hit an all-time high. Brokerage Canaccord Genuity said its checks indicated very strong iPhone 4S sales and increased its price target to $665. Website AllThingsD said Apple would introduce its latest iPad tablet version next month.

Shares of Apple surged 3.5 percent to $493.17, hitting an all-time high of $496.75 earlier. The S&P information technology sector <.GSPT> rose 1 percent as the day's best-performing group.

But Cisco Systems Inc limited gains by the tech sector as the network equipment maker's forecast failed to impress investors. Shares fell 2.1 percent to $20.

PepsiCo Inc

fell 3.7 percent to $64.27 after the beverage maker forecast lower-than-expected 2012 earnings and said it would cut thousands of jobs.

Groupon Inc slumped 14 percent to $21.17. The daily deal website posted an unexpected loss in the first quarterly report since it went public.

Diamond Foods Inc tumbled 37 percent to $23.13 after the company removed its top management and said it would restate results due to improper accounting of payments to walnut growers.

Slightly more stocks rose than fell on the New York Stock Exchange while on the Nasdaq, 53 percent of stocks ended lower. Volume was about 7.30 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, slightly below last year's daily average of 7.84 billion.

(Reporting By Ryan Vlastelica; Editing by Kenneth Barry)