Choosing the proper investment mechanism is one of the main tasks of any investor that requires careful analysis and research on all available information. Since no investor exactly knows whether his or her expectations for a particular stock return will be met, they need to build their strategy in such a way as to eliminate as much damage as possible in the event of an adverse outcome. This study aims to predict the optimal portfolio using Algorithm Analysis Systems. In this regard, 98 firms listed on the Tehran Stock Exchange were examined in 2015-2019. Then, random portfolios were selected to test the research hypotheses by separating value stocks and growth stocks. For analysis, two algorithms of Support Vector Machines and an Adaptive Neuro-Fuzzy Inference System were used to select the most desirable portfolio. According to the support vector machine algorithm analysis, the results confirm the difference between the Sortino and Marquitz portfolios. To build their portfolios, decision-makers often rely on growth stocks which can boost their expected returns. Therefore, recognizing the analytical nature of portfolio formation in specialized areas can help improve investment analysis and pave the way for higher returns.