Personally, I had envisioned 2020 as a spectacular year. I’m living several milestones during it — a big birthday, a major anniversary — so I had a bunch of good times planned. And then came the pandemic.

Not only were my celebrations ruined, but news and worries also continually batter me and everyone else. In the face of these challenges, will our long-term optimism about the future take a hit?

Maybe not. Here’s what several experts think about optimism, why it matters and what we can do to improve it.

An upward trajectory

Pick one:

A. I expect more good things to happen than bad things.

B. I rarely count on good things to happen to me.

If you identify more with A, you’re an optimist. If you identify more with B, you’re a pessimist.

You probably fall between the two. “There are plenty of people who are right smack dab in the middle, where they’re optimistic about some things, pessimistic about other things,” says William Chopik, assistant professor of social and personality psychology and director of the Close Relationships Lab at Michigan State University.

Part of the reason you lean more toward one or the other is genetic: A study of 500 pairs of twins, half reared together and half adopted apart early in life, found that optimism is about 25 percent inherited. “But then the rest is shaped by stuff that happens to you across your life,” Chopik says. “Your parents, how did they treat you? How did your relationships with your friends go? Are you a good student? Did you experience a lot of success early in life?”

Another important factor is age. Chopik is a co-author of a recent study that looked at nearly 75,000 people, including 22,150 Americans from ages 18 to 104. It found that optimism generally increases throughout younger adulthood, flattens out between about ages 55 and 70, and then decreases again after that.

“Earlier in life, when you’re a teenager or in college,” Chopik says, “you invest a lot in furthering your career and kind of getting ahead in life.” After, you might tend to your family or hobbies. These activities boost your optimism that life will go well. “Another thing is that you just get better at stuff. You become a more competent person, so that might also increase optimism.”

Then, once poor health and other limitations of age start appearing, optimism plateaus and eventually starts to decline.

This trajectory is roughly the inverse of the “happiness curve,” which shows a high of happiness in youth, a dip in middle age and improvement after 50. That’s because optimism somewhat predicts happiness: Optimism now means you will probably engage in behaviors that will create happiness later. Also, Chopik says, “people can be currently unhappy yet still be optimistic about the future, that sunnier days will eventually come.”

The event effect

While it seems like the pandemic and other crises would cause a drop in optimism, researchers have found that significant, one-time events may not greatly affect where we stand.

The birth of a child, the death of a partner, a first job, a cancer diagnosis — Chopik’s study found “they didn’t really predict people becoming more or less optimistic,” he says.

The issue may be that two people can experience the same event differently; what’s terrible for one person can feel positive for someone else, and vice versa. Ted Schwaba, a PhD student in psychology at the University of California at Davis, is a co-author of the same study. He gives an example: “For some people, they move in with their partner and it’s great. Other people move in with their partner, and it’s the worst thing they’ve ever done.”

It may also come down to mind-set. When good things happen, optimists may take credit for doing a good job. When bad things happen, they may blame chance. “Optimists have convinced themselves that even the worst in life has a silver lining,” Chopik says, while Schwaba puts it this way: “If you’re an optimist, you can at least squeeze some lemonade out of the lemon.”

“Everyone has days where they’re feeling more optimistic or more pessimistic,” Schwaba says. Although the pandemic may indeed be long and shocking enough to create lasting change, “people might bounce back.”

Why optimism matters

Optimism matters because it motivates, Chopik says. “If I think it’s going to work out, I actually try to do it.” Pessimism, on the other hand, protects you. “You can avoid a lot of situations that won’t go well,” although you’ll miss out on those that might.

This motivation factor appears to affect us physically. Julia Boehm is an assistant professor of psychology and the director of the Health and Well-Being Laboratory at Chapman University. “If your goal is to be healthy, and you’re optimistic about being able to meet that goal, you might be more likely to choose behaviors that are in line with your goal,” she says. Hello apple, so long french fry.

Pointing to two studies (involving more than 100,000 participants) that she and other researchers conducted, Boehm says: “People who are more optimistic have a reduced risk of experiencing cardiovascular disease. They’re less likely to have heart attacks, less likely to have strokes and less likely to die from cardiovascular-related mortality.” The main reason: “People who are optimistic tend to engage in healthier behaviors, like eating fruits and vegetables, exercising regularly and not smoking cigarettes.”

Although Boehm’s work suggests that it’s the optimism that leads to the benefits, “it’s certainly possible that engaging in healthy behaviors could also influence a person’s level of optimism,” she says.

Optimism has also been linked to happy romantic relationships, a reduced likelihood of becoming cognitively impaired, fewer sick days and lower levels of pain. More optimistic people tend to work harder, expect to retire later and save more money.

Schwaba says: “It’s just, basically, almost an entirely good trait.”

How you can get more of it

Lindsay Brancato, a Washington-area clinical psychologist and psychoanalyst, said that, in her experience, people’s leanings regarding optimism have been “a little more reinforced” by the pandemic.

However, there’s a healthy line, according to Brancato. Above it, she says, you can “accept the fact that things can go wrong, and be able to prepare yourself for things going wrong, but still have hope.” But “if you’re stuck in that place where you can’t see any hope, I think it’s time to look for help.”

Even without the aid of a therapist, you can challenge yourself about why you expect the worst, “creating space between the conscious, automatic ideas that you have, asking yourself questions and gaining insight,” she says. Activities such as writing or meditation can help you look inward and reflect on a more positive point of view. Also, you should “remind yourself that everything is temporary, that life isn’t about only good or only bad; it’s integrating both and being able to weather the storm to the other side.”

Boehm also suggests fostering optimism by asking: “What is the best possible outcome for myself in the future?” Think about possible challenges and concrete ways to overcome them. At the end of the day, practice gratitude by asking yourself what went well that day. Be kind to other people. “Because even when we’re in the midst of a pandemic like this, and things seem out of control, there’s always something good.”

Which is my attitude, too. This year’s celebrations may not have taken place as expected, but that will only make them sweeter when they eventually come.

Galadriel Watson is creating a very optimistic series of web comics: “Snapshots of a Beautiful Life.” She’s also the author of many books for kids, including “Running Wild” and “Extreme Abilities.”