On the theory of the firm in an economy with incomplete markets