The S&P 500 climbed to an all-time high on Tuesday on a heavy day of corporate results highlighted by well-received reports from McDonald’s and Caterpillar and gains for bank shares. The Nasdaq also managed to set a record high despite declines in Google parent Alphabet after its results. Alphabet shares ended down 2.9 percent.

Shares of McDonald’s rose 4.8 percent after the fast-food chain reported strong global sales. Caterpillar gained 5.9 percent after the company raised its full-year outlook for the second time this year. Those stocks spurred the Dow Jones Industrial Average, leaving the index close to record territory.

Data indicating a rise in consumer confidence amid optimism over the labor market added to the bullish sentiment.

Sectors that perform better during positive economic cycles led the way, with the energy, materials and financial indexes all rising at least 1 percent. Gains in oil prices supported energy shares.

A bullish profit forecast from Citigroup helped financials, while a slightly steeper Treasury yield curve also added to the positive tone for the interest-rate sensitive group. The future path of interest rates will be in focus on Wednesday with the expected statement from the Federal Reserve.

The healthcare sector was the worst-performing group, falling 0.7 percent.

The market’s run to record highs, including a 10.7 percent rise for the S&P 500 in 2017, has left equities relatively expensive and investors counting on earnings to justify the valuations. The S&P 500 is trading around 18 times earnings estimates for the next 12 months, well above their long-term average of 15 times.

With more than one-fourth of the S&P 500 having reported results, earnings are now expected to have climbed 9.1 percent in the second quarter, up from a projection of an 8-percent rise at the start of the month, according to Thomson Reuters I/B/E/S.

Not all the earnings news was positive, as 3M fell 5.1 percent after the company’s earnings report. Eli Lilly fell 3.0 percent after it outlined a lengthy delay for its experimental rheumatoid arthritis drug.

Freeport-McMoRan rose 14.7 percent. Rising metal prices and progress in a permit dispute with Indonesia buoyed the world’s largest-publicly traded copper miner.

Approximately 6.9 billion shares changed hands on the major domestic equity exchanges, a number that was above the 6.1 billion share daily average over the past 20 sessions.

Confidence Near 16-year High

Consumer confidence rose to a 16-year high in July amid optimism over the labor market while house prices maintained their upward trend in May, which would also likely raise consumer spending after recent sluggishness.

The Conference Board indicated that its consumer confidence index came in at 121.1 this month, the second highest reading since 2000, from 117.3 in June. The increase in confidence came despite the healthcare impasse in Washington. The index hit a 16-year high of 124.9 in March.

The survey’s so-called labor market differential, derived from data about respondents who think jobs are hard to get and those who think jobs are plentiful, was the strongest since 2001. This measure closely correlates to the unemployment rate in the Labor Department’s employment report and is consistent with continued reduction in labor market slack.

The labor market is near full employment, with the jobless rate at 4.4 percent. However, the tightening labor market has struggled to generate strong wage growth, a frustrating issue for both households and policymakers.

The Conference Board survey showed consumers were less upbeat about their income prospects this month. The percentage of consumers expecting an improvement in their income fell slightly to 20.0 percent from 20.9 percent in June.

The share of those expecting a decrease rose to 10.0 percent from 9.3 percent last month. Tepid wage growth has hurt retail sales, which fell in June for a second straight month.

With consumers tightening their purse strings, inflation growth has slowed significantly, leading economists to dial back their expectations for an interest rate hike to December.

Despite the upbeat data, the dollar fell to a 13-month low against a basket of currencies as investors awaited the statement that will accompany the Fed’s interest rate decision.

Retail sales could get a lift from rising house prices, which are raising household wealth. A second report on Tuesday showed the S&P CoreLogic Case-Shiller composite index of 20 metropolitan areas rose 5.7 percent in May on a year-over-year basis after increasing 5.8 percent in April.

An acute shortage of homes on the market and strong demand are pushing up house prices. The Federal Housing Finance Agency (FHFA) said its house price index rose to a seasonally adjusted 6.9 percent in May from a year ago.

That followed a 6.8 percent gain in April. The FHFA’s index is calculated by using purchase prices of houses financed with mortgages sold to or guaranteed by mortgage finance companies Fannie Mae and Freddie Mac.