1 Introduction

Forecasts of commodity prices are vital issues to market participants, which include speculators, processors, hedgers, the media, economists, and policy-makers (Xu 2017a, 2018e). Those of cooking oil prices are of no exception, considering its importance as one of main food resources (Yaakob et al. 2013; Xu and Zhang 2022h; Lam et al. 2010). Due to price volatilities that are generally irregular (Xu 2017c, 2020; Minot 2014; Piot-Lepetit and M’Barek 2011), influences on decisioning processes with great magnitude (Xu and Thurman 2015b; Zhang et al. 2012; Xu 2014c; Mathios 1998; Wells and Slade 2021; Xu and Zhang 2022k), and hence on allocations of resources and economic welfare (Zhang et al. 2014; Xu 2019a, b; Yitzhaki and Slemrod 1991; Ajanovic 2011), significance of forecasting cooking oil prices to the society might not need too much motivation (Caldeira et al. 2019; Xu and Thurman 2015a; Yu et al. 2006; Li et al. 2020b; Brookes et al. 2010).

Researchers in econometrics have devoted significant amounts of efforts to accurate and stable commodity price forecasts. To achieve this goal, a large number of previous studies (Kling and Bessler 1985; Bessler 1982; Brandt and Bessler 1981, 1982, 1983, 1984; Bessler and Chamberlain 1988; Xu and Zhang 2022i; McIntosh and Bessler 1988; Bessler and Brandt 1981; Bessler 1990; Bessler and Babula 1987; Xu 2014b, 2015a; Yang et al. 2001; Bessler et al. 2003; Bessler and Brandt 1992; Bessler and Hopkins 1986; Chen and Bessler 1987, 1990; Wang and Bessler 2004; Bessler and Kling 1986; Babula et al. 2004; Yang et al. 2003; Awokuse and Yang 2003; Yang and Awokuse 2003; Yang and Leatham 1998; Yang et al. 2021) have explored various types of (time series) econometric models and predictions from experts and commercial services. Common time series models in the literature for this forecast purpose include the auto-regressive integrated moving average model (ARIMA), vector auto-regressive model (VAR), vector error correction model (VECM), and different types of their variations. For example, the ARIMA has shown its immense popularity in earlier work and is still being actively sought for many different kinds of time series forecast tasks. It was found that the ARIMA substantially outperforms forecasts based upon expert opinions and structural models for U.S. hog and cattle prices (Brandt and Bessler 1981, 1983; Bessler and Brandt 1981). Further research (Brandt and Bessler 1982, 1984; Kling and Bessler 1985; Bessler 1990) determined that there exists limited space for accuracy improvements for hog price forecasts when changing from the ARIMA to models incorporating more information from the sows farrowing price. This empirical evidence is somewhat different for wheat, for whose prices it was determined that more information from the exchange rate series can benefit improving forecast accuracy obtained via the ARIMA (Bessler and Babula 1987). For canola prices, the ARIMA was also found to achieve decent forecasts (Sulewski et al. 1994). Rather than using one single information source, previous work also suggested the potential value to forecast accuracy by combining the ARIMA with other model types (Bessler and Chamberlain 1988; McIntosh and Bessler 1988). The VAR represents another important econometric method for forecasts of price series that builds upon various economic variables’ relations (Bessler and Hopkins 1986; Chen and Bessler 1987; Bessler and Brandt 1992; Awokuse and Yang 2003). The VAR was compared with structural models for the forecast problem of U.S. cotton prices and it was found that the former tends to beat the latter during periods with normal price volatilities (Chen and Bessler 1990). It was demonstrated that the VAR can be useful in sorting out the predictive content among a set of wheat futures prices from different countries (Yang et al. 2003) and U.S. soy and soybean prices of different regions (Babula et al. 2004). Closely related to the VAR, the VECM further includes the long-run relationship(s) among economic variables via cointegration and it could be particularly helpful for long-term price forecasts (Yang and Leatham 1998; Yang and Awokuse 2003; Xu 2019a, b; Yang et al. 2021). For example, it was found that the VECM generally beats the VAR for international wheat price forecasts (Bessler et al. 2003). The general benefit of using the VECM instead of some other models was also determined for several different agricultural price series (Wang and Bessler 2004).

Recently, machine learning techniques have revealed their great potential for price and yield forecasts of a wide spectrum of agricultural commodities (Yuan et al. 2020; Rl and Mishra 2021; Bayona-Oré et al. 2021; Storm et al. 2020; Kouadio et al. 2018; Abreham 2019; Huy et al. 2019; Degife and Sinamo 2019; Naveena et al. 2017; Lopes 2018; Mayabi 2019; Moreno and Salazar 2018; Zelingher et al. 2021; Shahhosseini et al. 2021, 2020; dos Reis Filho 2020; Zelingher et al. 2020; Ribeiro et al. 2019; Surjandari et al. 2015; Ayankoya et al. 2016; Ali et al. 2018; Fang et al. 2020; Harris 2017; Li et al. 2020a; Yoosefzadeh-Najafabadi et al. 2021; Ribeiro and dos Santos 2020; Zhao 2021; Jiang et al. 2019; Handoyo and Chen 2020; Silalahi 2013; Li et al. 2020b; Ribeiro and Oliveira 2011; Zhang et al. 2021; Melo et al. 2007; de Melo et al 2004; Kohzadi et al. 1996; Zou et al. 2007; Rasheed et al. 2021; Khamis and Abdullah 2014; Dias and Rocha 2019; Gómez et al. 2021; Silva et al. 2019; Deina et al. 2011; Filippi et al. 2019; Wen et al. 2021), such as soybeans (dos Reis Filho 2020; Li et al. 2020a; Yoosefzadeh-Najafabadi et al. 2021; Ribeiro and dos Santos 2020; Zhao 2021; Jiang et al. 2019; Handoyo and Chen 2020), soybean oil (Silalahi 2013; Li et al. 2020b), sugar (Surjandari et al. 2015; Ribeiro and Oliveira 2011; Zhang et al. 2021; Melo et al. 2007; de Melo et al 2004; Silva et al. 2019), corn (Xu and Zhang 2021f; Mayabi 2019; Moreno and Salazar 2018; Zelingher et al. 2021; Shahhosseini et al. 2021, 2020; dos Reis Filho 2020; Zelingher et al. 2020; Ribeiro et al. 2019; Surjandari et al. 2015; Ayankoya et al. 2016), wheat (Fang et al. 2020; Ribeiro and dos Santos 2020; Kohzadi et al. 1996; Zou et al. 2007; Rasheed et al. 2021; Khamis and Abdullah 2014; Dias and Rocha 2019; Gómez et al. 2021), coffee (Kouadio et al. 2018; Abreham 2019; Huy et al. 2019; Degife and Sinamo 2019; Naveena et al. 2017; Lopes 2018; Deina et al. 2011), oats (Harris 2017), cotton (Ali et al. 2018; Fang et al. 2020), and canola (Shahwan and Odening 2007; Filippi et al. 2019; Wen et al. 2021). The techniques include the neural network (Xu and Zhang 2021f; Yuan et al. 2020; Abreham 2019; Huy et al. 2019; Naveena et al. 2017; Mayabi 2019; Moreno and Salazar 2018; Ayankoya et al. 2016; Fang et al. 2020; Harris 2017; Li et al. 2020a; Yoosefzadeh-Najafabadi et al. 2021; Ribeiro and dos Santos 2020; Silalahi 2013; Li et al. 2020b; Ribeiro and Oliveira 2011; Zhang et al. 2021; Melo et al. 2007; de Melo et al 2004; Kohzadi et al. 1996; Zou et al. 2007; Rasheed et al. 2021; Khamis and Abdullah 2014; Silva et al. 2019; Deina et al. 2011; Shahwan and Odening 2007), genetic programming Ali et al. (2018), extreme learning (Kouadio et al. 2018; Jiang et al. 2019; Silva et al. 2019; Deina et al. 2011), deep learning (Rl and Mishra 2021), K-nearest neighbor (Abreham 2019; Lopes 2018; Gómez et al. 2021), support vector regression (Abreham 2019; Lopes 2018; dos Reis Filho 2020; Surjandari et al. 2015; Fang et al. 2020; Harris 2017; Li et al. 2020a; Yoosefzadeh-Najafabadi et al. 2021; Ribeiro and dos Santos 2020; Zhao 2021; Li et al. 2020b; Zhang et al. 2021; Dias and Rocha 2019; Gómez et al. 2021), random forest (Kouadio et al. 2018; Lopes 2018; Zelingher et al. 2021; Shahhosseini et al. 2021, 2020; Zelingher et al. 2020; Li et al. 2020a; Yoosefzadeh-Najafabadi et al. 2021; Ribeiro and dos Santos 2020; Dias and Rocha 2019; Gómez et al. 2021; Filippi et al. 2019; Wen et al. 2021), multivariate adaptive regression splines (Dias and Rocha 2019), decision tree (Abreham 2019; Degife and Sinamo 2019; Lopes 2018; Zelingher et al. 2021, 2020; Surjandari et al. 2015; Harris 2017; Dias and Rocha 2019), ensemble (Shahhosseini et al. 2021, 2020; Ribeiro et al. 2019; Fang et al. 2020; Ribeiro and dos Santos 2020), and boosting (Lopes 2018; Zelingher et al. 2021; Shahhosseini et al. 2021, 2020; Zelingher et al. 2020; Ribeiro and dos Santos 2020; Gómez et al. 2021). Efforts have been seen in the literature aiming at improving efficiency and performance of machine learning techniques (Vajda and Santosh 2016; Elliott et al. 2020). For example, a fast method has been proposed to classify patterns when a k-nearest neighbor classifier is used and the method has been found to not only improve efficiency but also maintain classification performance (Vajda and Santosh 2016). In another work (Elliott et al. 2020), an ensemble method has been successfully constructed to improve efficiency and performance of deep Q-learning. For soybean oil, the genetic algorithm was used to optimize the topology in the neural network for forecasting its prices (Silalahi 2013). It was also found that wavelet transformations and exponential smoothing could benefit forecast accuracy of the neural network and support vector regression for soybean oil futures prices (Li et al. 2020b). For canola, the neural network was combined with the ARIMA to improve price forecast accuracy from each individual model (Shahwan and Odening 2007). In terms of canola’s yields, the random forest was successfully adopted for their forecasts (Filippi et al. 2019; Wen et al. 2021). Based on our review here and that from Bayona-Oré et al. (2021), the neural network appears to be the most commonly considered machine learning model for agricultural commodity price forecasting. In particular, previous work (Xu 2015b, 2018a, b, c; Yang et al. 2008, 2010; Wang and Yang 2010; Karasu et al. 2020; Wegener et al. 2016) has revealed that neural network techniques have great potential for forecasts of economic and financial time series, which can be rather noised and chaotic. Previous research (Xu and Zhang 2022j; Yang et al. 2008, 2010; Wang and Yang 2010; Wegener et al. 2016; Karasu et al. 2017a, b) has also demonstrated that neural networks could generate high accuracy across various forecasting circumstances. This might benefit from neural networks’ capabilities of self-learning for forecasts (Karasu et al. 2020; Xu and Zhang 2022a) and capturing non-linear characteristics (Altan et al. 2021) in economic and financial data (Xu 2018d; Xu and Zhang 2021a, b). The present study will concentrate on the neural network for forecasting price indices of canola and soybean oil.

To facilitate our analysis, we assess the forecast problem using weekly wholesale price indices of canola and soybean oil in China during January 1, 2010–January 3, 2020 by employing the non-linear auto-regressive neural network as the forecast tool. We evaluate forecast performance of different model settings over algorithms, delays, hidden neurons, and data splitting ratios in arriving at the final models for the two commodities, which are relatively simple and lead to accurate and stable results. To our knowledge and based upon the previous work mentioned above, this is the first study on forecasts of these two vital cooking oil price indices in the Chinese market. There should be little double that it is of great importance to investors and policy makers to have a good understanding of timely and accurate forecasts of commodity prices, which could benefit prompt portfolio adjustments, risk monitoring, and market assessments. By examining the forecast problem using the weekly data, the current study helps timely decisioning. Our results might serve as technical forecasts on a standalone basis or be combined with other fundamental forecasts for perspectives of price trends and associated policy analysis. The forecast framework might also have the potential to be generalized to related forecast problems of other agricultural commodities and in other economic sectors, such as the energy, metal, and mineral.

2 Data

Weekly wholesale price indices of canola and soybean oil in China during January 1, 2010–January 3, 2020 for analysis are plotted in the top panel of Fig. 1, together with their first differences. The average weekly price in June 1994 is used as the base period price index, which is set at 100 that measures the price of canola oil or soybean oil of 50 kilograms. The bottom panel of Fig. 1 also visualizes price indices and their first differences with histograms of fifty bins and kernel estimates to present their distributions. Table 1 reports summary statistics of the data that include the minimum, mean, median, maximum, standard deviation (Std), skewness, kurtosis, and p-value of the Jarque–Bera test of the price indices and their first differences, where one could see that they are not normally distributed, as generally expected for financial series (Xu 2017b, 2019c; Xu and Zhang 2022b). It is worth noting that price indices of soybean oil are missing on February 19, 2010, and February 3, 2017, and we utilize cubic spline interpolation for approximations of 99.39 and 102.52, respectively. The approximated price index of 99.39 on February 19, 2010, is close to 101.84 on February 12, 2010, and 101.40 on February 26, 2010. Similarly, the approximated price index of 102.52 on February 3, 2017, is close to 103.49 on January 27, 2017, and 99.76 on February 10, 2017.

Fig. 1
figure 1

Top panel: weekly price indices of canola and soybean oil (left) and first differences of prices (right); Bottom panel: histograms of fifty bins and kernel estimates for weekly price indices and their first differences of canola oil (left two) and those of soybean oil (right two)

Table 1 Summary statistics of weekly price indices and their first differences of canola and soybean oil

3 Methods

We use the non-linear auto-regressive neural network model as the forecasting tool for weekly price indices of canola and soybean oil. This model could be expressed as \(y_{t}=f(y_{t-1},...,y_{t-d})\). Here, y is the weekly price index of canola or soybean oil to be forecasted, t denotes time, d denotes the number of delays, and f denotes the function. We concentrate on one-week ahead forecasts.

We adopt the two-layer feedforward network, which has a sigmoid transfer function among hidden layers and a linear transfer function associated with the output layer. In terms of algorithms for model training, we consider both the Levenberg–Marquardt (LM) algorithm (Levenberg 1944; Marquardt 1963) and scaled conjugate gradient (SCG) algorithm (Møller 1993), which have been employed in a diverse variety of research fields (Xu and Zhang 2021c, d, 2022c, 2021e; Doan and Liong 2004; Kayri 2016; Khan et al. 2019; Selvamuthu et al. 2019). These two algorithms have been found to be useful for forecasting time series with nonlinear patterns (Abraham 2004; Asadi et al. 2012; Ahadi and Liang 2018; Selvamuthu et al. 2019; Qazani et al. 2021). Comparative studies of these two algorithms could be found from some of previous work (Baghirli 2015; Xu and Zhang 2022d, e; Al Bataineh and Kaur 2018). The LM algorithm makes approximations of the second-order training speed so that it could avoid expensive computing of the Hessian matrix, H (Paluszek and Thomas 2020), and it could efficiently handle the slow convergence issue (Hagan and Menhaj 1994). The SCG algorithm avoids time-consuming line searches in conjugate gradient algorithms and is generally faster as compared to the LM backpropagation.

Specifically, the approximation performed through the LM algorithm could be expressed as \(H=J^{T} J\), where \(J=\left[ \begin{array}{cc}\frac{\partial f}{\partial z_{1}}&\frac{\partial f}{\partial z_{2}}\end{array}\right] \) for a nonlinear function \(f\left( z_{1}, z_{2}\right) \) with \(H=\left[ \begin{array}{cc}\frac{\partial ^{2} f}{\partial z_{1}^{2}} &{} \frac{\partial ^{2} f}{\partial z_{1} \partial z_{2}} \\ \frac{\partial ^{2} f}{\partial z_{2} \partial z_{1}} &{} \frac{\partial ^{2} f}{\partial z_{2}^{2}}\end{array}\right] \). \(g=J^{T} e\) is used to represent the gradient, where e contains the error vector. The rule of \(z_{k+1}=z_{k}-\left[ J^{T} J+\mu I\right] ^{-1} J^{T} e\) is utilized to make updates of weights and biases, where I represents the identity matrix. The LM algorithm is similar to Newton’s method for the case of \(\mu =0\) and it is gradient descent with small step sizes when \(\mu \) is large. The value of \(\mu \) will be decreased if faster gradient descent is less needed after successful steps. The LM algorithm not only has desired properties of steepest-descent algorithms and Gauss–Newton methods but also avoids some of their limitations that include the potential issue of slow convergence (Hagan and Menhaj 1994).

Backpropagation algorithms carry out adjustments of weights in the steepest descent as the performance function would rapidly decrease in the direction, which however, does not always reflect the fastest convergence. Conjugate gradient algorithms carry out searches along the conjugate direction, which in general, result in faster convergence as compared to the steepest descent. Most algorithms would apply learning rates for determining lengths of updated weight step sizes. For conjugate gradient algorithms, step sizes are modified during iterations. Hence, the search is carried out along the conjugate gradient direction for determining the step size for the reduction of the performance function. Besides, for the purpose of avoiding time-consuming line searches in conjugate gradient algorithms, the SCG algorithm, which is fully-automated and supervised, could be used. It is generally quicker than the LM backpropagation.

In addition to different algorithms considered, different model settings over delays, hidden neurons, and data spitting ratios are examined as well. We consider delays of 2, 3, 4, 5, and 6, hidden neurons of 2, 3, 5 and 10, and data spitting ratios of 60% vs. 20% vs. 20%, 70% vs. 15% vs. 15%, and 80% vs. 10% vs. 10% for training, validation, and testing. These model settings are summarized in Table 2, where the setting #27 is utilized to build the final chosen model for the price index of canola oil and the setting #23 for the price index of soybean oil, both of which are trained through the LM algorithm following the ratio of 70% vs. 15% vs. 15% for training, validation, and testing. The setting #27 is based on 5 delays and 5 hidden neurons, and the setting #23 is based on 3 delays and 5 hidden neurons.

Table 2 Explored model settings for weekly price indices of canola and soybean oil

4 Results

All of the model settings shown in Table 2 are run for weekly price indices of canola and soybean oil. For each model setting, the relative root mean square error (RRMSE), as the forecast performance metric, is computed for training, validation, and testing phases and the corresponding results are shown in Fig. 2. The RRMSE expresses forecast performance in a percentage form and helps comparisons of forecast performance across different series and models. Balancing forecast performance and stabilities, the setting #27 (5 delays and 5 hidden neurons) is chosen for the price index of canola oil and the setting #23 (3 delays and 5 hidden neurons) for the price index of soybean oil, both of which are based upon the LM algorithm and the data splitting ratio of 70% vs. 15% vs. 15% for training, validation, and testing. These two chosen settings are marked with dark arrows in Fig. 2 and one should be able to observe that they not only generate rather low RRMSEs but also produce rather close RRMSEs. More specifically, one could see from Fig. 2 that for the chosen settings, the diamond corresponding to training, square corresponding to validation, and triangular corresponding to testing are pretty close to each other. Taking canola oil as an example, there exist other settings with a lower RRMSE as compared to the setting #27 for a specific sub-sample but with higher RRMSEs for the remaining sub-samples, meaning a lower stability. For example, the setting #15 shows a slightly lower RRMSE than the setting #27 for training but higher RRMSEs for validation and testing, as well as a higher overall RRMSE. Choosing the model setting with relatively stable performance across training, validation, and testing could help ensure no overfitting or underfitting.

Fig. 2
figure 2

RRMSEs across all model settings for weekly price indices of canola and soybean oil

Having the chosen setting determined for each commodity, performance sensitivities to different settings are evaluated through altering one setting a time and the corresponding results are presented in Fig. 3, where RRMSEs for training, validation, and testing based upon each setting are reported. For the price index of canola oil, the comparison between the settings #27 and #28 evaluates the sensitivity to algorithms, between the setting #27 and settings #21, #23, #25, and #29 the sensitivity to delays, between the setting #27 and settings #7, #17, and #37 the sensitivity to hidden neurons, and between the setting #27 and settings #67 and #107 the sensitivity to data splitting ratios. For the price index of soybean oil, the comparison between the settings #23 and #24 evaluates the sensitivity to algorithms, between the setting #23 and settings #21, #25, #27, and #29 the sensitivity to delays, between the setting #23 and settings #3, #13, and #33 the sensitivity to hidden neurons, and between the setting #23 and settings #63 and #103 the sensitivity to data splitting ratios. These results support the settings #27 as the final choice for the price index of canola oil, leading to RRMSEs of 2.66, 1.46, and 2.17% for training, validation, and testing, respectively, and the overall RRMSE of 2.45%, and these results support the settings #23 as the final choice for the price index of soybean oil, leading to RRMSEs of 2.33, 1.96, and 1.98% for training, validation, and testing, respectively, and the overall RRMSE of 2.23%. From the perspective of the mean absolute error (MAE), the setting #27 leads to MAEs of 1.2512, 1.1289, and 1.3776 for training, validation, and testing, respectively, and the overall MAE of 1.2518 for the price index of canola oil, and the setting #23 leads to MAEs of 1.7565, 1.6153, and 1.5667 for training, validation, and testing, respectively, and the overall MAE of 1.7069 for the price index of soybean oil. We could observe from Fig. 3 that the settings #27 and #23 lead to rather stable performance across the training, validation, and testing phases among the alternatives for the price indices of canola oil and soybean oil, respectively. From Fig. 3, it could be seen that better overall performance is achieved through the LM algorithm as compared to the SCG algorithm, which is reflected through the comparison between the settings #27 that is based on the LM algorithm and #28 that is based on the SCG algorithm for the price index of canola oil and through the comparison between the settings #23 that is based on the LM algorithm and #24 that is based on the SCG algorithm for the price index of soybean oil. This is consistent with the literature (Xu and Zhang 2022l, f; Batra 2014), which finds that while the SCG algorithm is generally better in terms of speed than the LM algorithm on a multilayer perceptron structure with two hidden layers, the LM algorithm generally leads to slightly better performance in terms of accuracy than the SCG algorithm.

Fig. 3
figure 3

Sensitivities of model performance (the RRMSE) to different model settings for weekly price indices of canola and soybean oil

Detailed visualization of forecasted results and forecast errors based upon the chosen setting for the training, validation, and testing phases are shown in Fig. 4 for each commodity. Overall, the chosen setting results in accurate and stable performance, suggesting usefulness of the neural network technique for forecasting weekly price indices of canola and soybean oil. Particularly, from Fig. 4 (top panel), we could observe that the forecasted price indices closely track the observed ones across the training, validation, and testing phases. From Fig. 4 (bottom panel), we could see that there is no consistent overprediction or underprediction across the training, validation, and testing phases. One could also observe that a couple of forecast errors shown in Fig. 4 (bottom panel) are larger during periods with significantly elevated price volatilities, particularly for canola oil near the end of the sample. This might not be surprising and the models generally still capture the trends during these periods.

Fig. 4
figure 4

Top panel: forecasts of weekly price indices of canola and soybean oil; Bottom panel: forecast errors calculated as observations minus forecasts

5 Discussion

We have conducted error autocorrelation analysis as well (details available upon request) and autocorrelations associated with different lags up to the lag of 20 are all within the 95% confidence limits except for the lags of 6 and 13 for canola and soybean oil, respectively, for which slight breaches of the confidence limit are found. These slight breaches will be avoided if the 99% confidence limit is used. The error autocorrelation analysis thus suggests that the chosen settings are generally adequate.

It has been well established in the literature (Yang et al. 2008, 2010; Wang and Yang 2010; Karasu et al. 2020) that there could be nonlinearities in higher moments inhabiting financial and economic time series data. We apply the BDS test (Brock et al. 1996), for which one might refer to Dergiades et al. (2013) and Fujihara and Mougoué (1997) for a formal description and to Brock et al. (1996) for all technical details, to the weekly price indices of canola and soybean oil examined in the current study and find that p values of the tests are all well below 0.01 and almost 0 based upon embedding dimensions of 2 to 10 and \(\epsilon \) values (i.e. distance used for testing proximity of data points) of 0.5, 1.0, 1.5, 2.0, 2.5, and 3.0 times the standard deviation of the price index series. Neural network techniques have capabilities of self-learning for forecasts (Karasu et al. 2020) and capturing non-linear features (Altan et al. 2021) often inhabiting financial and economic series, such as the cooking oil price indices considered here. The neural network’s one advantage over other non-linear techniques for time series modeling is that it would well approximate a large class of functions with a class of multi-layer neural networks (Yang et al. 2008, 2010; Wang and Yang 2010). Unlike common non-linear models that employ a specific non-linear function between inputs and the output, the neural network’s multi-layer structure would combine many ‘basic’ non-linear functions. With good forecast performance achieved here, usefulness of the neural network technique is empirically demonstrated to the forecast issue of the weekly price indices of canola and soybean oil.

6 Conclusion

Forecasts of commodity prices represent vital issues to market participants and policy makers. Those of cooking oil are of no exception. In the present study, the forecast problem is investigated for weekly wholesale price indices of canola and soybean oil in China during January 1, 2010–January 3, 2020. The forecast technique adopted here is the non-linear auto-regressive neural network and the final models for the two commodities are built by exploring different model settings. For price indices of both commodities, the final models are constructed based upon the Levenberg–Marquardt algorithm (Levenberg 1944; Marquardt 1963) and a data splitting ratio of 70% vs. 15% vs. 15% for training, validation, and testing. The model for the price index of canola oil uses 5 delays and 5 hidden neurons, and that for the price index of soybean oil uses 3 delays and 5 hidden neurons. The models lead to accurate and stable forecast performance. Particularly, the model for the price index of canola oil generates relative root mean square errors (RRMSEs) of 2.66, 1.46, and 2.17% for training, validation, and testing, respectively, and the overall RRMSE of 2.45%, and the model for the price index of soybean oil generates RRMSEs of 2.33, 1.96, and 1.98% for training, validation, and testing, respectively, and the overall RRMSE of 2.23%. Our results might serve as technical forecasts on a standalone basis or be combined with other fundamental forecasts for perspectives of price trends and associated policy analysis. The framework presented here should not appear to be difficult to implement, which can be an important consideration to decision makers (Brandt and Bessler 1983), and it might also have the potential to be generalized to related forecast problems of other agricultural commodities and in other economic sectors, such as the energy, metal, and mineral. Future research of interest might be examining the potential of combining (non)linear time series techniques and graph theory from machine learning for price forecasts (Kano and Shimizu 2003; Shimizu et al. 2006; Xu and Zhang 2022g; Shimizu and Kano 2008; Shimizu et al. 2011; Xu 2014a; Bessler and Wang 2012). Exploring economic significance of adopting neural network modeling or other machine learning techniques for price forecasts might also be a worthwhile avenue for future research (Yang et al. 2008, 2010; Wang and Yang 2010).