* Apple about $50 bln away from $1 trillion market cap
* Microsoft gains after agreeing to buy GitHub for $7.5 bln
* Merck gains, Nektar plunges after latest cancer drug data
* Indexes gain: Dow 0.76 pct, S&P 0.42 pct, Nasdaq 0.59 pct (Changes comment, adds details, updates prices)
By Medha Singh
June 4 (Reuters) – Apple and Microsoft led a rally in technology stocks on Monday, driving U.S. stocks higher, after the iPhone maker kicked off its annual developers conference and the Windows software maker snagged a popular coding website.
Apple unveiled its latest operating system iOS 12 at the conference. Its stock gained as much as 1.7 percent, providing the biggest boost to S&P 500 and tech-heavy Nasdaq , and taking the company’s valuation to about $951 billion.
“Given Apple’s close proximity to a $1 trillion market capitalization, the focus on the stock performance following WWDC might be greater,” BTIG analyst Walter Piecyk wrote in a note.
“Apple’s stock would need to rise $12 to $202 to clear the milestone. Unfortunately, Apple has not typically demonstrated that type of performance following a WWDC.”
Microsoft’s shares rose about 1 percent after it announced a $7.5 billion deal to buy privately held coding website GitHub Inc.
The S&P technology index was up 0.9 percent, while the Nasdaq was only 0.6 percent away from hitting a record.
The tech boost added to the momentum from Friday’s better-than expected jobs data, leading the indexes higher for the second day in a row.
“Economic data has been getting quietly better amid the sort of headline chaos,” Tom Essaye, founder of investment research firm Sevens Report said.
“The market has been focusing on those fundamentals and there has been a resiliency in stocks in the past couple of weeks because of better economic