Joel Greenblatt's 'magic formula investing' involves selecting cheap and quality companies based on their high earnings yields and return on invested capital.