An investment model of the firm