Analisis Trade-off antara Efisiensi Komputasi dan Solusi pada Optimasi Kombinasi Portofolio Saham Menggunakan Algoritma Brute force dan Algoritma Greedy
DOI:
https://doi.org/10.62951/router.v4i2.888Keywords:
Brute force Algorithm, Greedy Algorithm, Portfolio Optimization, Sharpe Ratio, Trade-OffAbstract
In stock investment, determining a portfolio that offers attractive returns while maintaining acceptable risk remains a major challenge. Portfolio optimization algorithms can assist in identifying suitable stock combinations; however, the optimization process becomes increasingly complex as the number of possible combinations grows. This study analyzes the trade-off between computational efficiency and portfolio solution quality using the Brute Force and Greedy algorithms. The dataset consists of historical daily adjusted closing prices from 472 S&P 500 companies during the 2025–2026 period. The methodology includes data preprocessing, annualized return and volatility calculation, covariance matrix construction, and portfolio evaluation using the Sharpe ratio. The results show that the Brute Force algorithm consistently achieves higher Sharpe ratios, reaching 4.3619 compared to 3.6470 obtained by the Greedy algorithm for four stock portfolios. However, its runtime increases substantially from 0.0425 seconds for two-stock combinations to 670.7102 seconds for four stock combinations. In contrast, the Greedy algorithm maintains a stable runtime of approximately 0.0015 seconds while producing solutions that remain relatively close to the optimal results. These findings demonstrate a clear trade-off between computational efficiency and solution quality in portfolio optimization.
Downloads
References
Abdjul, L., Resmawan, R., Nuha, A. R., Nurwan, Wungguli, D., & Nashar, L. O. (2023). Optimasi portofolio saham syariah menggunakan model indeks tunggal dan VaR berbasis GUI Matlab. Jambura Journal of Mathematics, 5(1), 243–253. https://doi.org/10.34312/jjom.v5i1.18570
Ast, J., Wasseghi, R., & Nyhuis, P. (2021). A comparison of methods for determining performance based employee deployment in production systems. Production Engineering, 15(3–4), 335–342. https://doi.org/10.1007/s11740-021-01019-5
Azim, M. F., Azizah, & Anggraini, D. (2021). Optimasi bobot portofolio menggunakan algoritma genetika. Jurnal Sains Matematika dan Statistika, 7(1), 58–64. https://doi.org/10.24014/jsms.v7i1.12190
Desvi, M. S., Saepudin, D., & Kurniawan, I. (2024). Optimasi portofolio saham menggunakan metode Stock Network Portfolio Allocation berbasis return history (SNPAr). LOGIC: Jurnal Penelitian Informatika, 2(1), 21–26. https://doi.org/10.25124/logic.v2i2.8809
Dima, J., Hamzah, M. S., Tallo, C. G., & Fallo, D. Y. (2025). Tinjauan literatur tentang pemanfaatan algoritma greedy untuk pencarian jalur terpendek. Jurnal Kridatama Sains dan Teknologi, 7(1), 519–528. https://doi.org/10.53863/kst.v7i01.1683
Fadhila, S. N., & Zuliana, S. U. (2023). Optimasi portofolio saham menggunakan model Markowitz berdasarkan prediksi harga saham. Kaunia: Integration and Interconnection Islam and Science, 18(1), 35–40. https://doi.org/10.14421/kaunia.3948
Froese, V., Hertrich, C., & Niedermeier, R. (2022). The computational complexity of ReLU network training parameterized by data dimensionality. Journal of Artificial Intelligence Research, 74, 1075–1116. https://doi.org/10.1613/jair.1.13547
Ismail, M., & Pham, H. (2017). Covariance matrix estimation for portfolio optimization. arXiv. https://doi.org/10.48550/arXiv.1610.06805
Landete, M., Monge, J. F., Ruiz, J. L., & Segura, J. V. (2020). Sharpe portfolio using a cross-efficiency evaluation. In V. Charles, J. Aparicio, & J. Zhu (Eds.), Data science and productivity analytics (pp. 415–439). Springer International Publishing. https://doi.org/10.1007/978-3-030-43384-0_15
Nisardi, M. R., Husain, H., Kusnaeni, & Resky, A. (2024). Penentuan portofolio saham optimal menggunakan metode Markowitz sebagai dasar keputusan investasi. Square: Journal of Mathematics and Mathematics Education, 6(1), 33–40. https://doi.org/10.21580/square.2024.6.1.20441
Seru, F., & Saputro, A. D. (2024). Pendekatan optimalisasi portofolio dengan Capital Asset Pricing Model dan model Markowitz sebagai strategi investasi cerdas bagi investor milenial. Journal of Mathematics: Theory and Applications, 6(2), 214–224. https://doi.org/10.31605/jomta.v6i2.4117
Setiawan, C. D., & Dewi, V. I. (2021). Analisis pembentukan portofolio saham optimal menggunakan pendekatan model indeks tunggal sebagai dasar keputusan investasi. Valid Jurnal Ilmiah, 19(1), 24–35. https://doi.org/10.55606/jebaku.v5i1.5461
Skala, V. (2013). Fast Oexpected(N) algorithm for finding exact maximum distance in E2 instead of O(N²) or O(N log N). AIP Conference Proceedings, 1558, 2496–2499. https://doi.org/10.1063/1.4826047
Syuhada, M. Y., & Sudirman. (2018). Perbandingan algoritma greedy search dan algoritma depth-first search pada pencarian kota dengan Graph Romania Problem. Journal of Informatics and Telecommunication Engineering (JITE), 1(2), 58–60. https://doi.org/10.31289/jite.v1i2.1405
Xu, J., & Xu, X. (2024). Efficient and provably convergent randomized greedy algorithms for neural network optimization. arXiv. https://doi.org/10.48550/arXiv.2407.17763
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Router : Jurnal Teknik Informatika dan Terapan

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.



