Portfolio optimization is always the priority of market researchers, large financial institutional investors, Mutual Fund, and Pension funds managers. Due to high volatility in the stock market, people are less interested in the Stock market. Therefore, we designed a fusion model to predict the future stock prices which gives us maximum returns on the selected group of companies. Previously it requires a wealth manager to study how to get maximum returns on our capital. But now, in this new era, we can do it with the help of techniques like Machine Learning, Dynamic Programing, Artificial Intelligence, and Linear Programming. If we invest in one Stock, the risk is more; however, we reduce the risk by diversifying the portfolio. To diversify the risk, we need a strong portfolio of fundamentally strong stocks. Various deep learning and machine learning models have been implemented previously, but none of them has implemented Efficient Frontier combined with the approach of Mean–Variance optimization. This paper makes a novel attempt to predict realistic and correct ratios of stocks and minimum/maximum returns. This paper proposed two new algorithms: one for the Selection of fundamentally solid stocks and the next for Diversification. In-Depth research is done on the Indian Stock Market, i.e., Nifty 50. Our model will provide you with ratios in which you have to diversify capital based on fundamentals, log returns, and a dynamic approach to take maximum returns. © 2022, The Author(s), under exclusive licence to Bharati Vidyapeeth's Institute of Computer Applications and Management.