US stocks
A monitor displays stock market data on the floor of the New York Stock Exchange (NYSE), July 12, 2016 in New York City. The Dow Jones industrial average closed at an all-time high. Getty Images

US stocks closed nearly unchanged on 13 July, but managed to inch closer to record highs. The Dow Jones and S&P 500 hit record highs, though the Nasdaq Composite underperformed.

The Dow Jones Industrial Average advanced 24.45 points, or 0.1%, to settle at record high of 18,372.12. The blue-chips gauge's fourth day of gains was led by a 1.2% rise in UnitedHealth Group Inc shares, according to MarketWatch.

The S&P 500 inched up less than a point for a record finish of 2,152.43. The energy and consumer-discretionary sectors, down 0.7% and 0.5% respectively, led declines. Both the Dow and S&P 500 reached all-time intraday highs, CNBC reported.

Meanwhile, the Nasdaq Composite dropped 17.09 points, or 0.3%, to settle at 5,005.73. According to MarketWatch, despite the tech-heavy index closing about 5,000, its 13 July losses pushed into negative territory for 2016.

"I think what we're seeing here is the market taking a breather," Mike Bailey, director of research at FBB Capital Partners, told CNBC.

"Think about the massive move we've had over a very short period of time," added Art Hogan, chief market strategist at Wunderlich Securities. "We've had a 7.5% move off the lows. ... Eventually, that's going to run out of steam."

According to MarketWatch, the following two days will be filled with economic indicators with the weekly jobless claims due 14 July and inflation, retail sales and industrial output numbers expected on 15 July. In economics news, US import prices for June rose 0.2% and export prices jumped 0.8%.

Overseas, European markets closed down and Asian markets closed mostly higher. The Nikkei 225 was up 0.84%, while the Shanghai Composite rose 0.37% in Asia. In Europe, the DAX was down 0.33% and the Stoxx Europe 600 dropped 0.1%.

US crude oil price dropped to a two-month low of $44.75 (£34.06; €40.35) a barrel. Prices were dragged down by US inventories, which revealed crude stocks fell 2.54m last week along with a build of 1.2m gasoline barrels, CNBC reported.

"When we were going from $30 to $25, oil and stocks were keenly correlated," Hogan said. "Now with oil around $45 to $50, you can see oil having a bad day and not adversely affect stocks."

US Treasury yields dropped, with the 2-year yield by 0.66% and the 10-year yield near 1.46%. The US dollar index traded around 0.2% lower, with the euro by $1.11 and the yen around 104.3 yen against the greenback. The pound also traded lower on David Cameron's final day as prime minister, by $1.32.

Gold futures for August deliver jumped $8.30 (£6.32;€7.48) at $1,343.60 (£1,022.64;€1,211.49) per ounce.