The purpose of this study is to form several optimal portfolios based on the proportion of funds invested in stocks, then the most optimal portfolio will be selected among the optimal portfolios that have been formed. The method used in this study is the lexicographic goal programming method, which is to determine the optimal portfolio based on the proportion of invested funds, then the selection of the most optimal portfolio is determined using the expected shortfall method. This study used data from 5 companies contained in Indonesia Stock Exchange (IDX). The results showed that from the proportion of invested funds, 11 optimal portfolios were obtained. Using the expected shortfall method, the most optimal portfolio of 11 portfolios was obtained, namely type 5 portfolio.