Stocks on Wall Street erased their losses for the year, a remarkable milestone for a market that was reeling just a few months ago as investors feared the damage caused by the coronavirus pandemic.

The S&P 500 rose more than 1% on Monday, adding to a weekslong rebound that has been fueled by hopes for a quick economic recovery, significant intervention by the Federal Reserve and a disregard for the serious risks that businesses and consumers still face.

A familiar list of companies has been leading the recent gains. Airlines have been lifted by signs that domestic travel is starting to pick up, and they rallied again on Monday along with Boeing, which rose 12.2% to close at $230.50, up from a March closing low of $95. With oil prices rebounding, crude briefly crossed above $40 a barrel on Monday for the first time in months, and energy companies have also surged.

Stocks have been on an upward trajectory for weeks as investors have responded to signs around the world that the virus was abating. New York, the center of the coronavirus outbreak in the United States, on Monday began to lift some restrictions on construction, manufacturing and retail operations.

Progress like that, and early evidence that it means people are returning to work, helped fuel a nearly 5% gain in the S&P 500 last week — its biggest weekly run since early April. But the market’s rebound really began in March, after the Federal Reserve signaled its willingness to funnel unlimited amounts of liquidity into financial markets. Since then, stocks have risen more than 44%.

Investors have plenty of reasons to be wary, of course: A second wave of the coronavirus outbreak that forces governments to clamp down on public activity again, a premature end to government spending or a slower-than-expected return of business could all dampen enthusiasm for stocks.

According to data compiled by The New York Times, new infections are still increasing in more than a third of states. Public officials are also wary of a surge in new cases as thousands of protesters across the country demonstrate against police brutality after the death of George Floyd.