When one of your friends gets a cold, you know it’s bound to start spreading to the other members of your social circle until you’ve all gone through it. Apparently, the same might be true when it comes to moods, according to a new study from the University of Warwick.

With the help of some mathematical modeling, a research team used data from the National Longitudinal Study of Adolescent to Adult Health and found that in U.S. adolescents, both good and bad moods have a tendency to spread throughout friend groups.

“We investigated whether there is evidence for the individual components of mood (such as appetite, tiredness, and sleep) spreading through U.S. adolescent friendship networks while adjusting for confounding by modeling the transition probabilities of changing mood state over time,” said public health statistics researcher Rob Eyre, leader of the study, according to a university press release.

They found that if you surround yourself with people who are perpetually chipper, you’re more likely to be the same way. But if your friends are a bunch of Debbie Downers, you’ll probably join them—and stay that way. Although depression itself didn't prove to be contagious in the study, these findings will be useful in figuring out how to help adolescents suffering from depression, says professor Frances Griffiths of Warwick Medical School, the study’s co-author.

“Understanding that these components of mood can spread socially suggests that while the primary target of social interventions should be to increase friendships because of its benefits in reducing of the risk of depression, a secondary aim could be to reduce spreading of negative mood,” she says.

So the next time you can’t figure out why you’re in a bad mood, take a look around—and maybe set aside less time for the Grumpy Cats.