U.S. stocks advanced Monday, driving the S&P 500 to a fresh high for the year.

Major indexes have rallied since May 19, which marked a recent low, with the S&P 500 gaining 3.4% in that period. With the advance, the broad-market index is 1% below its all-time closing high from May 2015.

Comments from Federal Reserve Chairwoman Janet Yellen on Monday and the surprisingly weak jobs report on Friday reaffirmed the view that U.S. interest rates will rise gradually. Many investors say there are few attractive alternatives to stocks in a low-rate world, even though the stock market is no longer cheap after years of gains.

“Why not stocks?” said Ben Pace, chief investment officer at HPM Partners, which manages $6 billion, comparing stock-market returns with those on bonds or cash.

The S&P 500 recently had a trailing price-to-earnings ratio of 18.8, higher than its 10-year average of 15.8, according to FactSet.