U.S. stocks rose to record highs Tuesday as banks kept rising and retailers climbed after some encouraging job data.

It was the second straight day for big gains in bank stocks as bond yields pushed higher, which allows banks to charge higher rates on loans.

advertisement | advertise on newsday

Retailers rose after the Labor Department said job openings and hiring both grew in July, and more people quit their jobs to take new ones. That left investors hopeful people will shop and spend more.

Chemicals company DowDuPont climbed after making changes to its breakup plans, something activist investors had pushed for. Apple’s newest iPhones didn’t generate much excitement on Wall Street.

The bond market is “moving back to a comfort zone,” said Matt Toms, the chief investment officer for Voya Investment Management’s fixed income business. “Just enough growth, just enough inflation, but not too much of either.”

The Standard & Poor’s 500 index rose 8.37 points, or 0.3 percent, to 2,496.48. The Dow Jones industrial average gained 61.49 points, or 0.3 percent, to 22,118.86. The Nasdaq composite picked up 22.02 points, or 0.3 percent, to 6,454.28.

The S&P 500 finished at a record Monday and the Dow finished a fraction of a point above the record it set in early August. The Nasdaq surpassed the record it set on Sept. 1.