## 3 Implementations and Results
### Forecasting of the Stock and Price (S&P) Index Using the FLR-FSWGARCH Model
}=111.8034\] The Euclidean distance calculated for each sliding window is shown in Table 2.  
From Table 2, based on the Euclidean distance, it was found that \(SW_{1}\), \(SW_{4}\), and \(SW_{5}\) produced the smallest distances; thus, they were selected to be the explanatory variables, \(X_{i}\), for the FLR analysis. The proposed computation for parameter estimation was employed on the data to produce:  
\[\widetilde{Y}=\left[ \begin{array}{cccc}2000&2050&2100\\ 2000&2050&2100\\ 2000&2050&2100\\ 1950&2000&2050\\ 1950&2000&2050\\ 2000&2050&2100\\ 2000&2050&2100\\ 2000&2050&2100\\ 2000&2050&2100\\ \end{array} \right],\] \begin{table}
\begin{tabular}{c c} \hline
**Sliding Window, \(SW_{i}\)** & **Mean of \(Edi\)** \\ \hline
1 & 111.8034 \\
2 & 141.4214 \\
3 & 132.2876 \\
4 & 111.8034 \\
5 & 111.8034 \\
6 & 141.4214 \\
7 & 150.0000 \\
8 & 141.4214 \\
9 & 158.1139 \\
10 & 193.6492 \\
11 & 187.0829 \\
12 & 180.2776 \\ \hline \end{tabular}
\end{table} 
Table 2: Mean of Euclidean distance for the twelve sliding windows, \(SW_{i}\). \[X=\left[ \begin{array}{cccc}2021.94&2047.62&2063.59\\ 2043.41&2052.23&2047.62\\ 2073.07&2012.37&2052.23\\ 2041.89&2021.94&2012.37\\ 2005.55&2043.41&2021.94\\ 2021.15&2073.07&2043.41\\ 2038.97&2041.89&2073.07\\ 2064.29&2005.55&2041.89\\ 2060.99&2021.15&2005.55\\ 2056.50&2038.97&2021.15\\ 2078.36&2064.29&2038.97\\ 2063.36&2060.99&2064.29\\ \end{array} \right]\]  
By using Equation (12), the estimated regression parameters \(\widetilde{\delta}\) were:  
\[\widetilde{\partial}=\left[ \begin{array}{c}\widetilde{\beta}\\ \widetilde{\alpha}\\ \widetilde{\gamma}\end{array} \right]=\left[ \begin{array}{cccc}0.55677&0.566 74&0.57671\\ 0.24627&0.25600&0.26574\\ 0.17319&0.17796&0.18273\\ \end{array} \right].\]  
Finally, the estimated FLR equation could be written as:  
\[\hat{\widetilde{Y}}=(0.55674,0.55677,0.57671)X_{1}+(0.24600,0.24627,0.26574)X_{2 }+(0.17796,0.17319,0.18273)X_{3}.\]  
The \(\widetilde{\delta}\) was then defuzzified using Equation (8) to get the crisp values of \(\beta\), \(\alpha\), and \(\gamma\). \[ \begin{array}{l}\beta=\frac{0.55677+2\times 0.56674+0.57671}{4}=0.566741,\\ \alpha=\frac{0.242627+2\times 0.25600+0.26574}{4}=0.256005,\\ \gamma=\frac{0.17319+2\times 0.17796+0.18273}{4}=0.177962.\end{array} \]  
The estimated parameters \(\beta\), \(\alpha\), and \(\gamma\) were used in FSWGARCH model to predict the data in steps three and four. After discovering the optimal parameters, returns of the observations were calculated by squaring the change in the number of S&P at the end of the month. Then, the fuzzy window variance (\(F_{w}\)), which was computed by summing up the multiplication of each weight with the returns of the observation, was employed in the FSWGARCH model. For this dataset, the three sliding windows produced the same minimum mean of the Euclidean distance, as stated in Table 2, which were \(SW_{1}\), \(SW_{4}\), and \(SW_{5}\). Thus, the variation of the three windows were calculated. The smallest variation produced by those windows was selected to determine the weight of the forecast. For the S&P dataset, the smallest variation among those three windows was \(SW_{5}\); thus, the total weight of \(F_{w}\) was \(1+2+3+4+5=15\). After some calculation, the model produced \(F_{w}\) and the variance, as shown in columns three and four, respectively, in Table 3. The first fuzzy window variance and the first variance of the FLR-FSWGARCH model started with month 6 as their weight included the first five returns. The forecasting was then continued by calculating the expected variance and the forecast value, as given in Equations (19) and (20). The forecast value with the respective percentage errors is shown in Table 4. It can be observed that there was a slight difference between the actual observation and the forecasted value. The percentage errors in the fourth column were near 1%. The illustration of the actual data and forecast value of S&P data is displayed in Figure 5.