Development of software and algorithmic security for forecasting the cryptocurrency course using fractal analysis methods

: pp. 81 - 93
Lviv Polytechnic National University, Lviv, Ukraine
Ivan Franko Lviv National University of Lviv
Ukrainian National Forestry University

The work created software and algorithmic support for modeling and forecasting the Bitcoin cryptocurrency using the ARFIMA (AutoRegressive Fractionally Integrated Moving Average) fractal model. Time series forecasting models (autoregressive, fractal) were analyzed. The selection of the most appropriate parameters of the selected fractal model was also carried out to maximize accuracy in view of the RMSE metric. The series were analyzed for trend, seasonality, white noise, non-stationarity and long-term memory. The Hurst indicators were studied and the algorithm for choosing the optimal parameter d of fractal differentiation of the ARFIMA model was adapted. The choice of software tools for implementing algorithms and forecasting models using the Python programming language version 3.6.5 using the pandas version 1.1.3 and numpy version 1.19.2 libraries is justified. In order to forecast the time series, the programming language R version 4.1.3 was used, along with the forecast version 8.16 and arfima version 1.8.0 libraries. The software implementation of the ARFIMA fractal model was carried out. Transferred the application to the Google Colab cloud service using Google Drive storage for storing data and forecasting results. The results of comparing the effectiveness of the created fractal model with the same model with automatic selection of parameters, as well as with the most appropriate autoregression model on different sizes of training and test data were obtained. It was established that a larger amount of both training and test data clearly favors fractal models, since in this case there is a long-lasting effect, that is, a pronounced long memory in the second time series. The result is a software system that can be used by investors and ordinary people to analyze and forecast their chosen cryptocurrency using a modern fractal modeling approach. It is important to always check the data and clean up anomalous deviations that cause error in the prediction estimate.


  1. Shah, V., Shroff, G. (2021). Forecasting Market Prices using DL with Data Augmentation and Meta-learning: ARIMA still wins!
  2. Liu, K., Chen, Y., Zhang, X. (2017). An Evaluation of ARFIMA (Autoregressive Fractional Integral Moving Average) Programs. Axioms, Vol. 6, 1-16.
  3. Andersson, M., (1998). On Effects of Imposing or Ignoring Long Memory When Forecasting. Working Paper Series in Economics and Finance, 225.
  4. Ndongo, M., Diongue, A, Diop, A., Hili, O. (2015). Estimation of Fractional ARIMA Process with Stable Innovations: A Monte Carlo Study. Retrieved from: 01121443/document
  5. Cryptocurrency          Historical           Prices.             (2021).           Retrieved             from:
  6. How to Detect Random Walk and White Noise in Time Series Forecasting. (2021). Medium. Retrieved from:  series-forecasting-bdb5bbd4ef81
  7. Safitri, D., Mustafid, D. (2019). Gold price modeling in Indonesia using ARFIMA method. Ispriyanti, Sugito, IOP Conf. Series: Journal of Physics: Conf. Series 1217, 7-9. DOI:10.1088/1742-  6596/1217/1/012087
  8. Mohamed, B., Khalfaoui, R. (2011). Estimation of the long memory parameter in non stationary models: A Simulation Study. Retrieved from:  00595057/document
  9. M. L. de Prado (2018). Advances in Financial Machine Learning. John Wiley & Sons, Inc., Hoboken, New Jersey, 75-91.
  10. Reisen, V., Abraham, B., Lopes, S. (2006). Estimation of Parameters in ARFIMA Processes: A Simulation Study. DOI:10.1081/SAC-100107781
  11. Kokoszka, P., Mikosch, T. (2000). The periodogram at the Fourier frequencies Stochastic Processes and their Applications. Volume 86, Issue 1, 49-79.  4149(99)00086-1
  12. Cerovecki, C., Characiejus, V., Hormann, S. (2022). The Maximum of the Periodogram of a Sequence of Functional Data.