Time series forecasting plays an important role in understanding the dynamics of volatile data that depends on long-term historical patterns, such as crude oil prices. Parametric statistical approaches often face limitations due to strict assumptions, making nonparametric deep learning methods a more flexible alternative. This study proposes the application of a Transformer-based deep learning model to predict the price of Sumatran Light Crude Oil (SLC), utilizing a self-attention mechanism to capture long-term dependencies in time series data. Experiments were conducted by evaluating various configurations of multi-head attention and number of layers, while keeping the model dimensions and input-output windows consistent. The results show that the Transformer configuration with 16 heads and 4 layers provides the best performance with a Root Mean Square Error (RMSE) value of 8.19818. These findings indicate that Transformer is capable of effectively modeling long-term trends in SLC prices, although its sensitivity to short-term fluctuations is still limited. The main contribution of this research lies in the use of Transformer as an alternative approach to forecasting crude oil prices in Indonesia, which was previously dominated by statistical methods and recurrent models. In practical terms, the results of this study provide a basis for the development of a more adaptive oil price forecasting system to support energy analysis and data-driven decision making
Copyrights © 2025