Accurate forecasting of agricultural commodity prices is crucial for maintaining market stability, effective risk management, and informed decision-making, particularly in developing economies with high price volatility and heterogeneous market structures. Traditional statistical models and recurrent deep learning approaches often struggle to capture nonlinear dynamics, abrupt fluctuations, and long-range temporal dependencies in agricultural price series. To overcome these limitations, this study proposes a CNN-Transformer hybrid architecture that combines the local feature extraction of Convolutional Neural Networks (CNNs) with the global dependency modelling of Transformer self-attention mechanisms, specifically designed to address limitations of existing hybrid models such as sequential bottlenecks, vanishing gradients, and limited scalability. The framework is evaluated on weekly potato prices from four structurally diverse Indian markets-Azadpur, Ludhiana, Dehradun, and Farrukhabad, covering varying data lengths and volatility regimes. Systematic hyperparameter tuning and extensive experiments demonstrate that the CNN-Transformer consistently outperforms established benchmarks, including CNN, LSTM, Bi-LSTM, GRU, CNN-LSTM, and standalone Transformer models, across RMSE, MAE, and MAPE metrics.
Varshini et al. (Sun,) studied this question.