According to a new study, money can buy happiness.