{'fraction_non_alphanumeric': 0.02604015129473378, 'fraction_numerical': 0.01270487828532635, 'mean_word_length': 5.15137956748695, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Smoothing and stationarity enforcement framework for deep learning time-series forecasting

Time-series analysis and forecasting problems are generally considered as some of the most challenging and complicated problems in data mining. In this work, we propose a new complete framework for enhancing deep learning time-series models, which is based on a data preprocessing methodology. The proposed framework focuses on conducting a sequence of transformations on the original low-quality time-series data for generating high-quality time-series data, “suitable” for efficiently training and fitting a deep learning model. These transformations are performed in two successive stages: The first stage is based on the smoothing technique for the development of a new de-noised version of the original series in which every value contains dynamic knowledge of the all previous values. The second stage of transformations is performed on the smoothed series and it is based on differencing the series in order to be stationary and be considerably easier fitted and analyzed by a deep learning model. A number of experiments were performed utilizing time-series datasets from the cryptocurrency market, energy sector and financial stock market application domains on both regression and classification problems. The comprehensive numerical experiments and statistical analysis provide empirical evidence that the proposed framework considerably improves the forecasting performance of a deep learning model.


Introduction
Time-series forecasting problems are considered as one of the most challenging real-world prediction problems due to the large number of unpredictable factors involved, resulting in complicated temporal dependencies [1,2]. In general, time series are encountered in a variety of popular real-world applications ranging from sales transactions [3,4] and commodities [5,6] to econometrics [7,8] and finance [9,10]. Time series data is a series of discrete data points, obtained at successive predefined equally spaced points in time. Their characteristics and unique properties considerably distinguish them from other types of data. The major difference between time-series data and other types of data is that their features need to be invariant to transition of time.
Stationarity is an important property and issue in time series. However, many real-world time series are non-stationary, which implies that significant properties such as mean, frequency, variance and kurtosis change over time. As a result, these series possess high volatility, trend and are frequently characterized by heteroskedasticity. The significance of the stationarity property for the efficiency of a deep learning time-series model was theoretically and computationally highlighted in [11]. Additionally, to handle the high volatility and significant fluctuations in the time-series data, some researchers considered to ''smooth'' the series [12]. Summarizing, time-series data are characterized by high complexity, complicated temporal dependencies, high fluctuations in prices and usually by chaotic behavior which makes the process of analyzing and forecasting a rather difficult task. Thus, time-series analysis and forecasting constitutes an active research area, focusing on the prediction of future values and directional movements.
During the last decades, a variety of forecasting models were proposed which were based on traditional time-series forecasting methods such as autoregressive moving average (ARMA) and autoregressive integrated moving average (ARIMA) models and their variations [13,14] or on the more sophisticated machine learning methods [15][16][17]. However, the former are usually not able to deal with complex time-series patterns, while the latter cannot usually depict their high volatility and chaotic nature. Therefore, the need for the development of new more elaborated approaches and methodologies was considered essential for successfully addressing time-series forecasting problems.
Recently, the significant improvements in computational capabilities and storage, assisted researchers to deal and handle large and enormous amounts of information. Furthermore, the development of sophisticated and powerful data mining algorithms such as deep learning algorithms, supported the process of identifying and analyzing complex data. These recent advances of artificial intelligence and deep learning renew the interest of scientific and industrial community for the development of expert systems based on strong prediction models as well as the development of efficient preprocessing techniques to develop high-quality data from the original low-quality data. Although deep learning models possess the ability of being able to fit highly nonlinear models, they were proved to produce inefficient forecasts and significant autocorrelation in the errors [6,18]. Recently, Livieris et al. [11] proposed a novel methodology which ensures the ''suitability'' of a time series for fitting a deep learning model by performing a series transformations in order to satisfy the stationarity property while simultaneously can be applied for regression and classification time-series tasks in a unified manner.
In this work, we propose a new preprocessing framework for enhancing the performance of deep learning timeseries models, which constitutes the main contribution of this research. The proposed framework aims on transforming the original low-quality time-series data to highquality time-series data, which are ''suitable'' for efficiently fitting a deep learning forecasting model. The framework consists of two transformation processes applied on the original time series. The first transformation is used for the development of a new unique series, based on the smoothing technique in which every price contains dynamic knowledge of the all previous prices of the original value. It is worth noticing that the new smoothed series constitutes a de-noised version of the original series; thus, it is easier for fitting a deep learning model and be analyzed. To the best of our knowledge, such transformation has not been applied in the literature. The second transformation is performed on the smoothed series and it is based on differencing the series in order to enforce stationarity and stabilize its mean and variance. The stationarity property is ensured and imposed by the application of Augmented Dickey-Fuller test [2]. We conducted a number of numerical experiments utilizing data from the popular real-world application domains of cryptocurrency market, energy sector and financial stock market on both regression (price prediction) and classification (directional movement prediction) problems. The presented comprehensive analysis illustrated that the proposed framework considerably improved the forecasting performance of a deep learning model, especially in terms of classification accuracy.
The remainder of this paper is organized as follows: Section 2 presents a brief review of deep learning models for time-series forecasting. Section 3 presents the proposed framework focusing on highlighting its theoretical advantages and benefits. Section 4 presents data preparation and reports the descriptive statistics describing the basic features of each dataset. Section 5 presents the detailed experimental analysis, focusing on the evaluation of the proposed framework. Section 6 summarizes the findings of this research and discusses the numerical experiments. Finally, Sect. 7 presents our conclusions and some interesting future directions.

Literature review
Time-series analysis and forecasting constitutes a famous complicated problem in data mining and a challenging research area which goes from traditional historical series prediction to social media analysis. Its complexity is caused by the time-series' volatility, significant fluctuations and internal structure which is highly influenced by a number of factors. Even though some variations exist, the major focus of scientific and industrial communities is the prediction of price and directional movement of the underlying asset. In spite of the diversity of time-series application, in this research we focus on three application domains which incorporate most of global research interest, that is cryptocurrency area, energy sector and financial stock market.
Chowdhury et al. [19] attempted to apply advanced machine learning methodologies on the index and constituents of cryptocurrency, aiming at forecasting future prices. More specifically, they focused on the prediction of the closing price of the CCI30 index as well as nine major cryptocurrencies for assisting cryptocurrency investors in trading. In their research, they utilized a variety of machine learning algorithms including gradient boosted trees, ANNs, k-nearest neighbor and ensemble learning methods, and their utilized data contained daily closing prices from January 2017 to January 2019. gradient boosted trees and ensemble models reported the best performance, which was competitive and sometimes better, compared to that of similar state of the art models proposed in the literature.
Cen and Wang [20] proposed a new neural network architecture, called CID-STNN, for forecasting energy market. The proposed model is based on a stochastic time strength neural network which is equipped with a novel learning rate, controlled by the complexity invariant distance (CID) The data used in their study regard West Texas Intermediate oil daily prices from January 31, 2005 to December 5, 2016 and Brent oil daily prices from March 02, 2007 to December 16, 2016. Additionally, the time series were decomposed into different fluctuation frequency levels using the ensemble empirical mode decomposition, in order to fit the training models. The performed empirical research was conducted by evaluating the predicting ability of the CID-STNN model against that of other state-of-the art models, which revealed the superiority of proposed model.
Xi et al. [21] proposed a novel approach for forecasting crude oil price based on online media text mining. Their primary aim was to capture the more immediate market antecedents of price fluctuations and improve portfolio management. A CNN-based neural network model was utilized for extracting significant relationships of the price change fluctuations, which were then processed by the latent Dirichlet allocation topic model for distinguishing effects from various news topics. Furthermore, the input variable combination was optimized using feature selection methods and lag-order selection. Their utilized data contained headlines from the ''Crude oil news'' section of the portal https://www.investing.com/ as well as historical crude oil and financial market prices over the period from September 15, 2009 to July 20, 2014. Their numerical experiments demonstrated that the proposed topic-sentiment forecasting model outperformed traditional benchmark models and that the combination of text and financial features could improve the forecasting accuracy.
Fabbri and Moro [22] focused on detecting long-term dependencies in Dow Jones Industrial Average prices (DJIA) by utilizing deep recurrent neural networks (RNNs). More specifically, they presented a complete economical profit framework based on the predictions of a long short-term memory (LSTM) network. The data used in their study contained daily prices covering a period of DJIA historical prices between January 01, 2000 and December 31, 2017, concerning open price, high price, low price and adjusted close price for every working day. Their experimental results showed that the proposed framework outperformed feed-forward neural networks, obtaining a profit of more than 5 times the initial capital. Additionally, based on their experimental analysis, they stated that their proposed framework could be extended for the investigation of possible correlations among various market indexes.
Site et al. [23] evaluated the performance of a number of deep learning and machine learning models for forecasting the fluctuations in stock market. In more detail, they evaluated the prediction performance of LSTM networks, gated recurrent unit-based networks, recurrent neural networks, support vector regression, linear regression and ridge regression. The authors used data from a long consecutive period of 10 years (January 03, 2006 to December 29, 2017) containing weekly and monthly prices from two different indexes, namely Dow Jones Industrial Average and Standard & Poor's 500. Their experimental results showed that LSTM networks exhibited satisfactory performance on both different stock exchange data, outperforming the rest prediction models.
One common weakness of all presented and discussed approaches as well as most proposed in the literature is that they focused on obtaining better performance by exploiting more sophisticated models and deep learning techniques, usually ignoring the development of a sophisticated data preprocessing procedure. It is also worth mentioning that the powerful deep learning models were proved to provide unreliable predictions, especially when dealing with time series which follow an almost random walk process [18]. In this research, we propose a different approach and present a new complete framework for the development of accurate and reliable forecasting models. The novelty of the proposed framework is that the deep learning prediction model is fitted with a transformed series which is smoother than the original series resulting in a easier and faster training. Additionally, the new series is ensured to be stationary which guarantees the development of an accurate forecasting model which exhibits reliable forecasts, in terms of presenting no-autocorrelation in the errors.

Smoothing and stationarity framework for time-series data
Suppose that y 0 ; y 1 ; . . .; y n be the values of a time series. A nonlinear regression model of order m is defined by where x t ¼ ðy tÀ1 ; y tÀ2 ; . . .; y tÀm Þ 2 R m consists of m values of y t and h is the parameter vector. After the model structure has been defined, function f ðÁÞ can be determined by a machine learning or a deep learning algorithm.
In the sequel, we present the proposed preprocessing process and techniques for time-series forecasting, used in this research. Our methodology focuses on the transformation of the original low-quality time-series data to highquality time-series data which are suitable for efficiently fitting and training a deep learning model. Notice that each step of our framework is successful and applies on the previous one to incrementally improve the forecasting performance.

Smoothing a time series
We define a new time series fs t g, which consists of a ''smooth'' version of fy t g, by where a 2 ð0; 1Þ is the smoothing factor or smoothing coefficient and the term ð1 À aÞ is called dumping factor. It is worth mentioning, that the smoothed value s t consists of the weighted average of past observations while the weights decaying exponentially as the observations get older [24,25]. In other words, higher weights are associated with the most recent observations. More specifically, by applying direct substitution of (2) back into itself, we obtain s t ¼ay t þ ð1 À aÞs tÀ1 ¼ay t þ að1 À aÞy tÀ1 þ ð1 À aÞ 2 s tÀ2 ¼ay t þ að1 À aÞy tÀ1 þ að1 À aÞ 2 y tÀ2 þ ð1 À aÞ 3 s tÀ3 . . . ¼ay t þ að1 À aÞy tÀ1 þ . . . þ að1 À aÞ t y 1 þ ð1 À aÞ tþ1 y 0 ; which implies that as time passes the calculated smoothed value s t consists of the weighted average of a number of past values and these assigned weights are in general proportional to the term of the following geometric progression a; að1 À aÞ; að1 À aÞ 2 ; . . .; Notice that the value of parameter a controls the trade-off between the influence of each point y t and the average of the most recent past observations s t . In more detail, a large value of parameter a denotes that s t pays more attention to the most recent observation while a small value denotes that the observation y t has less influence to the smoothed value s t . Moreover, s t approximately averages over a number of 1=a past observations. For example, in case a ¼ 0:1; 0:2 or 0.5 implies that s t approximately averages 2, 5 or 10 observations, respectively. original series; thus, it is easier for fitting a deep learning model. Notice that after a deep learning model is trained with the smoothed series' any predictionŝ t can be utilized for calculating the prediction for the levels of the original time seriesŷ t by simply applying the inverse transformation, defined bŷ

Stationarity and model reliability
Although deep learning models constitute an efficient and widely utilized choice for forecasting time-series prices, they were proved to develop unreliable forecasts [11,18]. The reason for this inefficiency is based on some undesired properties of time series such as noise, high volatility but mainly to the lack of stationarity of the time series. To address this problem, Livieris et al. [11] introduced a novel framework, which takes into account the nature of the time series and iteratively applies a series transformations and guarantees that the new transformed series is stationary and it is ''suitable'' for fitting a deep learning model. More specifically, the applied transformations are based on the first differences or the returns of the series. It is worth mentioning that the application of transformations (3) and (4) secures the efficiency and effectiveness of the model since its able to better capture possible nonlinearities, explain the data much better and successfully remove the autocorrelation in the errors [11]. In our proposed framework, we utilized the first differences transformation instead of the transformations based on the returns, which reported slightly better overall performance.

Proposed framework
In the sequel, we present our proposed framework which consists of two phases: Smoothing, and Differencing-Training.
In the ''Smoothing phase,'' the data are imported and the smoothing technique is applied (Steps 1-3). In the ''Training phase,'' the levels of the smoothed series are examined if they possess a unit root or if the series is stationary (Step 4). This is performed by the application of the Augmented Dickey-Fuller (ADF) test [2,25]. In case, the smoothed series possess a unit root, the first differences transformation is iteratively applied, until the new developed transformed series is stationary (Steps 6-9). Subsequently, the new transformed time series is used for fitting and training the prediction model (Step 10). Notice that since the series is differenced, the errors of the forecasting Table 1 Smoothing and stationarity framework to enhance deep learning in time-series forecasting /* Phase I: Smoothing */ Step 1. Import time-series training data.
Step 2. Select value of smoothing parameter a.
Step 5. If (Time series possess a unit root) then /* Time series is not I(0) */ Step 6. repeat Apply the transformation based on first differences. Step 8.
Apply the ADF unit root test.
until (Time series is stationary) Train the deep learning model DL using the transformed time series.
Train the deep learning model DL using the smoothed time series.
Calculate the model's predictions on the smoothed training data. Step 14. Calculate the residuals between the smoothed training data and the model's predictions.
Apply the transformation based on first differences. Step 17.
Re-train the deep learning model DL using the transformed time series.
end if Step 19. end if model exhibit no autocorrelation [25]. In contrast, in case the series does not possess a unit root, then the levels of the smoothed series are used for training the model (Step 12). Then, the residuals are examined for exhibiting autocorrelation (Step 13). In case autocorrelation exists, the firstdifferences transformation is applied on the series and the model is re-trained utilizing the transformed series (Steps [15][16][17][18]. Notice that if the levels of the smoothed series do not possess a unit root and the model's error exhibit noautocorrelation there is no need to transform the series and update the training model, since over-differencing the time series could lead to a ''non-invertible'' process [11]. It is worth mentioning that the additional computational cost of the proposed framework is negligible (Table 1).
Finally, after the deep learning model is trained with the new smoothed transformed series, the inverse transformations are applied for calculating the prediction for the levels of the original time seriesŷ t .

Data
The datasets used in this research concern daily historical data from three widely utilized real-world application domains: cryptocurrency, commodity and finance.
From cryptocurrency domain, we utilized data from January 1, 2017 to March 31, 2020 of Crypto-Cryptocurrency Index (CCI30) which contains the top 30 cryptocurrencies weighted by market capitalization. The data were obtained from https://cci30.com/ website and were divided into training set consisting of daily values from January 1, 2017 to December 31, 2019 (1095 points) and a testing set consisting of daily prices from January 1, 2020 to March 31, 2020 (103 points). From commodity domain, we utilized data from January 1, 2016 to March 31, 2020 of Brent prices in USD from https://www.eia.gov/ website. The data were divided into training set consisting of daily Brent prices from January 1, 2016 to December 31, 2019 (1702 points) and a testing set consisting of daily prices from January 1, 2020 to March 31, 2020 (150 points). From finance domain, we utilized data from January 1, 2016 to March 31, 2020 of Dow Jones Industrial Average (DJIA) prices in USD from http://finance.yahoo.com website. The data were divided into training set consisting of daily prices from January 1, 2016 to December 31, 2019 (1702 points) and a testing set consisting of daily prices from January 1, 2020 to March 31, 2020 (150 points). It is worth noticing that all utilized datasets contained values that include the recent COVID-19 crisis in the beginning of 2020, which are characterized by considerable volatility and deviations from the regular behavior as well as structural breaks. Table 2 reports the descriptive statistics for presenting the nature of the distribution, regarding the training set and the testing set of DJIA, Brent and CCI30 datasets, including the measures: minimum, maximum, mean, standard deviation (Std. dev.), median, skewness and kurtosis. Additionally, Table 3 summarizes the up and down movements in the prices as well as the corresponding percentages for all datasets.
Finally, it is worth mentioning that all time-series data contained no missing values, while the outlier prices were not removed in order not to destroy the dynamics of each series, even if these prices are the result of exceptional events.

Experimental methodology
In this section, we present a detailed experimental analysis, regarding the efficiency of our proposed framework which consists of three distinct phases: In the first phase, we apply our proposed framework to the CCI30, Brent and DJIA time series; in the second phase, we compare the performance of an efficient deep learning model trained with the traditional series and with the proposed smoothed series. Notice that our interest in the experimental analysis is mainly focused on the identification of the best value of parameter a; hence, we tested values of a ranging from 0 to

Application of the proposed framework
In the sequel, we apply our proposed forecasting framework to CCI30, Brent and DJIA time-series data. Firstly, we examine the acceptance of the null hypothesis H 0 : ''the series possess a unit root and are non-stationary,'' using the ADF unit root test. Table 4 reports the t-statistics and the associated p values of the ADF unit root test, performed on the level (Levels) of the CCI30, Brent and DJIA series as well as on the corresponding smoothed (Smoothed) series for every value of parameter a. Notice that each smoothed series for a ¼ 1 is identical with the original series. The interpretation of Table 4 reveals that the null hypothesis H 0 is accepted which implies that all series under consideration are non-stationary.
Next, according to our proposed framework, we difference all series under consideration and perform the ADF test to the transformed time series to examine if the unit root has been removed. Table 5 presents the results of the ADF unit root test for the training data of all transformed time series. Notice that ( Ã ) denotes statistical significance at the 5% critical level. As expected, all p values are practically zero which implies that the null hypothesis H 0 is rejected and all transformed series are indeed stationary. It is worth mentioning that the process of differencing the series solved the unit root problem and the series are ''suitable'' for fitting a deep learning model.

Numerical experiments
In this section, we evaluate the regression and classification performance of our proposed framework for forecasting time series. More specifically, we compare the performance of an efficient deep learning forecasting model trained with the first-differenced series and the Smoothed FD series for every selected value of parameter a. The deep learning model utilized in our study was CNN-LSTM which consists of two convolutional layers of 16 and 32 filters of size (2; ) with the same padding, followed by a max pooling layer of size 2, a LSTM layer of 50 units and an output layer of one neuron. This model was selected under exhaustive experimentation (using different numbers and combinations of convolutional, LSTM and dense layers as well as different number of filters, units and neurons in these layers, respectively) and reported the best overall results for all series. The selected training algorithm was adaptive moment estimation [26] with a batch size equal to 64, utilizing mean-squared loss function. Furthermore, the CNN-LSTM model was trained with the first-differenced Regarding the utilized performance metrics in our research: mean absolute error (MAE), root mean square error (RMSE) and R-squared (R 2 ) were selected for evaluating the regression accuracy of the proposed model using all series under consideration. These metrics are respectively defined by where N is the number of forecasts, y t is the actual value, y is the mean of the actual values andŷ t is the predicted value. Additionally, accuracy (Acc), geometric mean (GM), sensitivity (Sen) and specificity (Spe), where utilized for evaluating the performance for the binary classification problem of directional movement (price increasement or decreasement on the following day with respect to the today's price). There metrics are defined by where TP stands for the number of values which were correctly identified to be increased, TN stands for the number of values which were correctly identified to be decreased, FP (type I error) stands for the number of values which were misidentified to be increased and FN (type II error) stands for the number of values which misidentified to be decreased. Furthermore, we included the performance metric area under curve (AUC) in our experimental analysis which is presented using the receiver operating characteristic (ROC) curve. Notice that ROC curve is created by plotting the true positive rate (sensitivity) against the false positive rate (specificity) at various threshold settings.
Finally, the reliability of the CNN-LSTM forecasting model was evaluated by examining the existence of autocorrelation in the errors, utilizing the autocorrelation function (ACF) plot and the Ljung-Box Q-test [2]. It is worth noticing that the reliability evaluation was originally proposed in [11,18] to advocate the efficiency of its forecasts. Nevertheless, since the model exhibited no autocorrelation in the residuals, using any series as training data, we omitted the presentation of ACF plots and Ljung-Box Q-test.

CCI30 time series
Tables 6 and 7 present the performance comparison for CCI30 forecasting problem for m ¼ 6 and m ¼ 12, respectively. Regarding the regression performance for m ¼ 6, the CNN-LSTM model reported the best RMSE score in case trained with Smoothed FD series with a ¼ 0:5 and a ¼ 0:6. For m ¼ 12, the forecasting model trained with the Smoothed FD series reported slightly better RMSE score compared to that trained with first-differenced series for almost all values of parameter a. Moreover, it reported slightly better MAE score for a ¼ 0:5; 0:6; 0:7 and 0.9 in     Table 9 presents that the classification performance of CNN-LSTM model exhibited the best performance in case trained with Smoothed FD with a ¼ 0:7 in terms of accuracy and AUC. Additionally, the best trade-off between specificity and sensitivity was reported in case the forecasting model was trained with Smoothed FD series with a ¼ 0:7 as well as the best GM score. Conclusively, we point out that with the utilization of Smoothed FD series (a ¼ 0:7) as training data, the forecasting model reported the best overall classification performance and developed more reliable forecasts.

Dow Jones industrial average time series
Tables 10 and 11 present the performance evaluation for DJIA forecasting problem for m ¼ 6 and m ¼ 12, respectively. Regarding the regression performance for m ¼ 6, the CNN-LSTM model improved its MAE, RMSE and R 2 scores in case trained with Smoothed FD series instead of first-differenced series, for all values of parameter a. Additionally, for m ¼ 12, the forecasting model trained with Smoothed FD series with a ¼ 0:5 À 0:8 reported slightly better MAE, RMSE and R 2 scores compared to that trained with first-differenced series. It is worth noticing that the CNN-LSTM model reported the best overall regression performance, trained with Smoothed FD series with a ¼ 0:5; 0:6 and 0.7; however, its performance was slightly better compared to that in case trained with the traditional first-differenced series.
As regards the classification performance, the forecasting model exhibited higher accuracy, AUC and GM scores, in case trained with Smoothed FD series compared to that trained with the traditional first-differenced series. More specifically, CNN-LSTM model exhibited the best classification performance in case trained with Smoothed FD with a ¼ 0:1 À 0:5, in terms of accuracy and AUC. Moreover, the model reported higher GM score in case trained with Smoothed FD with a ¼ 0:4 À 0:7 compared to that trained with the first-differenced series. Finally, it is worth noticing that the forecasting model reported the best trade of between sensitivity and specificity as well as the best GM in case a ¼ 0:5; 0:6 and 0.7. This implies that the proposed preprocessing framework considerably improved the classification performance of the CNN-model for a ¼ 0:5; 0:6 and 0.7 since it was less biased and performed more reliable forecasts, for both values of m.

Statistical analysis
Next, we attempt to provide statistical evidences about the efficiency of our proposed preprocessing framework. More specifically, for rejecting the hypothesis H 0 that the forecasting model CNN-LSTM performed equally well for a given level using the first-differenced series or the Smoothed FD series as training data, we used the nonparametric Friedman Aligned Ranking (FAR) [27] test. Furthermore, for examining if the differences in the performance of the utilized prediction model are statistically significant, we applied the post hoc Finner test [28] with significance level a ¼ 5%. Therefore, we perform a nonparametric multiple comparison, regarding the regression and classification performance of CNN-LSTM trained with the first-differenced series and the Smoothed FD series. Notice that three versions of the Smoothed FD series where selected i.e. a ¼ 0:5; 0:6 and 0.7, which reported the best overall regression and classification performance. Tables 12, 13, 14, 15, 16 and 17 report the statistical analysis, performed by nonparametric multiple comparison, relative to MAE, RMSE, R 2 , accuracy, AUC and GM performance metrics. Additionally, to measure the difference in the performance regarding the balance of sensitivity and specificity for each series, we used a new metric defined by the product of sensitivity and specificity, i.e. SenÂSpe. CNN-LSTM performed equally well using any time series as training data regarding MAE metric; while the performance of the forecasting model was improved as

Discussion
In this section, we conduct a comprehensive discussion regarding the theoretical and experimental contribution of this research.

Discussion of the proposed methodology
Most real-world time-series data are considered as chaotic and noisy by nature and are often characterized by high volatility, high fluctuations in prices and large variations in the variance. This implies that the process of developing an accurate and reliable deep learning forecasting model is a challenging problem. Generally, deep learning networks constitute powerful time-series prediction models in terms of prediction accuracy, but are usually unstable and sometimes unreliable in sense that even small variations in their training data as well as noisy features could considerably affect their performance.
In this research, we proposed a complete theoretical framework regarding the problem of time-series  It is worth mentioning that our proposed framework performs an efficient preprocessing process, through a series of transformations based on the smoothing and the differencing techniques, for exploiting the internal representation of any times-series data. Therefore, it possesses the attractive property that it can be easily applied to a wide area of real-world time-series forecasting problems without the imposition of any additional modifications and extra constraints.

Discussion of the experimental results
In this work, we conducted a series of experiments using three time series from the application domains of cryptocurrency market, energy sector and financial stock market. To evaluate the efficiency and robustness of the proposed framework, we selected a state-of-the-art deep learning model, called CNN-LSTM. The performance of the utilized deep learning model trained with the differenced series and with the smoothed differenced series was evaluated on both forecasting time-series price (regression) and directional movement (classification) problems.
The presented numerical experiments demonstrated that the proposed framework can considerably improve and enhance the overall performance of the deep learning model. More specifically, the regression performance of CNN-LSTM trained with the smoothed differenced series was improved but not significantly, presenting lower MAE and RMSE scores and higher R 2 score. In contrast, its classification performance was considerably improved, which resulted that the smoothing technique property handled the noisy original data. Additionally, the performance metrics GM, Sen and Spe revealed that our framework developed deep learning models which were less biased on average than the ones trained with the first differenced series. These findings were confirmed statistically by the Friedman Aligned Ranks nonparametric test and the Finner post hoc test.
Nevertheless, the limitation of this work is that it is still not clear which is the optimal value of parameter a. In our preliminary experimental results, we observed that a value within the interval [0.5, 0.7] reported the best overall performance. However, we cannot draw safe conclusions and more experiments are needed, since this is not a general case. Therefore, its determination is considered a rather difficult task. At this point, it is worth mentioning that due to the sensitivity of various hyper-parameters as well as the high complexity of the deep learning models, it is possible that their prediction ability could be further improved by performing additional optimized configuration (see [29][30][31] and the references therein).
However, although we provide thorough experimental results revealing that the proposed methodology can enhance the performance of a deep learning model, there is no clear indication why trend prediction efforts, might not necessarily translate into profits. In other words, even though the presented experimental results are promising, we have no evidence that the proposed framework can actually develop a prediction model to assist cryptocurrency investors for making proper investment decisions based on our model predictions in order to achieve profitable investment returns. This is mainly based on the fact that time series from application domains such as cryptocurrency area, energy sector and financial market are highly affected by time evolution and external changes; therefore, an efficient prediction model may be temporally accurate but not in ''depth of time'' [11].
However, this research is dedicated to present a complete framework which enhances the forecasting performance and reliability of a deep learning model and less on the design and implementation of profitable trading system. It is worth noticing that the development of such software system would require the control of a number of aspects in addition to the implementation of a decision support system. Therefore, a possible improvement of our prediction framework could be the incorporation of trading simulations in order to identify potential profitable investment returns. This is to be certainly investigated in our future research.
Finally, it is worth mentioning that in certain times of global instability, outliers are frequently presented, especially in time series from the domains of cryptocurrency, commodity and finance. In this research, the outlier prices in all used series data were not removed in order not to destroy the dynamics of each series, even if these prices are the result of exceptional events. Our proposed framework develops a smoothed series which constitutes a denoised version of the original series in which every value contains dynamic knowledge of all previous values. One issue which we should thoroughly investigate in the future is the possibility of enhancing our framework by the adoption of robust filtering techniques [32][33][34][35] in order to ''deal'' with outliers or other rare signals which could indicate forecasting instability.

Conclusions and future research
In this work, we proposed a new complete and novel framework which is based on a preprocessing process for enhancing deep learning time-series models. The novelty of the proposed framework focuses on getting high-quality time-series data, suitable for efficiently training and fitting a deep learning model, utilizing a transformation of the original low-quality time-series data. The transformation based on the smoothing technique which develops a new de-noised version of the original series in which every price contains dynamic knowledge of the all previous values. Moreover, the new series is differenced in order to be stationary and therefore suitable for training a deep learning model. A series of numerical experiments were conducted using three time-series datasets from the cryptocurrency market, energy sector and financial stock market application domains on both regression and classification problems. The detailed and comprehensive analysis demonstrated that the proposed framework considerably improved the forecasting performance of a deep learning model, especially in terms of classification accuracy.
Therefore, it can be utilized as a reference for developing efficient and reliable deep learning forecasting models Finally, a considerable advantage of the proposed methodology is that it can be easily utilized to cover a wider scientific area of time-series applications without any special requirements as well as adopted with any timeseries forecasting model [36][37][38][39]. In our future work, we intend to evaluate how the proposed framework can enhance the performance of several forecasting models.
Nevertheless, one issue which we should thoroughly investigate in our future research is to evaluate other smoothing techniques based on moving average and double exponential smoothing. Another interesting direction for future research for the development of robust time-series models could be the incorporation of ensemble methodologies for combining deep learning models trained with different smoothed series relative to the value of parameter a together with base learners based on sophisticated architectures [40].
These could further improve both the regression and classification performance and develop more accurate and reliable forecasts. Furthermore, since our experiments are quite encouraging, a promising idea to enhance our propose framework with elegant and advanced techniques for detecting communities of connectivity in a time series [41].

Declarations
Conflict of interest The author declared no potential conflicts of interest with respect to the research, authorship and/or publication of this article.