It’s time to take stock of how the economy performed in 2021 and to consider its prospects in the coming year.

With the omicron wave upon us, it would seem Pollyannaish to get too enthusiastic about the economy’s prospects going into the new year. Omicron is substantially more contagious than previous variants of COVID-19, and even if it is much less virulent, it is already doing significant economic damage. The National Hockey League has suspended play and much of Broadway has gone dark again.

But if the economy’s performance this last year is any guide, we shouldn’t be too pessimistic, either. Despite being hit hard by the delta wave of the virus, the economy grew like gangbusters in 2021. The economy won’t grow as strongly in 2022, but inflation, which has taken off in recent months, will come back to earth.

Having said this, how good a year the economy will have depends on the pandemic’s path and how well policymakers respond to it.

For the most part, the economy had a really good 2021. It created more than half a million jobs on average per month during the year, and unemployment has fallen to within hailing distance of where it was before the pandemic. The stock market has posted record highs all year and house prices have been sizzling. Retail sales this holiday season are likely to be the best ever. Yes, ever.

This strong performance can be traced back, in significant part, to the federal government support provided by the American Rescue Plan. This massive relief package, which was passed into law last spring, provided funds that are still being used to battle the pandemic, shore up school systems and state and local governments, and help financially hard-pressed lower- and middle-income households.

Growth would have been even stronger last year if not for the delta wave, which hit last summer. Delta was especially unnerving as it was upon us not long after the vaccines were rolled out. We had hoped the pandemic was behind us, but delta dashed those hopes, weighing heavily on the collective psyche and economy.

And delta is largely behind the biggest disappointment in the economy’s performance this past year: much higher inflation. The scrambling of global supply chains in the wake of delta this summer goes a long way to explain the higher-than-anticipated inflation. Delta was especially hard on Asia, where many supply chains begin, including for the vehicle industry, which is dependent on semiconductors produced there. Without chips, auto production and inventories collapsed, and vehicle prices soared. A similar dynamic has played out for a wide range of goods.

Omicron won’t be the last wave

The pandemic remains central to the economy’s prospects in the coming year. Even after the omicron wave abates, there are likely to be others. But each new wave should be less disruptive to the health-care system and economy than the wave before it.

This would be consistent with the path of the pandemic so far. An increasingly vaccinated population, booster shots, and new antiviral medications and therapies should help ensure that although many more people will get sick, there will be fewer hospitalizations and deaths. Businesses are also increasingly adept at managing through the waves. They will be less likely to significantly disrupt their operations when the next wave hits.

Whether lawmakers in Washington are able to get it together and pass some version of President Joe Biden’s Build Back Better agenda also matters to the outlook. The legislation, which includes spending increases and tax credits for social programs from health care and housing to child and elder care to climate change, paid for by tax increases on large corporations and the wealthy, is currently hung up in the political process.

After more Sturm und Drang in D.C., some form of the legislation should become law. It won’t be a game changer for the economy if it doesn’t, but if not, it will diminish the economy’s growth prospects and ding the fortunes of lower- and middle-income households.

The future of interest rates

I’m also counting on the Federal Reserve’s ability to adjust interest rates adeptly in response to quickly shifting conditions. If things hold together, as anticipated, Fed policymakers appear set to begin slowly raising rates by next summer. But they may need to adjust their plans, given the meaningful odds that neither the pandemic nor lawmakers stick to script. And these are the known unknowns. The Fed will almost surely need to grapple with a few unknown unknowns, as well.

But the most fundamental reason for optimism over the economy’s prospects is its uncanny ability to adjust to anything thrown at it. Despite the devastating pandemic, as things stand now, it will take no more than three years for the economy to fully recover from the first wave of the virus. This is testament to the dedication of our health-care providers and other front-line workers, the ingenuity of our pharmaceutical industry and medical technology, the massive collective response of federal, state and local governments, and the resilience of the American economy and people.

Mark Zandi is chief economist for Moody’s Analytics.