Using Generative Pre-Trained Transformers (GPT) for Electricity Price Trend Forecasting in the Spanish Market
The DOI matches its Crossref record; 8 of the 8 references it cites were found in a registry or an index.
Abstract
The electricity market in Spain holds significant importance in the nation’s economy and sustainability efforts due to its diverse energy mix that encompasses renewables, fossil fuels, and nuclear power. Accurate energy price prediction is crucial in Spain, influencing the country’s ability to meet its climate goals and ensure energy security and affecting economic stakeholders. We have explored how leveraging advanced GPT tools like OpenAI’s ChatGPT to analyze energy news and expert reports can extract valuable insights and generate additional variables for electricity price trend prediction in the Spanish market. Our research proposes two different training and modelling approaches of generative pre-trained transformers (GPT) with specialized news feeds specific to the Spanish market: in-context example prompts and fine-tuned GPT models. We aim to shed light on the capabilities of GPT solutions and demonstrate how they can augment prediction models by introducing additional variables. Our findings suggest that insights derived from GPT analysis of electricity news and specialized reports align closely with price fluctuations post-publication, indicating their potential to improve predictions and offer deeper insights into market dynamics. This endeavor can support informed decision-making for stakeholders in the Spanish electricity market and companies reliant on electricity costs and price volatility for their margins.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“The first methodology involved providing GPT with specific examples within prompts to guide its analysis of specialized news feeds to Spanish electricity market.”
From Generative AI and LLM applications in renewable energy and smart grids: a systematic review for the sustainable energy transition (2026) · cites this paper as Medina et al. (2024)
In the citing paper
“In the second methodology, GPT was fine-tuned using a dataset comprising specialized news and expert reports pertinent to the Spanish electricity market.”
From Generative AI and LLM applications in renewable energy and smart grids: a systematic review for the sustainable energy transition (2026) · cites this paper as Medina et al. (2024)
In the citing paper
“The findings of the research indicated that the insights derived from GPT's analysis closely aligned with subsequent price fluctuations, suggesting that GPT could effectively augment prediction models by introducing additional variables.”
From Generative AI and LLM applications in renewable energy and smart grids: a systematic review for the sustainable energy transition (2026) · cites this paper as Medina et al. (2024)
In the citing paper
“The performed study proposed two methodologies for integrating GPTs within the forecasting domain, namely in context example prompts, and in fine tuned GPT models.”
From Generative AI and LLM applications in renewable energy and smart grids: a systematic review for the sustainable energy transition (2026) · cites this paper as Medina et al. (2024)
In the citing paper
“Medina et al. (2024) explored the applications of GPTs, specifically OpenAI's Chat-GPT for forecasting the electricity price trends within the Spanish electricity market.”
From Generative AI and LLM applications in renewable energy and smart grids: a systematic review for the sustainable energy transition (2026) · cites this paper as Medina et al. (2024)
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., Yih, W.-T., Rocktäschel, T., et al. (2020) · arXiv · doi:10.48550/arxiv.2005.11401 · Cited by 3,101
Electricity price forecasting: A review of the state-of-the-art with a look into the future
Weron, R. (2014) · International Journal of Forecasting · doi:10.1016/j.ijforecast.2014.08.008 · Cited by 1,646
Chatting about ChatGPT: how may AI and GPT impact academia and libraries?
Lund, B. D., & Wang, T. (2023) · Library Hi Tech News · doi:10.1108/lhtn-01-2023-0009 · Cited by 1,355
Retrieval-Augmented Generation for Large Language Models: A Survey
Gao, Y., Xiong, Y., Gao, X., Jia, K., Pan, J., Bi, Y., Dai, Y., Sun, J., Wang, M., & Wang, H. (2023) · arXiv · doi:10.48550/arxiv.2312.10997 · Cited by 876
What Makes Good In-Context Examples for GPT-3?
Liu, J., Shen, D., Zhang, Y., Dolan, B., Carin, L., & Chen, W. (2022) · Proceedings of Deep Learning Inside Out (DeeLIO 2022): The 3rd Workshop on Knowledge Extraction and Integration for Deep Learning Architectures · doi:10.18653/v1/2022.deelio-1.10 · Cited by 563
Can ChatGPT forecast stock price movements? Return predictability and large language models
Lopez-Lira, A., & Tang, Y. (2026) · Journal of Financial Economics · doi:10.1016/j.jfineco.2026.104335 · Cited by 425
News Summarization and Evaluation in the Era of GPT-3
Goyal, T., Li, J. J., & Durrett, G. (2022) · arXiv · doi:10.48550/arxiv.2209.12356 · Cited by 175
Can ChatGPT Forecast Stock Price Movements? Return Predictability and Large Language Models
Lopez-Lira, A., & Tang, Y. (2023) · doi:10.2139/ssrn.4412788
Research works printed but not linked: 26
- Pezzutto, S., Grilli, G., Zambotti, S., and Dunjic, S. (2018). Forecasting Electricity Market Price for End Users in EU28 until 2020—Main Factors of Influence. Energies, 11. · DOI
- Nowotarski, 2018, Recent advances in electricity price forecasting: A review of probabilistic forecasting, Renew. Sustain. Energy Rev., 81, 1548, 10.1016/j.rser.2017.05.234 · DOI · Paper page
- Qin, 2019, An effective and robust decomposition-ensemble energy price forecasting paradigm with local linear prediction, Energy Econ., 83, 402, 10.1016/j.eneco.2019.07.026 · DOI
- Bianco, 2009, Electricity consumption forecasting in Italy using linear regression models, Energy, 34, 1413, 10.1016/j.energy.2009.06.034 · DOI · Paper page
- Kumar, 2010, Time series models (Grey-Markov, Grey Model with rolling mechanism and singular spectrum analysis) to forecast energy consumption in India, Energy, 35, 1709, 10.1016/j.energy.2009.12.021 · DOI · Paper page
- Hyndman, 2010, Density forecasting for long-term peak electricity demand, IEEE Trans. Power Syst., 25, 1142, 10.1109/TPWRS.2009.2036017 · DOI · Paper page
- Kamalov, F., Sulieman, H., Moussa, S., Avante Reyes, J., and Safaraliev, M. (2024). Powering Electricity Forecasting with Transfer Learning. Energies, 17. · DOI
- Kok, 1985, Pairwise-comparison methods in multiple objective programming, with applications in a long-term energy-planning model, Eur. J. Oper. Res., 22, 44, 10.1016/0377-2217(85)90114-6 · DOI
- Gong, 2022, The role of textual analysis in oil futures price forecasting based on machine learning approach, J. Future Mark, 42, 1987, 10.1002/fut.22367 · DOI
- Li, 2019, Text-based crude oil price forecasting: A deep learning approach, Int. J. Forecast., 35, 1548, 10.1016/j.ijforecast.2018.07.006 · DOI · Paper page
- Jiang, 2022, Investor sentiment and machine learning: Predicting the price of China’s crude oil futures market, Energy, 247, 123471, 10.1016/j.energy.2022.123471 · DOI
- Indurkhya, N., and Damerau, F. (2010). Handbook of Natural Language Processing, Chapman & Hall. [2nd ed.]. · DOI · Paper page
- Zhao, L.T., Zeng, G.R., Wang, W.J., and Zhang, Z.G. (2019). Forecasting oil price using web-based sentiment analysis. Energies, 12. · DOI
- Hutto, C.J., and Gilbert, E. (2014, January 1–4). VADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text. Proceedings of the International AAAI Conference on Web and Social Media 2014, Ann Arbor, MI, USA. · DOI · Paper page
- Nguyen, 2015, Sentiment analysis on social media for stock movement prediction, Expert Syst. Appl., 42, 9603, 10.1016/j.eswa.2015.07.052 · DOI · Paper page
- Socher, R., Perelygin, A., Wu, J., Chuang, J., Manning, C.D., Ng, A.Y., and Potts, C. (2013, January 18–21). Recursive deep models for semantic compositionality over a sentiment treebank. Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, Seattle, WA, USA.
- Santos, M.V., Morgado-Dias, F., and Silva, T.C. (2023). Oil Sector and Sentiment Analysis—A Review. Energies, 16. · DOI
- Xie, Q., Han, W., Lai, Y., Peng, M., and Huang, J. (2023). The wall street neophyte: A zero-shot analysis of chatgpt over multimodal stock movement prediction challenges. arXiv preprint.
- Ko, 2024, Can ChatGPT improve investment decisions? From a portfolio management perspective, Financ. Res. Lett., 64, 105433, 10.1016/j.frl.2024.105433 · DOI
- Li, 2021, Sentiment analysis of Chinese stock reviews based on BERT model, Appl. Intell., 51, 5016, 10.1007/s10489-020-02101-8 · DOI
- Li, 2021, Applying BERT to analyze investor sentiment in stock market, Neural Comput. Appl., 33, 4663, 10.1007/s00521-020-05411-7 · DOI
- Kheiri, K., and Karimi, H. (2023). Sentimentgpt: Exploiting GPT for advanced sentiment analysis and its departure from current machine learning. arXiv preprint.
- Breitung, C., Kruthof, G., and Müller, S. (2023). Contextualized Sentiment Analysis using Large Language Models, SSRN. · DOI
- Kamnis, 2023, Generative pre-trained transformers (GPT) for surface engineering, Surf. Coat. Technol., 466, 129680, 10.1016/j.surfcoat.2023.129680 · DOI
- Veyseh, A.P. (2021, January 1–6). Unleash GPT-2 power for event detection. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing, Bangkok, Thailand.
- Engle, 1993, Measuring and testing the impact of news on volatility, J. Financ., 48, 1749, 10.1111/j.1540-6261.1993.tb05127.x · DOI · Paper page
Cited by
Cali, U., Halden, U., Andoni, M., Catak, F. O., Chen, S., Couraud, B., Kantar, E., Knapper, S., Kucukdemiral, I., Kusetogullari, H., et al. (2026) · Artificial Intelligence Review · doi:10.1007/s10462-026-11545-2 · Cited by 18
Metadata
- Authors
- Menéndez Medina, A., & Heredia Álvaro, J. A.
- Venue
- Energies
- Publisher
- MDPI AG
- Published
- 2024-05-13
- Volume
- 17
- Issue
- 10
- Pages
- 2338
- ISSN
- 1996-1073
- Cited by
- 17
- References
- 8
- Language
- en
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.