NEW YORK — U.S. stocks rose Monday as banks continued to climb along with interest rates, and energy companies rallied again with oil prices. Better-than-expected auto sales and a strong report on U.S. factories also boosted stocks.

Energy companies made large gains in Monday’s abbreviated trading session as oil prices rose for the eighth day in a row. Banks rose as bond yields and interest rates continued to rise. Companies that stand to benefit from faster economic growth, like industrial companies and basic materials makers, climbed after the Institute for Supply Management said U.S. manufacturing activity climbed in June to its highest level in almost three years.

“The market clearly liked that number,” said Scott Wren, senior global equity strategist for Wells Fargo Investment Institute. He said that economic reports over the last few months have been a bit disappointing, but “it’s still in line with expectations for modest GDP growth.”

The Standard & Poor’s 500 index added 5.61 points, or 0.2 percent, to 2,429.02. The Dow Jones industrial average rose 129.64 points, or 0.6 percent, to 21,479.27. The Russell 2000 index of smaller-company stocks added 11.32 points, or 0.8 percent, to finish at a record high of 1,426.68.

The Nasdaq composite lost 30.36 points, or 0.5 percent, to 6,110.06. That was a six-week low, as technology companies have been slumping for almost a month.

Overall, almost three-fourths of the stocks on the New York Stock Exchange finished higher.

Banks continued their recent winning ways as bond yields and interest rates increased further. Higher interest rates let banks make more money from lending, and that helped financial companies rally last week. Major banks also raised their dividends and said they will buy back more stock. JPMorgan Chase added $1.85, or 2 percent, to $92.75 and Citigroup rose $1.38, or 2.1 percent, to $68.26. Morgan Stanley climbed $1.05, or 2.4 percent, to $45.61.

U.S. factories did more work in June, according to the Institute for Supply Management. The group’s survey of manufacturing reached its highest level since August 2014. That suggests the economy could be getting stronger.