Nasdaq ekes out another record amid earnings

U.S. stocks closed mildly higher on Monday, with the Nasdaq at another record, as investors digested earnings reports. ( Tweet This )

"Greece is in the rear-view mirror. To me I think we've successfully transitioned from the global macro to the global micro," said Art Hogan, chief market strategist at Wunderlich Securities. "We've had a lot of people exceeding expectations."

The Nasdaq Composite ended up 8.7 points for its third record close in a row. The major averages turned higher in late morning trade, with the Nasdaq topping its intraday high set on Friday and the S&P 500 briefly rising above its all-time closing high but failing to close above it.

Read MoreThe tech breakout is suspect, and here's why

Information technology led index gains, while energy fell more than 1 percent as the worst-performing sector in the S&P 500 as crude oil dipped below $50 a barrel for the first time since April 6. Exxon Mobil and Caterpillar were among the greatest decliners in the Dow Jones industrial average.

Crude oil futures settled down 74 cents, or 1.45 percent, at $50.15 a barrel, the lowest settlement since April 2.

WTI crude 12-month performance


Earlier, stocks shrugged off a positive open to trade lower.

"I think this (slight pullback) is indicative of establishing a new higher trading range (between 2,175 and 1,950)," said Peter Cardillo, chief market economist at Rockwell Global Capital.

No major economic reports are due Monday. About 130 S&P 500 and Dow industrial names post quarterly results this week.

"If IBM, Microsoft and Apple have positive things to say about their business, this market's going to skyrocket," said Marc Chaikin, CEO of Chaikin Analytics.

"The market needs a continual stream of good news at this point to break out and I think this earnings season here is going to provide it," he said. However, he said not all earnings reports are set to beat. He has a less favorable outlook on Qualcomm and SanDisk.

On Monday morning, Morgan Stanley said it earned an adjusted 79 cents per share, 5 cents above estimates, with revenue also above forecasts. The results were helped in part by strong growth in trading revenue.

Read MoreEarnings should grab attention, but watch commodities

"It started a little slow but in the last week or so we're not only seeing companies beat on the bottom line but also seeing companies beat on the top line. ... That is very encouraging," said Nick Raich, CEO of The Earnings Scout. "About half of them are seeing a lot of third-quarter numbers come down but the rate at which they're coming down is (declining). There's been an improvement in the underlying earnings."

Solid Google earnings on Friday pushed the Nasdaq Composite to a new intraday and closing record of 5,210.16 and 5,210.14, respectively.

Google Class A stock leaped more than 16 percent, briefly topping $700 a share on Friday. The stock traded about 1 percent lower on Monday.

"The interesting thing is Nasdaq hit a record the day before," said Randy Frederick, managing director of trading and derivatives at Charles Schwab.

Read More Jordan Spieth hits $120 million bogey?

Another tech giant, Apple, reports quarterly results after the close Tuesday. Shares of the iPhone maker jumped more than 2 percent in afternoon trade.

"I think there's a very good chance that their earnings will push (the S&P 500) or even go close to a record," Frederick said.

The S&P 500 ended within 5 points of its record close on Friday and attempted a record close on Monday.

"Last week's impressive rally left support intact for the SPX, and it generated a good deal of breakouts among individual stocks. We expect this week to be characterized by a consolidation phase given the return of short-term overbought conditions, but would view it as a pause to refresh the upmove," BTIG Chief Technical Strategist Katie Stockton said in a note.

Symbol
Name
Price
 
Change
%Change
DJIA
---
S&P 500
---
NASDAQ
---

In other news, PayPal ended up 5.4 percent after briefly jumping more than 6.5 percent in its first day of trade as its own publicly traded company under the ticker "PYPL" today following separation from eBay. Shares of eBay reversed early losses to close up 2.4 percent.

Read More Early movers: MS, HAS, HAL, VSLR, PYPL, LMT & more

IBM posts quarterly earnings after the close.

In other morning reports, Hasbro reported quarterly profit of 33 cents per share, 4 cents above estimates, with revenue well above consensus despite the impact of the stronger dollar.

Halliburton beat forecasts by 15 cents with adjusted quarterly profit of 44 cents per share, with revenue exceeding forecasts, as well. Like its peers, Halliburton saw a significant drop in drilling activity compared to a year earlier, but was helped by strength in its international profit margins.

Gold is also in focus, with the commodity falling to five-year lows bellow $1,100 an ounce amid speculative selling in China. The precious metal settled down $25.10 at $1,106.80 an ounce.

Read More Gold's bearish pattern 16 years in the making

The dollar traded a touch higher, with the euro near $1.084.

Treasury yields held higher, with the U.S. 10-year Treasury yield at 2.37 percent and the 2-year at 0.70 percent.

Overseas, European stocks closed higher. Greece made its payment due to the European Central Bank Monday. The International Monetary Fund also said Athens repaid all its debt to the fund.

Greek banks reopened on Monday after a three-week closure.

Resolution in Greece does help "but I think a lot of that was priced in last week," said Ben Pace, chief investment officer at HPM Partners. "I don't think that has a lot to do with today. ... I do think we're looking at a trend of better-than-expected earnings scenarios."

The Dow Jones Industrial Average closed up 13.96 points, or 0.08 percent, at 18,100.41, with Visa leading gains and Caterpillar leading decliners.

The S&P 500 closed up 1.64 points, or 0.08 percent, at 2,128.28, with information technology leading seven sectors higher and energy the greatest decliner.

The Nasdaq closed up 8.72 points, or 0.17 percent, at 5,218.86.

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded above 12.

About two stocks declined for every advancer on the New York Stock Exchange, with an exchange volume of 738 million and a composite volume of about 3.2 billion in the close.

Monday

Earnings: IBM, Canadian National Railway, Bancorp South, Crown Holdings, BBCN Bancorp, Steel Dynamics

Tuesday

Earnings: Apple, Microsoft, Yahoo, Chipotle Mexican Grill, United Technologies, Travelers, Novartis, Bank of NY Mellon, Lockheed Martin, Fifth Third, Verizon, TD Ameritrade, ManPower Group, Canadian Pacific Railway, GoPro, Intuitive Surgical, Linear Technologies, iRobot,

Wednesday

Earnings: Coca-Cola, Boeing, American Express, Abbott Labs, Texas Instruments, Cheesecake Factory, Discover Financial, SanDisk, Qualcomm, Fortune Brands, Raymond James, Newmont Mining, Ameriprise, Cirrus Logic, Graco, Sallie Mae, Select Comfort, Morningstar ,Weatherford, Xilinx, F5 Networks, St. Jude Medical, Six Flags, AutoNation, Tupperware, Owens Corning

9:00 a.m. FHFA home prices

10:00 a.m. Existing home sales

Thursday

Earnings: Caterpillar, Eli Lilly, Amazon.com, General Motors, Comcast, McDonald's, Starbucks, Visa, Capital One, Bristol-Myers Squibb, Union Pacific, Roche Holdings, Dow Chemical, Celgene, Credit Suisse, Dr. Pepper Snapple, Alaska Air, Southwest Air, Dunkin Brands, Pulte, Raytheon, Freeport-McMoran, Stryker, Nasdaq OMX, Kimberly-Clark, Stryker, Pandora, Flextronics, Ruby Tuesday

8:30 a.m. Initial claims

Friday

Earnings: Biogen, Johnson Controls, State Street, Xerox, Moody's, Cabot Oil and Gas, Spirit Airlines

9:00 a.m. Markit Manufacturing PMI

10:00 a.m. New home sales

More from CNBC.com: