U.S. stocks closed near highs on Thursday, with the Nasdaq at a record, as investors focused on earnings beats amid progress towards near-term resolution in the Greek debt crisis. (Tweet This)
"Earnings are continuing to play a bigger role," said Omar Aguilar, chief investment officer of equities at Charles Schwab Investment Management. "Financials (had) pretty positive results. At the same time it also reflects that people think the economy continues to move in the right direction, maybe not at the pace we thought we could grow but (still growing)."
The Nasdaq Composite rallied more than 1 percent to set a new closing record of 5,163.18. Earlier in intraday trade, the Nasdaq 100 hit its highest level since the tech bubble in March 2000, with Netflix surging 18 percent and eBay, Stericycle and Micron jumping more than 3 percent. The S&P 500 also came within 10 points of its record close.
The highs are "amazing given everything we've gone through in the last couple of weeks," said JJ Kinahan, chief strategist at TD Ameritrade. "The tech sector continues to perform (and one) we'll spend money on because it's irreplaceable."
Corporate results after the bell Wednesday were strong. Netflix closed up more than 18 percent at an all-time high after reporting solid subscriber growth that topped expectations. The video streaming site also posted earnings that beat estimates on revenue that barely missed forecasts.
"I think earnings continue to be the swing factor," said Terry Sandven, chief equity strategist at U.S.Bank Wealth Management. "I know it's early but I sense that the delta is to the upside."
"Next week and the week following will be more telling but preliminary results are at or above lowered expectations," he said.
Before the market open, Citigroup continued the trend of relatively strong performance in financials so far. The bank delivered quarterly results that topped analysts' expectations on both the top and bottom lines, for the largest quarterly profit in 8 years.
Goldman Sachs posted quarterly earnings that fell sharply from the previous year, hit by a large litigation charge. The investment bank did top revenue estimates but missed significantly on earnings per share.
The blue-chip weighed on the Dow as one of the greatest decliners, bringing the index lower by as much as 17 points.
John Lonski, chief economist at Moody's, attributed the relatively slow climb upward in the Dow and S&P 500 to soft data.
"The economy's not doing that well," he said, noting continued concern about a rate hike before the end of the year.
The Philadelphia Fed survey came in at 5.7 for July, off June's 15.2 read, following a weaker Empire State read and a disappointing June retail sales report.
"Bottom line, as seen with the NY survey, manufacturing activity in the Philly region rose modestly," Peter Boockvar, chief market analyst at The Lindsey Group, said in a note. "The big jump in June was an anomaly and the July figures gave it back. For U.S. manufacturing as a whole, modest growth also seems like the proper description."
Treasury yields trimmed gains, with the 10-year yield at 2.35 percent and the at 0.66 percent.
The dollar gained against major world currencies, with the euro recovering from an 8-week low to trade below $1.09.
"For now the bulls are in control and that's the main thing to take away from the movement over the last 10 days," said Adam Sarhan, CEO of Sarhan Capital.
Stocks traded higher in five of the last six sessions, including Thursday. Nervousness ahead of the Greek vote pressured U.S. equities to close a touch lower on Wednesday.
European stocks closed higher amid news that European Central Bank President Mario Draghi confirmed an increase in emergency funding to Greece by 900 million euros ($978 million) over one week. He added the ECB would "grant in principle a 3-year ESM stability support to Greece, subject to the completion of relevant national procedures."
The central bank also kept interest rates unchanged.
Following the central bank relief announcement, a senior Greek official confirmed that banks would reopen on Monday. The local banks and Athens exchange have been closed for more than two weeks.
Greece will implement changes to value added tax from Monday, the finance ministry said in a Reuters report. The move fulfills a key pledge in the bailout deal the cash-strapped country reached with international creditors.
Very early Thursday morning, Greece's parliament approved a stringent reform bill amid violent protests by locals. The legislation paves the way for financial aid worth 86 billion euros ($94 billion).
"The approval of the deal by the Greek parliament and the news about a bridge loan for Greece should help stabilize the situation for the time being and makes it more likely that Greece stays in the Eurozone for now," said Stephen Freedman, senior investment strategist at UBS Wealth Management Americas.
European Union finance ministers also approved 7 billion euros ($7.6 billion) in bridging loans to keep Greece afloat, allowing it to make a bond payment to the ECB next Monday and clear its arrears with the International Monetary Fund, Reuters reported.
The loans will be finalized on Friday provided Germany's parliament approves a Berlin government request to open talks on a three-year bailout program—Greece's third in the past five years—worth up to 86 billion euros.
Federal Reserve Chair Janet Yellen concluded her two-day testimony to Congress with remarks to the Senate Banking Committee in the afternoon. On Wednesday, Yellen reiterated recent comments that interest rates are likely to rise this year.
"I think we're getting a replay of what we've heard over the last couple weeks," said Mark Luschini, chief investment strategist at Janney Montgomery Scott. "I think the economic barrier has been set relatively low for them to (raise rates)."
The Dow transports closed up 0.17 percent with JetBlue leading advancers.
The closed up 16.89 points, or 0.80 percent, at 2,124.29, with utilities leading nine sectors higher and materials the only laggard.
The Nasdaq closed up 64.24 points, or 1.26 percent, at 5,163.18.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, dipped below 12. The index has fallen nearly 30 percent for the week.
About two stocks advanced for every decliner on the New York Stock Exchange, with an exchange volume of 739 million and a composite volume of 3.2 billion in the close.
Crude oil futures settled down 50 cents at $50.91 a barrel on the New York Mercantile Exchange. Gold futures settled down $3.50 at $1,143.90 an ounce.
Reuters contributed to this report.
On tap this week:
Earnings: Google, Schlumberger, Celanese, Cintas, Mattel, Advanced Micro
4:00 p.m.: TIC data
Earnings: General Electric, Honeywell, Kansas City Southern, JB Hunt, Synchrony Financial, WW Grainger
8:30 a.m.: CPI
8:30 a.m.: Housing starts
10:00 a.m.: Consumer sentiment
More From CNBC.com: