Development of stock price prediction system using Flask framework and LSTM algorithm

Kefas Bagastio, Raymond Sunardi Oetama, Arief Ramadhan

Article ID: 2631
Vol 7, Issue 3, 2023

VIEWS - 953 (Abstract) 563 (PDF)

Abstract


Stock investment in Indonesia has been steadily growing in the past five years, offering profit potential alongside the risk of loss. Stockholders must analyze the stocks they intend to purchase. Stockholders often analyze stocks by observing patterns that occurred in the previous days to predict future prices. Therefore, a method is needed to simplify the process of analyzing the stock pattern. Although there are already several websites that have the concept of predicting stock prices, these websites do not utilize deep learning algorithms. This research aims to develop a stock price prediction website using deep learning algorithms, specifically the Long Short-Term Memory (LSTM) algorithm to help users predict stock prices. This research focuses on five banks with the highest market capitalization in Indonesia, namely Bank Central Asia, Bank Rakyat Indonesia, Bank Mandiri, Bank Negara Indonesia, and Bank Syariah Indonesia. The website utilizes Flask framework and LSTM. Flask is used to apply LSTM model to the website, while the LSTM can capture long-term dependencies in high-complexity data. The result of this research is a stock price prediction website application, where the prediction results are displayed through the website. The LSTM model for each stock has a Mean Absolute Percentage Error (MAPE) of less than 10%, which indicates that the model is “Highly accurate” based on the MAPE accuracy scale judgment.

Keywords


stocks; prediction; Flask framework; Long Short-Term Memory algorithm; Indonesia

Full Text:

PDF


References


Anggoro DA, Aziz NC (2021). Implementation of K-Nearest Neighbors algorithm for predicting heart disease using Python Flask. Iraqi Journal of Science 62(9): 3196–3219. doi: 10.24996/IJS.2021.62.9.33

Bathla G (2020). Stock price prediction using LSTM and SVR. In: Proceeding of the 2020 Sixth International Conference on Parallel, Distributed and Grid Computing (PDGC); IEEE; pp. 211–214.

Dong S, Wang P, Abbas K (2021). A survey on deep learning and its applications. Computer Science Review 40: 100379. doi: 10.1016/J.COSREV.2021.100379

Guha SK, Samanta N, Majumdar A, et al. (2019). Evolution of corporate governance in India and its impact on the growth of the financial market: An empirical analysis (1995–2014). Corporate Governance (Bingley) 19(5): 945–984. doi: 10.1108/CG-07-2018-0255

Hamdani NA, Yulianto E, Maulani GAF (2021). Designing loss event database using evolutionary prototyping model to perform bank operational risk management identification process. IOP Conference Series: Materials Science and Engineering 1098(4): 042008. doi: 10.1088/1757-899x/1098/4/042008

Hastomo W, Karno ASB, Kalbuana N, et al. (2021). Deep learning pptimization for stock predictions during the Covid-19 pandemic (Indonesian). JEPIN (Jurnal Edukasi dan Penelitian Informatika) 7(2): 133–140. doi: 10.26418/JP.V7I2.47411

Ilham RN, Irawati H, Nurhasanah N, et al. (2022). Relationship of working capital management and leverage on firm value: An evidence from the Indonesia stock exchange. Journal of Madani Society 1(2): 64–71. doi: 10.56225/JMSC.V1I2.129

Janiesch C, Zschech P, Heinrich K (2021). Machine learning and deep learning. Electronic Markets 31(3): 685–695. doi: 10.1007/s12525-021-00475-2

Kumar MP, Kumara NM (2020). Market capitalization: Pre and post COVID-19 analysis. Materials Today: Proceedings 37(2): 2553–2557. doi: 10.1016/j.matpr.2020.08.493

Kyin MS, Oo ZL, Cho KM (2020). An overview studying of deep learning. International Journal of Scientific Research in Science Engineering and Technology 7(2): 394–398. doi: 10.32628/IJSRSET207279

Liang Z, Liang Z, Zheng Y, et al. (2021). Data analysis and visualization platform design for batteries using flask-based Python Web Service. World Electric Vehicle Journal 12(4): 187. doi: 10.3390/wevj12040187

Maruddani DAI, Trimono (2018). Modeling stock prices in a portfolio using multidimensional geometric brownian motion. Journal of Physics: Conference Series. doi: 10.1088/1742-6596/1025/1/012122

Meshram S, Narsale S, Sangamnere S, et al. (2022). Stock prediction webapp using Python. International Journal of Advanced Research in Science, Communication and Technology (IJARSCT) 2(7). doi: 10.48175/IJARSCT-4359

Mufid MR, Basofi A, Al Rasyid MUH, et al. (2019). Design an mvc model using python for Flask framework development. In: Proceedings of the 2019 International Electronics Symposium (IES); IEEE. doi: 10.1109/ELECSYM.2019.8901656

Prasad A, Seetharaman A (2021). Importance of machine learning in making investment decision in stock market. Vikalpa 46(4): 209–222. doi: 10.1177/02560909211059992

Prasetya BD, Pamungkas FS, Kharisudin I (2019). Modeling and forecasting stock data with time series analysis using Python (Indonesian). PRISMA, Prosiding Seminar Nasional Matematika 3: 714–718.

Rachma N, Muhlas I (2022). Comparison of waterfall and prototyping models in research and development (R&D) methods for android-based learning application design. Jurnal Inovatif: Inovasi Teknologi Informasi Dan Informatika 5(1): 36–39. doi: 10.32832/inova-tif.v5i1.7927

Rahmawati A, Garad A (2023). Managerial ownership, leverage, dividend policy, free cash flow, firm value: Evidence in Indonesia stock exchange. European Journal of Studies in Management and Business 25: 32–44. doi: 10.32038/mbrq.2023.25.03

Ramyakim RM, Widyasari A (2022). Age demographics of shareholders investors per sector (up to March 2022) (Indonesian). Available online: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiFsPnQ-7r_AhUTwTgGHbCPC8MQFnoECCAQAQ&url=https%3A%2F%2Fwww.ksei.co.id%2Ffiles%2Fuploads%2Fpress_releases%2Fpress_file%2Fid-id%2F205_berita_pers_saham_industri_keuangan_menjadi_incaran_investor_gen_z_20220420142705.pdf&usg=AOvVaw1wUq-2cdRxSSCmCIZwp6U8 (accessed on 11 June 2023).

Siami-Namini S, Tavakoli N, Namin AS (2018) A comparison of ARIMA and LSTM in Forecasting Time Series. In: Proceeding of the 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA); IEEE; pp. 1394–1401 2018.

Smagulova K, James AP (2019). A survey on LSTM memristive neural network architectures and applications. The European Physical Journal Special Topics 228(10): 2313–2324. doi: 10.1140/EPJST/E2019-900046-X.

Statistik Pasar Modal Indonesia (2023). Available onlnine: www.ksei.co.id (accessed on 23 August 2023).

Untoro AB (2021). Stock price prediction using artificial neural networks (Indonesian). Jurnal Teknologi Informatika dan Komputer 6(2): 103–111. doi: 10.37012/jtik.v6i2.212.

Van Houdt G, Mosquera C, Nápoles G (2020). A review on the Long Short-Term memory model. Artificial Intelligence Review 53(8): 5929–5955. doi: 10.1007/s10462-020-09838-1

Xia K, Huang J, Wang H (2020). LSTM-CNN architecture for human activity recognition. IEEE Access 8: 56855–56866. doi: 10.1109/ACCESS.2020.2982225

Yahoo finance-stock market live, quotes, business & finance news. Available online: https://finance.yahoo.com/ (accessed on 23 August 2023).




DOI: https://doi.org/10.24294/jipd.v7i3.2631

Refbacks

  • There are currently no refbacks.


Copyright (c) 2023 Kefas Bagastio, Raymond Sunardi Oetama, Arief Ramadhan

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

This site is licensed under a Creative Commons Attribution 4.0 International License.