key: cord-0044787-yfb7igpb authors: Maciel, Leandro; Ballini, Rosangela; Gomide, Fernando title: A Fuzzy Model for Interval-Valued Time Series Modeling and Application in Exchange Rate Forecasting date: 2020-05-16 journal: Information Processing and Management of Uncertainty in Knowledge-Based Systems DOI: 10.1007/978-3-030-50153-2_4 sha: 4bc77a5504262d2f8461781edd4a8f96ced83535 doc_id: 44787 cord_uid: yfb7igpb Financial interval time series (ITS) is a time series whose value at each time step is an interval composed by the low and the high price of an asset. The low-high price range is related to the concept of volatility because it inherits intraday price variability. Accurate forecasting of price ranges is essential for derivative pricing, trading strategies, risk management, and portfolio allocation. This paper suggests a fuzzy rule-based approach to model and to forecast interval-valued time series. The model is a collection of functional fuzzy rules with affine consequents capable to express the nonlinear relationships encountered in interval-valued data. An application concerning one-step-ahead forecast of interval-valued EUR/USD exchange rate using actual data is also addressed. The forecast performance of the fuzzy rule-based model is compared to that of traditional econometric time series methods and alternative interval models employing statistical criteria for both, low and high exchange rate prices. The results show that fuzzy rule-based modeling approach developed in this paper outperforms the random walk, and other competitive approaches in out-of-sample interval-valued exchange rate forecasting. These rates also have a significant impact on production decision of firms, portfolio allocation, risk management and derivatives pricing [12, 25] . Since the seminal study of Meese and Rogoff [16] , the forecasting performance of exchange rate models has turned out to be frequently inferior to the naïve random walk benchmarking. This phenomenon constitutes the "exchange rate disconnect puzzle", which states that exchange rates are largely disconnected from economic fundamentals [1] . Despite the Meese and Rogoff puzzle, the problem of predicting the movement of exchange rates still attracts increasing attention from academy and practitioners [17] . The works of [4, 5, 19] and [21] give encouraging results for certain statistical forecasting methods regarding the predictability of exchange rates. Their models are shown to outperform random walk in some cases. Additionally, the literature also reports the high performance achieved by computational intelligence techniques for exchange rate forecasting, e.g., using neural networks [12, 22] , genetic algorithms [13, 23] , genetic programming [25] , fuzzy sets [7] , and hybrid methods [9, 28] . Despite the recent advances and increasing performance of computational intelligence techniques, the majority of research efforts are devoted to standard forecasting modeling approaches, i.e., the temporal evolution of exchange rates is observed as a single-valued financial time series. For instance, if only the opening (or closing) exchange rate is measured daily, the resulting time series will hide the intraday variability and loose important information [8] . An alternative to alleviate this limitation is when both, the highest and the lowest values of prices are measured at each time step, which results in interval time series (ITS). In particular, considering the high and low values of asset prices, financial ITS modeling and forecasting have received considerable attention in the recent literature with the introduction of several interval-valued time series forecasting methods [11, 14, 26] . This paper introduces an interval fuzzy rule-based model (iFRB) for exchange rate ITS forecasting. The iFRB is a collection of functional fuzzy rules in which the base variables are intervals instead of real numbers. The construction of the iFRB concerns the identification of the rule antecedents, and parameter estimation of the corresponding affine consequents. Rules antecedents are identified using a fuzzy clustering approach for symbolic interval-valued data using the adaptive City-Block distance recently proposed by [6] . The advantage of the adaptive City Block clustering is its ability to accommodate outliers, an essential feature in financial time series forecasting. This is because financial time series values are affected by news and shocks, which reflect in the data as outliers. The parameters of the affine consequents are estimated using a least squares algorithm designed for interval-valued data. Empirical evaluation of iFRB concerns one-step ahead forecasting the interval-valued Euro/Dollar (EUR/USD) exchange rate for the period from January 2005 to December 2016. The ITS is constructed using actual financial data to extract the daily high and low exchange rate values to assemble the exchange rate intervals. The performance of iFRB is compared with the random walk, ARIMA and VECM, with the linear and nonlinear interval Holt's exponential smoothing (Holt I ) [15] , and with an interval multilayer perceptron neural network (iMLP) [20] . Forecast performance is evaluated using root mean squared error, mean absolute percentage error, and direction accuracy measures, considering statistical tests. After this introduction, this paper proceeds as follows. Section 2 details the structure and identification of the interval fuzzy rule-based models (iFRB). Forecasting of the EUR/USD exchange rate is addressed in Sect. 3. Finally, Sect. 4 concludes the paper and lists topics for future research. An interval-valued variable X is a closed and bounded set of real numbers indexed by t ∈ Ω, that is: is the set of closed intervals of the real line . In finance data X L t and X H t are the daily low and high exchange rate prices for X at time t, respectively. An interval-valued time series (ITS) is a sequence of interval-valued variables observed in successive time steps t (t = 1, 2, . . . , n) expressed as a two dimensional vector X t = [X L t , X H t ] T ∈ , where n denotes the sample size, the number of intervals in the time series. Processing of interval-valued variables requires interval arithmetic. Interval arithmetic extends traditional arithmetic to operate on intervals. This paper uses the arithmetic operations introduced by [18]. The interval-valued fuzzy rule-based model (iFRB) with affine interval consequents consists of a set of fuzzy functional rules of the following form: where R i is the i-th fuzzy rule, i = 1, 2, . . . , c, c is the number of fuzzy rules. . . , p is the input, μ i is the fuzzy set of the antecedent of the i-th fuzzy rule whose membership function is ∈ is the output of the i-th rule, with: {β L i0 , . . . , β L ip } and {β H i0 , . . . , β H ip }, j = 1, . . . , p, are real-valued parameters of the consequent of the i-th rule associated with the output intervals. The model output is computed as follows: . (4) The expression (4) can be rewritten, using normalized degrees of activation, as: where is the normalized firing level of the i-th rule. iFRB modeling requires: i) learning the antecedent part of the model using e.g. an interval fuzzy clustering algorithm, and ii) estimation of the parameters of the affine consequents. Notice that all computations of the iFRB clustering and parameter estimation tasks must consider interval-valued data. iFRB antecedent identification uses the adaptive fuzzy clustering algorithm for interval-valued data with City-Block distances [6] . The City-Block distance is more robust to the presence of outliers in the data set than the Euclidean distance. Further, the advantage of using adaptive City Block distance is that the clustering algorithm finds clusters of different shapes and sizes that represents the structures found in data sets better than alternative distances [6] . Let N = {1, . . . , n} be a set of n patterns (each pattern is indexed by t) describing p symbolic interval variables X 1 , . . . , X p (each variable is indexed by j). Each pattern t is a vector of intervals X = [X 1 , . . . , . . , p. The interval fuzzy clustering algorithm aims at finding a fuzzy partition of a set of patterns in c clusters and a corresponding set of prototypes {V i , . . . , V c } that minimize a W criterion that measures how well the clusters and their representatives (prototypes) fits the data set. In this paper W is defined as where φ(·) is an adaptive City-Block distance that access the dissimilarity between a pair of vectors of intervals. It is defined for each class and is param- is a prototype vector of intervals of cluster i, μ it is the membership degree of pattern t in cluster i, and m is a fuzzification parameter (usually m = 2). The optimal fuzzy partition is obtained via Picard iterations to find the (local) minimum of W in (6) . The algorithm starts with an initial partition and alternates between a representation step and an allocation step until convergence (W reaches a stationary value, often a local minimum) [6] . The representation step sets the best prototypes and the best distances in two stages. The first stage fixes the membership degrees μ it of each pattern t in cluster i and the vector of weights θ θ θ . . , c and j = 1, . . . , p that minimize the clustering criterion W are found solving: Solution of (7), in turn, results in two minimization problems: find V L ij ∈ and V H ij ∈ that minimizes, respectively: Each of these these two problems are equivalent to the minimization of: where . Since there is no closed solution for this problem, an heuristic solution can be derived using the following algorithm [6]: 1. Rank (y t , z t ) such that Finally, the allocation step defines the best fuzzy partition fixing the prototypes V i and the vector of weights θ θ θ i . Next, the membership degrees μ it that minimize W under μ it ≥ 0 and c t=1 μ it = 1 are found as follows: After fixing the number of clusters c (2 ≤ c < n), an iteration limit k max , and an error tolerance value , the algorithm iterates between the representation and allocation steps. The process produces the vector of clusters prototypes V i = [V i1 , . . . , V ip ] and the respective membership degrees μ it of each pattern t in each cluster i, for t = 1, . . . , n and i = 1, . . . , c, that locally minimize W . Derivations of expressions (7)-(11) are found in [2] and [6] . In this paper, iFRB consequent parameter identification uses the min-max approach suggested by [3] , which is based on the minimization of the errors from two independent linear regression models on the lower and upper bounds of the intervals. Consider a set of t = 1, . . . , n samples of p + 1 symbolic interval-valued variables Y t , X 1t , . . . , X pt . Each fuzzy rule i, i = 1, . . . , c corresponds to a linear regression relationship. To keep notation clearer, henceforth we omit the index i related to each cluster or fuzzy rule. The output of iFRB for each fuzzy rule can be rewritten as where L and H are the corresponding residuals for lower and upper interval bounds equations, respectively. The sum of the squares of the deviations in the min-max method is [3] : which is the sum of the lower bound square error plus the sum of the upper bound square error. The least squares estimates of {β L 0 , β L 1 , . . . , β L p } and {β H 0 , β H 1 , . . . , β H p } that minimize the expression (13), written in matrix notation, iŝ where A is a 2(p + 1) × 2(p + 1) matrix and b is a 2(p + 1) × 1 vector: T . (16) Notice that the least squares estimates of consequent parameters of (14) are computed for each fuzzy rule. Therefore,β β β i are the estimates of the parameters in the consequent of the i-th fuzzy rule. The ITS data concerns the exchange rate of the Euro (EUR) against the US Dollar (USD). The sample data are daily interval data for the period from January 3, 2005 to December 31, 2016 with a total of 3,164 and 3,130 observations, respectively 1 . The low and high prices of the exchange rates are the lower and upper bounds in the interval time series. The data were divided into in-sample and out-of-sample sets. The in-sample set, used for model training, is for the period from January 2005 to December 2012. The remaining four years of data, from January 2013 to December 2016, is the out-of-sample set. The forecasting performance of the methods is assessed based on one-step-ahead forecasts of the out-of-sample data. Evaluation of the forecasting performance of iFRB and selected benchmark approaches are done using the root mean square error (RMSE), and the mean absolute percentage error (MAPE) measures. They are computed as follows: where B = {L, H} represents the low and high prices (i.e., the interval bounds), T are the actual and predicted intervals exchange rate at t, respectively, n is the sample size, and RMSE L (MAPE L ) and RMSE H (MAPE H ) are the RMSE (MAPE) for the ITS lows and highs, respectively. As stated in [4] , the correct prediction of the direction of change can be more important than the magnitude of the error. Therefore, the results are also evaluated using the following measure of direction accuracy: where Statistical significance test of proportions is done to verify if the direction accuracy is significantly different from zero. Rejection of H 0 : DA = 0 indicates that the underlying model is superior to the random walk in predicting the direction of changes. One may use DA = 0.5 to evaluate the superiority of a model over a random walk, based on the rationale that the random walk "predicts the exchange rate with an equal chance to go up or down", i.e., a 50-50 situation. However, the random walk without drift produces no-change forecasts, since the forecast for each point in time t is the actual value at t − 1. Hence for a random walk without drift DA = 0, the null hypothesis should be H 0 : DA = 0, rather than H 0 : DA = 0.5 [19] . In addition to the accuracy measurement, significant differences between a pair of forecasting models are evaluated using the Diebold-Mariano test [10] with 5% significance level. This section details the experiments performed to analyze and to evaluate the interval fuzzy rule-based model (iFRB) for interval-valued EUR/USD exchange rate forecasting. The results are for one-step-ahead forecasts of the out-of-sample data from January 2013 to December 2016. Concerning exchange rate one-step-ahead forecasting, iFRB inference system is represented as follows: where f (·) iFRB represents the nonlinear mapping by iFRB. iFRB modeling requires the following control parameters: number of fuzzy rules c, and the number l of lagged time series values used as input as in Eq. (21) -exogenous variables can also be included as model input. Simulations were performed on the in-sample data by running the iFRB algorithm for different values of c and l. The best values in terms of RMSE were achieved for c = 3 and l = 2. All methods were implemented using MATLAB. Table 1 shows the prediction performance of the models in terms of RMSE, MAPE, and DA. Notice that these metrics are computed individually for both, low (L) and high (H) exchange rate time series. Best results are highlighted in bold. From the point of view of RMSE, iFRB outperforms all competitors in forecasting EUR/USD exchange rate lows and highs. Similar results are found for MAPE as well. Notice that RMSE and MAPE values for highs and lows forecasts of iFRB and random walk models are very similar, which is consistent with the Meese and Rogoff puzzle [16] . Table 1 The forecasting results produced by the interval-valued models iFRB and iMLP achieved better results than the traditional ARIMA, VECM and Holt I for EUR/USD exchange rate lows and highs (Table 1) . It is conceivable to postulate that the reason why ARIMA and VECM models are inferior is that they ignore the possible mutual dependency between the daily highs and lows of the ITS. iFRB and iMLP forecasts are the best among the models, except the random walk. As we move from linear ARIMA, VECM and Holt I to the nonlinear iFRB and iMLP, the improvement is significant, indicating that modeling nonlinearities improve predictive power of interval-valued exchange rates. However, concerning the lower bound of intervals, the differences among iFRB, iMLP and VECM accuracy are lower (RMSE L and MAPE L values are slightly distinct). As shown in [19] , dynamic models may outperform random walk in out-ofsample forecasting if forecasting power is measured by direction accuracy and profitability. Table 1 summarizes the results in terms of direction accuracy (DA) and adjusted RMSE (ARMSE) measures for both, low and high EUR/USD exchange rate. Because the random walk without drift predicts no change in the exchange rate, it has zero direction accuracy, and hence a confusion rate of 1, which makes the RMSE and ARMSE equal. In terms of direction accuracy, all the alternative approaches, ARIMA, VECM, Holt I , iMLP and iFRB are superior to the random walk once the null hypothesis H 0 : DA = 0 is rejected for both, exchange rate lows and highs, which means that the models overwhelmingly outperform the random walk in terms of direction accuracy (Table 1 ). In addition to goodness of fit, as measured by forecast errors, the models were evaluated using the Diebold-Mariano [10] test statistics for lows and highs of the EUR/USD exchange rate. The results are summarized in Table 2 . The test is performed for each pair of models. The null hypothesis of equal predictive accuracy is rejected at the 5% confidence level if |DM | > 1.96. From this point of view, for both the lows and highs of the EUR/USD exchange rate, the random walk, iMLP and iFRB approaches can be considered equally accurate (|DM | < 1.96), but they produce statistically superior forecasts against ARIMA, VECM and Holt I (|DM | > 1.96) -see Table 2 . The ARIMA, VECM and Holt I can be considered equally accurate as well, except for EUR/USD highs, in which the VECM model gives statistically more accurate results than ARIMA. Figure 1 shows the EUR/USD candlesticks based on the observed prices of the exchange rates with the corresponding high-low bands predicted by iFRB for the last three months of data in the out-of-sample sets. Notice that iFRB forecast values follow closely the actual data. Interestingly, the iFRB gives a good fit of the high-low dispersion for both exchange rates, indicating its potential to enhance chart analysis, a tool used by technical traders worldwide. This paper has suggested an interval fuzzy rule-based model (iFRB) for exchange rate ITS forecasting. Fuzzy rules antecedents are identified with a fuzzy clustering approach for symbolic interval-valued data using adaptive City-Block distances. The parameters of rules consequents are estimated using a least squares algorithm designed for interval-valued data. The iFRB one-step ahead forecasting performance was evaluated in forecasting interval-valued Euro/Dollar (EUR/USD) exchange rate for the period from January 2005 to December 2016. The results show that the iFRB model has higher accuracy than the random walk and alternative approaches for out-of-sample forecasting of interval-valued EUR/USD exchange rate. Future work shall include the automatic selection of the number of clusters in iFRB antecedent identification, performance analysis of medium-and long-term forecasting horizons, and applications in risk management using range-based volatility estimators. Forecasting exchange rates under parameter and model uncertainty Pattern Recognition with Fuzzy Objective Function Algorithm. Plenum Classification, Clustering, and Data Analysis. Studies in Classification, Data Analysis, and Knowledge Organization Enhancing the forecasting power of exchange rate models by introducing nonlinearity: does it work? Bayesian forecasting of real exchange rates with a Dornbusch prior Fuzzy clustering of interval-valued data with City-Block and Hausdorff distances Fuzzy time series forecasting based on optimal partitions of intervals and optimal weighting vectors. Knowl.-Based Syst Modeling CAC40 volatility using ultra-high frequency data Hybrid method of multiple kernel learning and genetic algorithm for forecasting short-term foreign exchange rates Comparing predictive accuracy Evolutionary learning of fuzzy grey cognitive maps for the forecasting of multivariate, interval-valued time series Testing forecast accuracy of foreign exchange rates: predictions from feed forward and various recurrent neural network architectures Modeling exchange rate behavior with a genetic algorithm Using interval information granules to improve forecasting in fuzzy time series Holt's exponential smoothing and neural network models for forecasting interval-valued time series Empirical exchange rate models of the seventies: do they fit out of sample? Out-of-sample exchange rate predictability with Taylor rule fundamentals Introduction to Interval Analysis The unbeatable random walk in exchange rate forecasting: reality or myth? iMLP: applying multi-layer perceptrons to interval-valued data Exchange rates and fundamentals: footloose or evolving relationship? Forecasting foreign exchange rates with adaptive neural networks using radialbasis functions and particle swarm optimization Modeling, forecasting and trading the EUR exchange rates with hybrid rolling genetic algorithms-support vector regression forecast combinations Fuzzy identification of systems and its applications to modeling and control A genetic programming approach for EUR/USD exchange rate forecasting and trading Forecasting interval time series using a fully complex-valued RBF neural network with DPSO and PSO algorithms Interval-valued time series forecasting using a novel hybrid Holt and MSVR model Applying the hybrid model of EMD, PSR, and ELM to exchange rates forecasting