US stock market ended the month of May in a green despite experiencing wild swings throughout the months as investor’s concerns over the economic outlook, tensions over China, and higher than expected losses kept indices under pressure.

The markets stabilized in the second half of the month amid increasing optimism over economic reopening, with airlines, gambling, traveling and hotel stocks were among the biggest gainers over the past two weeks.

The S&P 500 and the Dow jumped close to 3% last week, increasing May advance to 4.5% and 4.2%, respectively. Meanwhile, the tech-heavy Nasdaq, which is trading a few percentage points below from its previous record high, rallied 6.7% in the last month alone.

The S&P 500 has crossed 3000 levels last week, extending the broader market index rally to 38% from its March low, only 10% below its all-time high that it had hit in February.

“The market has discounted the coronavirus very quickly and has correctly predicted the apex of the virus,” said Mike Katz, partner at Seven Points Capital. “Having said all that, prices are up there. The S&P 500 trading above 3,000 is pricing in a full recovery.”

The massive rebound in oil prices also helped energy stock in recovering losses. US crude oil rose almost 88% in May, marking the largest monthly gain in recorded history.

The US stock markets are likely to experience the bumpy ride in June as slower economic growth and lofty valuations are looming on investor’s sentiments.

Goldman Sachs bets that several factors would pull down stock market indices in the coming months before making a strong recovery in the final quarter of the year. Goldman forecasts that the S&P 500 could drop 18% in the three-months, which will drop the index to 2,400 points by the end of the summer.