Our level of happiness throughout life is strongly influenced by the genes with which we were born, say experts.
A question of nature, not nurture?
An Edinburgh University study of identical and non-identical twins suggests genes may control half the personality traits keeping us happy.
The other half is linked to lifestyle, career and relationships.
However, another expert said despite the research in the journal Psychological Science, we can still train ourselves to be more content.
Psychologists have developed several methods to assess a person's personality type - and even their level of happiness.
The Edinburgh study, in conjunction with researchers at the Institute for Medical Research in Queensland, Australia, looked at results from 900 pairs of twins.
The idea behind twin studies is that, because identical twins are genetically exactly the same, while fraternal twins are not, it is possible, by comparing the results from the two groups to calculate how strongly influenced a particular trait is by genetics.
In this case, the researchers looked for people who tended not to worry, and who were sociable and conscientious.
All three of these separate characteristics have been linked by other research to an overall sense of happiness or well-being.
The differences between the results from the identical and fraternal twins suggested that these traits were influenced up to 50% by genetic factors.
Dr Alexander Weiss, from Edinburgh's School of Philosophy, Psychology and Language Sciences, who led the research, said: "Together with life and liberty, the pursuit of happiness is a core human desire.
"Although happiness is subject to a wide range of external influences we have found there is a heritable component of happiness which can be entirely explained by genetic architecture of personality."
The science of happiness is a growing field, with demand from both the public and industry for insights into emotional wellbeing.
The Centre for Applied Positive Psychology promotes research into techniques for boosting personal contentment.
Dr Alex Linley, from the centre, said that even though other studies supported the genetic argument, it was wrong for anyone to think that nature had dealt them a fixed hand in happiness terms.
He said: "What it means is that, rather than a single point, people have a range of possible levels of happiness - and it is perfectly possible to influence this with techniques that are empirically proven to work.
"Simple things, like listing your strengths and using them in new ways every day, or keeping a journal where you write down, every night, three things that you are grateful for, have been shown to deliver improvements."