By Anora Mahmudova and Saumya Vaishampayan, MarketWatch

NEW YORK (MarketWatch) -- U.S. stocks swung between slight gains and losses Friday, with the main benchmarks on track to post weekly and monthly gains.

Advances in May sent the S&P 500 to record levels above 1,900, while both the Nasdaq Composite and Dow Jones Industrial Average turned positive for the year.

The S&P 500 (SPX) hit a record intraday high in early trading. The benchmark index was up about 1 point to 1,921.38 and was on track for a 1.1% weekly gain and a 2% gain in May.

The Dow Jones Industrial Average (DJI) fell 2 points to 16,696.27. The blue-chip index was set for gains 0.5% for the week and 0.7% for the month.

The Nasdaq Composite (RIXF) fell 12 points, or 0.3%, to 4,236.24. The tech-heavy index eyed a 1.2% gain for the week and 3% gain in May.

Kristina Hooper, U.S. investment strategist at Allianz Global Investors, said today's cautious mood in the market is colored by how low the 10-year Treasury yields are.

"Many investors are struggling to understand why 10-year yields are below 2.5% and whether they are signaling something they don't know. While historically such low rates signal a weakening economy, we think there are other reasons behind it, such as lower supply and attractiveness compared to other safe government bonds," Hooper said.

"We believe the environment for stocks is still good, as rates are low and inflation is low. Tapering of the QE appears fully priced in and all eyes are on the Fed funds rate," she added.

In economic news, consumer spending in the U.S. fell in April -- the first decline in a year -- as Americans cut back on car purchases and spent less on utilities such as natural gas and electricity as the weather warmed up. Meanwhile, inflation pressures continued to build last month. MarketWatchSpending on energy plunged by 3% in April, leading to the first drop in consumer spending in a year. Excluding energy, spending rose 0.1%.Why economists aren't freaking out about the negative GDP numbers

Separately, a gauge on consumer sentiment fell in May, according to a report from the University of Michigan and Thomson Reuters. Economists polled by MarketWatch had expected a final May level of 82.5, compared with a preliminary reading for the month of 81.8.

Investors will have a first glimpse of the new president of the Cleveland Fed, Loretta Mester, when she speaks at 12:30 p.m. Eastern Time, with many watching for signs of whether she's a hawk or dove.

Big Lots surges, Express tumbles after quarterly results

Among major movers, Big Lots Inc. (BIG) surged 12% after the retailer raised its outlook for the current fiscal year, while first-quarter revenue beat expectations.

Ann Inc. (ANN) rose 4.4% after the apparel retailer reported first-quarter adjusted profit that slightly beat Wall Street forecasts.

Express Inc. (EXPR) shares tumbled 8.6% after the retailer posted a fall in first-quarter profit.

An even bigger loser was Infoblox Inc. (BLOX). Shares plummeted, dropping 38% after the network-control company said Chief Executive Officer Robert Thomas was stepping down. Revenue for the first quarter fell short of expectations.

Apple Inc. (AAPL) shares were down 0.7%. Goldman Sachs raised its price target on the stock to $720 from $635. Read: Apple hits new "Beats" ahead of WWDC

Overseas and other financial markets

In overseas markets, European stocks posted their seventh week of gains, while Asian stocks closed mostly lower. Gold futures (GCQ4) posted their worst monthly losses this year and crude for July delivery (CLN4) fell.The dollar (DXY) declined against its European rivals.

More must-reads from MarketWatch:

Get set for summer melt-up, then a 'nasty correction'

Stocks could fall 15% to 20% as 'QE fluff' comes out of the market

How to know if the stock market has reached a top

Subscribe to WSJ: http://online.wsj.com?mod=djnwires