PurposeThis research aims to identify the optimal configuration of investment which leads firms to their best competitive positions, considering the degree of concentration in the market.Design/methodology/approachThe methodology was quantitative and based on secondary data with samples of 124, 106 and 90 firms from competitive environment classified as perfect competition, monopolistic competition and oligopoly, respectively. Proposed models' parameters were estimated by means of genetic algorithms.FindingsAdjustments on firm's investment are contingent on the degree of competition they face. Results are in line with existing academic research affirmation that the purpose of investments is to create and exploit opportunities for positive economic rents and that investments allow firms to protect from rivals' competitive actions and reinforce the need for investment decision makers to consider the environment in which the firm is competing, when defining the amount of investment that must be done to achieve and maintain a favorable competitive advantage position.Originality/valueThis research brings two main original contributions. The first one is the identification of the optimal amount of capital and R&D investments which leads firms to their best competitive positions, contingent to the degree of concentration of the competitive environment in which they operate, and the size of the firm. The second one is related to the use of genetic algorithms to estimate optimization models that considers the three competitive environments studied (perfect competition, monopolistic competition and oligopoly) and the investment variables in the linear and quadratic forms.