NEW YORK — U.S. stocks rose Thursday, with the Nasdaq Composite Index reaching a record, after Greek lawmakers passed a bailout agreement while companies including Netflix and Citigroup rallied on earnings.

NEW YORK — U.S. stocks rose Thursday, with the Nasdaq Composite Index reaching a record, after Greek lawmakers passed a bailout agreement while companies including Netflix and Citigroup rallied on earnings.


Netflix jumped 18 percent after subscribers surged in the second quarter, beating projections. EBay climbed 3.4 percent after quarterly sales exceeded estimates and it agreed to sell its enterprise unit for $925 million. Citigroup added 3.8 percent as cost cuts helped the bank’s quarterly profit beat analysts’ estimates. Google rallied in late trading after its earnings were better than estimated.


The Nasdaq composite increased 1.3 percent to 5,163.18, topping its closing record set on June 23. The Standard & Poor’s 500 index rose 0.8 percent to 2,124.29, 0.3 percent below its record. The Dow Jones industrial average gained 70.08 points, or 0.4 percent, to 18,120.25. About 6.2 billion shares traded hands on U.S. exchanges, 3.6 percent below the three-month average.


"It looks like the equity market likes the Greek settlement," said Ron Anari, the Jersey City, New Jersey-based senior vice president of trading at ICAP. "At this stage of the game the Federal Reserve is in the driver’s seat, we’re going to see a hike sometime in September, and the equity market understands that. It’s expecting more positive economic news."


Greek lawmakers passed reform measures demanded by creditors in exchange for negotiating a third bailout package. Following the vote, European Central Bank President Mario Draghi said Thursday that the central bank raised the level of emergency aid to Greek lenders.


The S&P 500 is on pace for its biggest weekly gain in four months, as it closes in on its May 21 record. The gauge fell as much as 4 percent from that level amid concern the Greek debt crisis and China’s equities rout would hurt global growth as the Federal Reserve considers raising interest rates this year.


Fed Chair Janet Yellen appeared Thursday before the Senate Banking Committee in Washington, continuing her semi-annual testimony on monetary policy. She told lawmakers that raising rates too late holds risks, along with tightening too quickly.


Wednesfay Yellen signaled the Fed is on track to raise rates this year, while emphasizing that the timing of the first rate rise is less important than the subsequent path of increases, which she said would be gradual.


Policy makers are watching for further improvement in the labor market. A report Thursday showed filings for U.S. unemployment benefits fell last week for the first time in a month, heading back toward the lowest levels in more than a decade.


Separate data showed confidence among homebuilders held in July at the highest level since November 2005, indicating the residential real estate market may be picking up speed. Meanwhile, a gauge on manufacturing in the Philadelphia area fell more than estimated by economists surveyed by Bloomberg.


Earnings season is also drawing more focus as investors sift for clues on the health of the world’s largest economy. S&P 500 companies reporting quarterly results Thursday. Analysts project earnings for members of the S&P 500 dropped 6.4 percent in the second quarter.


"We’re going to start getting into the thick of earnings this week and with stocks like Netflix responding today, Microsoft and Intel up, you get the sense that betting against the market is a foolish bet," said Rick Fier, director of equity trading at Conifer Securities in New York.


With its Thursday 18 percent post-earnings climb, Netflix extended its all-time high, and was the biggest driver of gains in the Nasdaq composite and S&P 500. The shares are up 137 percent this year, the most in the benchmark index.


EBay rallied the most since April to a record, helping to lead the technology group to a fifth straight session of gains. The online auction site agreed to sell its enterprise unit to a private-equity group led by Permira and Sterling Partners for $925 million. The unit provides warehousing, delivery and customer support to Web merchants.


Microsoft and International Business Machines each rose at least 1.4 percent, leading the Dow, with both stocks headed toward their strongest weekly gains in three months.


Google increased 9.9 percent as the search engine giant’s second-quarter profit topped analysts’ estimates amid slower spending. Google soared 3.1 percent in regular trading to the highest since September, with the gain almost doubling in the final 15 minutes of trading before the earnings release.


The Chicago Board Options Exchange volatility index fell 8.5 percent Thursday to 12.11, marking its biggest five-day decline ever.


Nine of the S&P 500’s 10 main groups gained, with utility, phone and technology companies rising the most. Banks in the benchmark extended a rally to a sixth day, the longest winning streak since Dec. 2013. Citigroup rose to a more than six-year high after its quarterly results. M&T Bank climbed 2.2 percent to a record after its second-quarter profit exceeded estimates.


Charles Schwab advanced 3.3 percent to its highest since Nov. 2000 after reporting second-quarter profit in line with analysts’ estimates, while revenue beat forecasts. E*Trade Financial surged 2.9 percent.


Philip Morris International added 3.2 percent, the most in three months, to pace a rise in consumer staples. The world’s largest publicly traded tobacco company posted quarterly profit that topped estimates. Altria Group gained 3.3 percent to a four-month high, and Reynolds American rose 1.8 percent to a record.


Automakers and parts suppliers retreated after Barclays cut them to negative from neutral as China car sales continue to disappoint. General Motors fell 2.6 percent to its lowest since October, while parts makers Delphi Automotive and BorgWarner dropped at least 3.7 percent.


Sherwin-Williams fell 7.4 percent, the most in two years. The paint maker cut its full-year earnings forecast, citing the effects of a stronger dollar. Rival PPG Industries slid 4.4 percent after also citing currency headwinds in its earnings report.


Garmin lost 7.1 percent after the navigation device company’s preliminary second-quarter and full-year profit views were below analysts’ estimates. Shares fell to the lowest since Sept. 2013.


——


With assistance from Roxana Zega in Zurich.