Yes, you could be right. Our home life has an enormous impact on our attitude.I found being around someone who was negative all the time about every single thing in our life brought me down and caused me to become depressed. Once I got away from that situation I felt happy and positive about life. Yes, there are times when my problems make me feel bad and I cry to myself. I never bring other people down complaining and whining about my life. If I sound too cheery and happy at times it is mainly because I lived so long without being allowed to show those feelings. If I did, my home life was even more miserable.
I wonder though if being negative about everything that goes wrong in your life could be inherited? The person I am talking about came from a family full of negative people. They never even told a joke until I came along. My family was just the opposite. They (not my family) were always "poor me" or if so and so hadn't done that my life would have turned out different. I could not stand it.
It's also true that some people think that being cheerful is somehow tempting fate. We must always expect the worst, otherwise we might get a nasty shock.