Wall Street barreled toward a big August finish Friday, with the Dow erasing its 2020 losses and U.S. stocks chalking up another week of gains.

The Dow Jones industrial average jumped 161.60 points, or 0.6 percent, to settle at 28,653.87, which put the blue-chip index in positive territory for the year and pulled it within a few percentage points of the all-time high set in February. The Standard & Poor’s 500 closed up 23.46 points, or nearly 0.7 percent, to close at 3,508.01, while the tech-heavy Nasdaq composite added 70.30 points, or 0.6 percent, to finish at 11,695.63.

Both the S&P 500 and the Nasdaq have notched five straight weeks of gains, with the broad index on track for its best August since 1986 — it’s up nearly 7.2 percent with one trading day left. Improving labor data and moves toward looser monetary policy by the Federal Reserve helped usher in a week of milestones on Wall Street, even as the wait continues for a coronavirus vaccine or treatment, and the threat of a second wave of infections looms over the economic recovery.

“The promise of lower rates for longer was music to the ears of Wall Street bulls,” Craig Erlam, an analyst with OANDA, wrote in a commentary Friday. “The taps will be on for the foreseeable future as the economy recovers from the wreckage of the pandemic, hopefully aided by a vaccine later this year.”

Investors are monitoring how the expiration of coronavirus-related aid, such as the $1,200 stimulus checks and $600 in enhanced weekly unemployment benefits, will affect consumer spending.

Chris Rupkey, chief financial economist for MUFG, isn’t hopeful that the back-to-school revenue rush will sustain itself, and Americans’ personal income could determine the course of economic recovery in the coming months.

“The consumer is back spending at the shops and malls in July, but many of their purchases reflected pent-up demand following the pandemic lockdown, and the expenditures needed to fuel the economy’s recovery in August are a big question mark,” he said in an email. “Beware of August as no money coming in means no money going out.”

The coronavirus pandemic, which has killed more than 178,000 Americans and infected nearly 5.9 million, sent markets spiraling in March and ushered the United States into a recession. Stocks may have snapped back, but the labor market remains deeply scarred by the losses brought on by the pandemic. On Thursday, the Labor Department said another 1 million Americans filed jobless claims last week. Now, roughly 27 million are receiving some form of unemployment aid, as many of the temporary job losses turned permanent.

This week alone, a half-dozen major companies announced layoffs, including Coca-Cola, Salesforce, American Airlines and Bed Bath & Beyond. Lord & Taylor, which filed for Chapter 11 protection on Aug. 2, announced Thursday that it would shutter its remaining 38 stores and website. The nation’s oldest department store chain is among more than a dozen retailers that have filed for bankruptcy since the outbreak.

On Friday, MGM Resorts notified 18,000 furloughed workers — roughly one-fifth of its U.S. workforce — that their jobs are gone. The hospitality industry has been severely battered during the pandemic amid a plunge in recreational travel and as many Americans steer clear of hotels, restaurants and other venues where large concentrations of people meet. MGM warned in May that the uncertain recovery for leisure and travel spending could lead to permanent job cuts this year. The casino giant’s shares gained 4.6 percent Friday.

MGM, which employed about 70,000 workers in the U.S. before the pandemic, operates more than a dozen hotels and casinos in Las Vegas and several others across the U.S. All but two of its properties have reopened, though with capacity limits. And live events and convention operations remain on hold.

The Federal Reserve took steps to guard the recovery Thursday when it changed its approach to inflation as part of a switch toward looser monetary policy, signaling that the central bank won’t be raising interest rates anytime soon and wouldn’t increase rates or brace for a rise in inflation even as employment levels strengthen.

Curt Long, chief economist at the National Association of Federally-Insured Credit Unions, said in a commentary Thursday that the Fed’s new framework “looks to avoid the mistakes of the past.”

“Where some of the tightening which took place during the last cycle was done to short-circuit the inflation that policymakers thought was right around the corner, now they will wait until those stresses manifest more fully before raising rates,” Long said.