Expectations for the upcoming earnings period are tepid.
Companies in the S&P 500 are projected to report a three percent drop in second-quarter profits compared with the year-ago period, according to FactSet. The list of companies reporting this week includes JPMorgan Chase, Netflix and Johnson & Johnson.
Key headwinds to earnings include weak demand in China and other key international markets, higher costs due to tariffs and the strong US dollar, analysts say.
"Earnings growth for the S&P 500 in the first half of the year has been elusive," said Briefing.com analyst Patrick O'Hare.
"The direct driver of the stock market, however, has been the persistence of low interest rates and the friendly reminder from the Federal Reserve that it stands ready to use its tools to keep the longest economic expansion on record going."
Shaking off weakness during the session, Wall Street pushed into the black at the session's conclusion, which meant another day of records after all three major indices closed last week at all-time highs.
The gains in the United States came after a positive session in Europe. London's benchmark FTSE 100 index closed 0.3 percent higher and Frankfurt's DAX 30 put on 0.5 percent while the Paris CAC 40 edged up 0.1 percent.
- Mixed Chinese data -
======================
Asian equities initially stumbled but then staged a recovery as traders digested mixed Chinese economic data.
China's economy expanded 6.2 percent in the second quarter, the slowest headline reading since the early 1990s, official data showed. The outcome was in line with forecasts and within the government's target range.
Yet, despite the slowing GDP, other figures showed there were some bright spots in the Chinese economy, dealers said.
Chinese industrial output in June rose 6.3 percent, from 5.0 percent in May.
Fixed-asset investment also picked up, rising 5.8 percent on-year in January-June, from 5.6 percent in January-May.
China's 1.3 billion consumers also continued to open their wallets, with retail sales growing 9.8 percent year-on-year in June, up from 8.6 percent in May.
"The Chinese data, while confirming slowdown fears, seems to be lifting basic resource stocks," Oanda analyst Craig Erlam.
"A decent rebound in industrial production is naturally driving this, easily exceeding expectations, and along with retail sales and investment figures, arguably indicates that worst fears are not being realized."
The GDP number nevertheless highlights the negative impact the US tariffs stand-off is having on China, as leaders also try to recalibrate its growth model from exports and state investment to one driven by consumer spending.
US President Donald Trump on Tuesday pounced on the numbers, saying on Twitter that US tariffs were squeezing the Chinse economy and were why Beijing "wants to make a deal" to end the two nations' trade war.
Still, observers pointed out that the weakness raised the chances of further monetary easing measures from the central People's Bank of China, with investors also tracking the progress of the latest trade talks between Washington and Beijing.
US Treasury Secretary Steven Mnuchin said Monday that top US and Chinese trade negotiators are due to speak by telephone in the coming days, but no face-to-face talks have been scheduled yet.
- Key figures around 2100 GMT -
===============================
New York - Dow: UP 0.1 percent at 27,359.16 (close)
New York - S&P 500: UP less than 0.1 percent at 3,014.30 (close)
New York - Nasdaq: UP 0.2 percent at 8,258.19 (close)
London - FTSE 100: UP 0.3 percent at 7,531.72 (close)
Paris - CAC 40: UP 0.1 percent at 5,578.21 (close)
Frankfurt - DAX 30: UP 0.5 percent at 12,387.34 (close)
EURO STOXX 50: UP 0.1 percent at 3,502.22 (close)
Hong Kong - Hang Seng: UP 0.3 percent at 28,554.88 (close)
Shanghai - Composite: UP 0.4 percent at 2,942.89 (close)
Tokyo - Nikkei 225: Closed for a holiday
Euro/dollar: DOWN at $1.1258 from $1.1270 at 2100 GMT
Pound/dollar: DOWN at $1.2516 from $1.2572
Dollar/yen: DOWN at 107.87 yen from 107.91 yen
Brent North Sea crude: DOWN 0.40 percent at $66.48 per barrel
West Texas Intermediate: DOWN 1.00 percent at $59.58 per barrel