Background: COVID-19 has had a negative impact on economic growth in Indonesia and affected the level of investment uncertainty in the Indonesian capital market. Leading stocks with large market capitalization and included in the LQ45 stock index on the Indonesia Stock Exchange (IDX) were also affected by the COVID-19 pandemic, which was corrected by -15% from the pre-pandemic period. This significant decline has a direct negative impact on capital market investors, so as to avoid the Black Swan event that occurred due to the recession, investors need to diversify their portfolios. Methods: Therefore, this study aims to assist investors in better portfolio diversification, especially in the face of the pandemic by using the clustering method. Clustering was carried out on 35 stocks that are members of LQ45 Index from January 1, 2019 to December 31, 2020 based on business fundamental and technical indicators stocks using the K-Means Clustering algorithm. Results: The clustering found that LQ45 stocks are grouped into 4 clusters, each of which have different unique characteristics. Furthermore, the results are used as a reference in stock portfolio allocation where the stocks which have the best sharpe ratio from each selected cluster will be selected to form a portfolio. Conclusion: Portfolio performance testing throughout the market period in 2021 show that formed portfolios are having excellent performance because it has a high positive return and looks much better compared to the LQ45 index as a macro evaluation. In addition, portfolios have also been well diversified, as evidenced by the low correlation value of its inter-stock correlation.