This study aims to model and enhance the forecasting accuracy of Saudi Arabia stock exchange (Tadawul) data patterns using the daily stock price indices data with 2026 observations from October 2011 to December 2019. This study employs a nonlinear spectral model of maximum overlapping discrete wavelet transform (MODWT) with five mathematical functions, namely, Haar, Daubechies (Db), Least Square (LA-8), Best localization (BL14), and Coiflet (C6) in conjunction with adaptive network-based fuzzy inference system (ANFIS). We have selected oil price (Loil) and repo rate (Repo) as input values according to correlation, the Engle and Granger Causality test, and multiple regressions. The input variables in this study have been collected from Saudi Authority for Statistics and Saudi Central Bank. The output variable is obtained from Tadawul. The performance of the proposed model (MODWT-LA8-ANFIS) is evaluated in terms of mean error (ME), root mean square error (RMSE), and mean absolute percentage error (MAPE). Also, we have compared the MODWT-LA8-ANFIS model with traditional models, which are autoregressive integrated moving average (ARIMA) model and ANFIS model. The obtained results show that the performance of MODWT-LA8-ANFIS is better than that of the traditional models. Therefore, the proposed forecasting model is capable of decomposing in the stock markets.