U.S. stocks rose on Tuesday, recovering from early losses on strength in the biotech sector after Gilead Sciences unveiled a large stock-buyback program, as well as in large-cap tech firms.

Gilead authorized a program, for the second time this year, to repurchase up to $5 billion in common stock through May 2013. Its stock rose 3.2 percent to $39.61, while the NYSE Arca Biotech index <.BTK> gained 0.9 percent.

Given the large profits so many companies have posted, buybacks are something that's encouraging to see, said Kevin Caron, market strategist at Stifel, Nicolaus & Co in Florham Park, New Jersey, though he added that he would prefer that companies use the profits for capital expenditures.

The three major U.S. stock indexes initially opened lower, easing from the previous session's hefty gains as concerns lingered about how Greece will get its budget deficit under control.

Stocks scored their biggest one-day gain in more than a year on Monday after European leaders agreed to a $1 trillion emergency rescue package to stabilize the euro-zone currency. However, concerns remained about the high debt loads of some euro-zone nations.

Investors are still waiting to form an opinion on the package, and until they do, things are going to stay very volatile, said Subodh Kumar, chief investment strategist at Subodh Kumar & Associates in Toronto.

The Dow Jones industrial average <.DJI> was up 35.97 points, or 0.33 percent, at 10,821.11. The Standard & Poor's 500 Index <.SPX> was up 5.78 points, or 0.50 percent, at 1,165.51. The Nasdaq Composite Index <.IXIC> was up 16.75 points, or 0.71 percent, at 2,391.42.

The Nasdaq rose on strength in biotech stocks, as well as tech, with Apple Inc up 1.9 percent at $258.68.

Dow component International Business Machines Corp was up 1 percent at $127.51.

Earnings season continued, with Church & Dwight Co posting a first-quarter profit that beat expectations. However, the consumer products company, whose products include Arm & Hammer baking soda and Trojan condoms, also gave a weak second-quarter earnings outlook. Its stock fell 2.7 percent to $67.52.

Overseas, Toyota Motor reported fourth-quarter earnings that comfortably beat forecasts. Toyota's U.S.-listed stock rose 1.5 percent to $77.87 on the New York Stock Exchange.

Walt Disney Co is scheduled to report its results after the market closes on Tuesday. The stock rose 1.5 percent to $35.81 and ranked among the Dow's biggest advancers.

On the heels of last week's dramatic intraday plunge in U.S. markets, an agreement to adopt market-wide circuit breakers to halt extreme drops in individual stocks is a done deal, a source told Reuters.

On the economic front, data showed U.S. wholesale inventories rose for a third straight month in March to their highest in eight months.

(Reporting by Ryan Vlastelica; Editing by Jan Paschal)