CHAPTER


DOI :10.26650/B/T8SSc4.2024.041.004   IUP :10.26650/B/T8SSc4.2024.041.004    Full Text (PDF)

Estimation of Bitcoin Price Using Long Short-Term Memory (LSTM) by Feature Selection with Genetic Algorithm

Coşkun ParimTuğba GüzErhan Çene

Bitcoin (BTC) is a well-known cryptocurrency traded in financial markets based on blockchain technology. In recent years, bitcoin draws more attention than other financial investment instruments due to its capabilities of 24- hour trading, high volatility, and high profit potential with the price of high risk. The aim of the study is to estimate bitcoin price using 26 variables which consists of blockchain information, macroeconomic factors and global currency ratio variables such as average block size, cost per transaction, hash rate, gold futures, USD/EUR. Classical methods for estimation may not be appropriate when there are multicollinearity between variables and their level of stationary is not in the same order. Thus, LSTM will be used instead of classical methods for estimation which doesn’t effected above mentioned restrictions.

Three machine learning based regression models are developed for estimating bitcoin prices for the 1 day, 7 days and 30 days ahead. The time series dataset to be used in the study is from 7/19/2010 to 7/19/2022. First of all, genetic algorithm is used to select relevant variables that affects bitcoin prices for the 1st, 7th and 30th days, respectively. For each set of variables, datasets are chronologically divided into training, and test data. Afterward, the bitcoin price is estimated by using the selected variables with LSTM. The performance of the models are assessed with R square, MAE, and RMSE metrics to compare the performance of Bitcoin estimation models.

Among constructed models one day ahead model has the highest R2 (0.98), and lowest RMSE (8204.57) and MAE (6341.62). As the estimation period gets longer R2 tends to get lower (0.96 for seven days ahead and 0.90 for thirty days ahead), RMSE and MAE tend to get higher. This is because it becomes harder to make estimation for further in time as uncertainty gets higher. Also in the case of Bitcoin, prices increased suddenly in the test data set which makes it difficult for the models to catch it when the time interval increased. This sudden increase in the Bitcoin prices also resulted the LSTM model estimation to be lower than the actual values.

In conclusion, it is stated that the bitcoin price using LSTM for the 1st, 7th, and 30th days are estimated with low error and models can detect the changes in bitcoin price adequately.



References

  • Akaike, H. (1998). Information theory and an extension of the maximum likelihood principle. In Selected papers of hirotugu akaike (pp. 199-213). Springer. google scholar
  • Albariqi, R., & Winarko, E. (2020). Prediction of bitcoin price change using neural networks. 2020 International Conference on Smart Technology and Applications (ICoSTA), 1-4. google scholar
  • Ali, W., & Ahmed, A. A. (2019). Hybrid intelligent phishing website prediction using deep neural networks with genetic algorithm-based feature selection and weighting. IET Information Security, 13(6), 659-669. https:// doi.org/10.1049/iet-ifs.2019.0006 google scholar
  • Alpago, H. (2018). From Bitcoin to Selfcoin the Cryptocurrency. Journal of the International Scientific Rese-arches, 3(2), 411-428. google scholar
  • Basher, S. A., & Sadorsky, P. (2022). Forecasting Bitcoin price direction with random forests: How important are interest rates, inflation, and market volatility? Machine Learning with Applications, 9, 100355. google scholar
  • Baur, D. G., Dimpfl, T., & Kuck, K. (2018). Bitcoin, gold and the US dollar-A replication and extension. Finance Research Letters, 25, 103-110. google scholar
  • Bitcoin Historical Data. (2023). https://tr.investing.com/crypto/bitcoin/historical-data google scholar
  • Böhme, R., Christin, N., Edelman, B., & Moore, T. (2015). Bitcoin: Economics, technology, and governance. Journal ofEconomic Perspectives, 29(2), 213-238. google scholar
  • Boopathi, D., Jagatheesan, K., Samanta, S., Anand, B., & Jaya, J. (2023). Application of Genetic Algorithm-Ba-sed Controllers in Wind Energy Systems for Smart Energy Management. In Applied Genetic Algorithm and Its Variants: Case Studies and New Developments (pp. 139-160). Springer. google scholar
  • Bouri, E., Gupta, R., Tiwari, A. K., & Roubaud, D. (2017). Does Bitcoin hedge global uncertainty? Evidence from wavelet-based quantile-in-quantile regressions. Finance Research Letters, 23, 87-95. google scholar
  • Bozdogan, H. (2004). Intelligent statistical data mining with information complexity and genetic algorithms. In Statistical data mining and knowledge discovery (pp. 15-56). Chapman & Hall/CRC Boca Raton, Fla, USA. google scholar
  • Carkacioglu, A. (2016). Crypto-Currency Bitcoin. Capital Markets Board of Turkiye, Research Report, 1-68. google scholar
  • Chevallier, J. (2020). COVID-19 pandemic and financial contagion. Journal of Risk and Financial Management, 13(12), 309. google scholar
  • Chung, H., & Shin, K. (2020). Genetic algorithm-optimized multi-channel convolutional neural network for stock market prediction. Neural Computing and Applications, 32, 7897-7914. google scholar
  • Coinbase Institutional. (2023). 2023 Crypto Market Outlook (Issue December 2022). google scholar
  • CoinGecko. (2023). 2023 Q1 Crypto Industry Report. https://www.coingecko.com/research/publicati-ons/2023-q1-crypto-report google scholar
  • CoinMarketCap. (2023a). https://coinmarketcap.com/ google scholar
  • CoinMarketCap. (2023b). Crypto Market Recap Q1, 2023: Growth and Opportunities. https://coinmarketcap. com/community/articles/642e95e08c9497781ca880b5/ google scholar
  • Frank, M., Drikakis, D., & Charissis, V. (2020). Machine-learning methods for computational science and en-gineering. Computation, 8(1), 15. google scholar
  • Goodell, J. W., Ben Jabeur, S., Saâdaoui, F., & Nasir, M. A. (2023). Explainable artificial intelligence modeling to forecast bitcoin prices. International Review of Financial Analysis, 88, 102702. https://doi.org/10.1016/j. irfa.2023.102702 google scholar
  • Gümüşçü, A., Tenekeci, M. E., & Bilgili, A. V. (2020). Estimation of wheat planting date using machine learning algorithms based on available climate data. Sustainable Computing: Informatics and Systems, 28. https:// doi.org/10.1016/j.suscom.2019.01.010 google scholar
  • Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735-1780. google scholar
  • Huang, Y., Gao, Y., Gan, Y., & Ye, M. (2021). A new financial data forecasting model using genetic algorithm and long short-term memory network. Neurocomputing, 425, 207-218. google scholar
  • Huang, Y. P., & Yen, M. F. (2019). A new perspective of performance comparison among machine learning algorithms for financial distress prediction. Applied Soft Computing Journal, 83, 105663. https://doi.or-g/10.1016/j.asoc.2019.105663 google scholar
  • Katoch, S., Chauhan, S. S., & Kumar, V. (2021). A review on genetic algorithm: past, present, and future. Mul-timedia Tools and Applications, 80, 8091-8126. google scholar
  • Kek, X. Y., Chin, C. S., & Li, Y. (2022). Multi-Timescale Wavelet Scattering with Genetic Algorithm Feature Selection for Acoustic Scene Classification. IEEE Access, 10, 25987-26001. https://doi.org/10.1109/AC-CESS.2022.3156569 google scholar
  • Lei, J., & Lin, Q. (2022). Analysis of gold and bitcoin price prediction based on LSTM model. Academic Journal of Computing & Information Science, 5(6), 95-100. https://doi.org/10.25236/ajcis.2022.050614 google scholar
  • Luo, C., Pan, L., Chen, B., & Xu, H. (2022). Bitcoin price forecasting: an integrated approach using hybrid LSTM-ELM models. Mathematical Problems in Engineering, 2022, 1--17. google scholar
  • Maleki, N., Zeinali, Y., & Niaki, S. T. A. (2021). A k-NN method for lung cancer prognosis with the use of a genetic algorithm for feature selection. Expert Systems with Applications, 164(July 2019), 113981. https:// doi.org/10.1016/j.eswa.2020.113981 google scholar
  • McNally, S., Roche, J., & Caton, S. (2018). Predicting the price of bitcoin using machine learning. 2018 26th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP), 339343. google scholar
  • Mehta, P., & Sasikala, E. (2020). Prediction of Bitcoin using Recurrent Neural Network. International Journal of Recent Technology and Engineering (IJRTE), 8(6), 1303-1307. https://doi.org/10.35940/ijrte.f7808.038620 google scholar
  • Mudassir, M., Bennbaia, S., Unal, D., & Hammoudeh, M. (2020). Time-series forecasting of Bitcoin prices using high-dimensional features: a machine learning approach. Neural Computing and Applications, 1-15. google scholar
  • Nakamoto, S. (2008). Bitcoin: A peer-to-peer electronic cash system. Decentralized Business Review. google scholar
  • Özkul, F. U., & Bas, E. (2020). Digital Age Technology Blockchain and Cryptocurrencies: Financial Evalua-tion Within the Framework of National Legislation and International Standards. Accounting and Auditing Review, 20(60), 57-74. google scholar
  • Paritosh, P., Kalita, B., & Sharma, D. (2019). A game theory based land layout optimization of cities using gene-tic algorithm. International Journal of Management Science and Engineering Management, 14(3), 155-168. google scholar
  • Park, S., & Yang, J.-S. (2023). Intelligent cryptocurrency trading system using integrated AdaBoost-LSTM with market turbulence knowledge. Applied Soft Computing, 110568. google scholar
  • Pesaran, M. H., & Timmermann, A. (2002). Market timing and return prediction under model instability. Journal of Empirical Finance, 9(5), 495-510. google scholar
  • R Core Team. (2022). R: A language and environment for statistical computing, R Foundation for Statistical Computing,. https://www.r-project.org/. google scholar
  • Rabipour, S., & Asadi, Z. (2023). Application of Genetic Algorithm in Predicting Mental Illness: A Case Study of Schizophrenia. In Applied Genetic Algorithm and Its Variants: Case Studies and New Developments (pp. 161-183). Springer. google scholar
  • Rajinikanth, V., & Rama, A. (2023). Evaluation of Underwater Images Using Genetic Algorithm-Monitored Preprocessing and Morphological Segmentation. In Applied Genetic Algorithm and Its Variants: Case Stu-dies and New Developments (pp. 231-245). Springer. google scholar
  • Rathore, R. K., Mishra, D., Mehra, P. S., Pal, O., HASHIM, A. S., Shapi’i, A., Ciano, T., & Shutaywi, M. (2022). Real-world model for bitcoin price prediction. Information Processing and Management, 59(4), 102968. https://doi.org/10.1016/j.ipm.2022.102968 google scholar
  • Robles, J. F., Chica, M., & Cordon, O. (2020). Evolutionary multiobjective optimization to target social network influentials in viral marketing. Expert Systems with Applications, 147, 113183. google scholar
  • Sayed, S., Nassef, M., Badr, A., & Farag, I. (2019). A Nested Genetic Algorithm for feature selection in hi-gh-dimensional cancer Microarray datasets. Expert Systems with Applications, 121, 233-243. https://doi. org/10.1016/j.eswa.2018.12.022 google scholar
  • Scrucca, L. (2013). GA: A package for genetic algorithms in R. Journal of Statistical Software, 53(4), 1-37. https://doi.org/10.18637/jss.v053.i04 google scholar
  • Seabe, P. L., Moutsinga, C. R. B., & Pindza, E. (2023). Forecasting Cryptocurrency Prices Using LSTM, GRU, and Bi-Directional LSTM: A Deep Learning Approach. Fractal and Fractional, 7(2), 1-18. https://doi. org/10.3390/fractalfract7020203 google scholar
  • Sonderegger, D. (2015). A regulatory and economic perplexity: Bitcoin needs just a bit of regulation. Washington University Journal of Law & Policy, 47, 175-216. google scholar
  • Wang, J., & Ngene, G. M. (2020). Does Bitcoin still own the dominant power? An intraday analysis. Internati-onal Review of Financial Analysis, 71, 101551. google scholar
  • Wang, X., & Wang, B. (2019). Research on prediction of environmental aerosol and PM2.5 based on artificial neural network. Neural Computing and Applications, 31(12), 8217-8227. https://doi.org/10.1007/s00521-018-3861-y google scholar
  • Wardak, A. B., & Rasheed, J. (2022). Bitcoin Cryptocurrency Price Prediction Using Long Short-Term Me-mory Recurrent Neural Network. European Journal of Science and Technology, 38, 47-53. https://doi. org/10.31590/ejosat.1079622 google scholar
  • Zhang, X., Zhang, L., Zhou, Q., & Jin, X. (2022). A Novel Bitcoin and Gold Prices Prediction Method Using an LSTM-P Neural Network Model. Computational Intelligence and Neuroscience, 2022, 1643413. https:// doi.org/10.1155/2022/1643413 google scholar


SHARE




Istanbul University Press aims to contribute to the dissemination of ever growing scientific knowledge through publication of high quality scientific journals and books in accordance with the international publishing standards and ethics. Istanbul University Press follows an open access, non-commercial, scholarly publishing.