IDEAS home Printed from https://ideas.repec.org/a/spr/digfin/v5y2023i1d10.1007_s42521-022-00069-3.html
   My bibliography  Save this article

Forecasting the term structure of commodities future prices using machine learning

Author

Listed:
  • Mario Figueiredo

    (Instituto de Matemática Pura e Aplicada)

  • Yuri F. Saporito

    (Getulio Vargas Foundation)

Abstract

We consider the dynamic Nelson–Siegel and the Schwartz–Smith three-factor models for future price curves. We study the prediction of the 1-day ahead prices of the entire curve for each model, using two different approaches: ordinary least squares (OLS) and filtering. For the dynamic Nelson–Siegel, we test the random walk, VAR and models based on long short-term memory (LSTM), including a filtering approach using LSTM. For the Schwartz–Smith model, we use the equations given by no-arbitrage assumptions. We also test a model that tries to predict the prices directly from the curve, which we refer to as basic model. We exemplify our approach using Brent, WTI and Copper future prices. We show that the dynamic Nelson–Siegel was the best model for fitting the data, and that the LSTM and VAR methods under the OLS approach generated the best forecasts.

Suggested Citation

  • Mario Figueiredo & Yuri F. Saporito, 2023. "Forecasting the term structure of commodities future prices using machine learning," Digital Finance, Springer, vol. 5(1), pages 57-90, March.
  • Handle: RePEc:spr:digfin:v:5:y:2023:i:1:d:10.1007_s42521-022-00069-3
    DOI: 10.1007/s42521-022-00069-3
    as

    Download full text from publisher

    File URL: http://link.springer.com/10.1007/s42521-022-00069-3
    File Function: Abstract
    Download Restriction: Access to the full text of the articles in this series is restricted.

    File URL: https://libkey.io/10.1007/s42521-022-00069-3?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    References listed on IDEAS

    as
    1. Diebold, Francis X. & Li, Canlin & Yue, Vivian Z., 2008. "Global yield curve dynamics and interactions: A dynamic Nelson-Siegel approach," Journal of Econometrics, Elsevier, vol. 146(2), pages 351-363, October.
    2. Christensen, Jens H.E. & Diebold, Francis X. & Rudebusch, Glenn D., 2011. "The affine arbitrage-free class of Nelson-Siegel term structure models," Journal of Econometrics, Elsevier, vol. 164(1), pages 4-20, September.
    3. Diebold, Francis X. & Li, Canlin, 2006. "Forecasting the term structure of government bond yields," Journal of Econometrics, Elsevier, vol. 130(2), pages 337-364, February.
    4. Aiube, Fernando Antonio Lucena & Baidya, Tara Keshar Nanda & Tito, Edison Americo Huarsaya, 2008. "Analysis of commodity prices with the particle filter," Energy Economics, Elsevier, vol. 30(2), pages 597-605, March.
    5. Eduardo Schwartz & James E. Smith, 2000. "Short-Term Variations and Long-Term Dynamics in Commodity Prices," Management Science, INFORMS, vol. 46(7), pages 893-911, July.
    6. Baruník, Jozef & Malinská, Barbora, 2016. "Forecasting the term structure of crude oil futures prices with neural networks," Applied Energy, Elsevier, vol. 164(C), pages 366-379.
    7. Durbin, James & Koopman, Siem Jan, 2012. "Time Series Analysis by State Space Methods," OUP Catalogue, Oxford University Press, edition 2, number 9780199641178, Decembrie.
    8. Ramaprasad Bhar & Damien Lee, 2011. "Time‐varying market price of risk in the crude oil futures market," Journal of Futures Markets, John Wiley & Sons, Ltd., vol. 31(8), pages 779-807, August.
    9. Ghoddusi, Hamed & Creamer, Germán G. & Rafizadeh, Nima, 2019. "Machine learning in energy economics and finance: A review," Energy Economics, Elsevier, vol. 81(C), pages 709-727.
    10. Panapakidis, Ioannis P. & Dagoumas, Athanasios S., 2016. "Day-ahead electricity price forecasting via the application of artificial neural network based models," Applied Energy, Elsevier, vol. 172(C), pages 132-151.
    11. Ricardo P. Masini & Marcelo C. Medeiros & Eduardo F. Mendes, 2023. "Machine learning advances for time series forecasting," Journal of Economic Surveys, Wiley Blackwell, vol. 37(1), pages 76-111, February.
    12. Schwartz, Eduardo S, 1997. "The Stochastic Behavior of Commodity Prices: Implications for Valuation and Hedging," Journal of Finance, American Finance Association, vol. 52(3), pages 923-973, July.
    13. Kleppe, Tore Selland & Liesenfeld, Roman & Moura, Guilherme Valle & Oglend, Atle, 2022. "Analyzing Commodity Futures Using Factor State-Space Models with Wishart Stochastic Volatility," Econometrics and Statistics, Elsevier, vol. 23(C), pages 105-127.
    14. Gibson, Rajna & Schwartz, Eduardo S, 1990. "Stochastic Convenience Yield and the Pricing of Oil Contingent Claims," Journal of Finance, American Finance Association, vol. 45(3), pages 959-976, July.
    15. Peng, Lu & Liu, Shan & Liu, Rui & Wang, Lin, 2018. "Effective long short-term memory with differential evolution algorithm for electricity price prediction," Energy, Elsevier, vol. 162(C), pages 1301-1314.
    16. Jammazi, Rania & Aloui, Chaker, 2012. "Crude oil price forecasting: Experimental evidence from wavelet decomposition and neural network modeling," Energy Economics, Elsevier, vol. 34(3), pages 828-841.
    17. Brennan, Michael J & Schwartz, Eduardo S, 1985. "Evaluating Natural Resource Investments," The Journal of Business, University of Chicago Press, vol. 58(2), pages 135-157, April.
    18. Villaplana Conde, Pablo, 2003. "Pricing power derivatives: a two-factor jump-diffusion approach," DEE - Working Papers. Business Economics. WB wb031805, Universidad Carlos III de Madrid. Departamento de Economía de la Empresa.
    19. Samuel Hikspoors & Sebastian Jaimungal, 2007. "Energy Spot Price Models And Spread Options Pricing," International Journal of Theoretical and Applied Finance (IJTAF), World Scientific Publishing Co. Pte. Ltd., vol. 10(07), pages 1111-1135.
    20. Niels S. GrØnborg & Asger Lunde, 2016. "Analyzing Oil Futures with a Dynamic Nelson‐Siegel Model," Journal of Futures Markets, John Wiley & Sons, Ltd., vol. 36(2), pages 153-173, February.
    21. Ding, Yishan, 2018. "A novel decompose-ensemble methodology with AIC-ANN approach for crude oil forecasting," Energy, Elsevier, vol. 154(C), pages 328-336.
    22. Nelson, Charles R & Siegel, Andrew F, 1987. "Parsimonious Modeling of Yield Curves," The Journal of Business, University of Chicago Press, vol. 60(4), pages 473-489, October.
    23. Gonzalo Cortazar & Lorenzo Naranjo, 2006. "An N‐factor Gaussian model of oil futures prices," Journal of Futures Markets, John Wiley & Sons, Ltd., vol. 26(3), pages 243-268, March.
    24. Fernando Antonio Lucena Aiube & Carlos Patricio Samanez, 2014. "On the comparison of Schwartz and Smith's two- and three-factor models on commodity prices," Applied Economics, Taylor & Francis Journals, vol. 46(30), pages 3736-3749, October.
    25. Yingrui Zhou & Taiyong Li & Jiayi Shi & Zijie Qian, 2019. "A CEEMDAN and XGBOOST-Based Approach to Forecast Crude Oil Prices," Complexity, Hindawi, vol. 2019, pages 1-15, February.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Max F. Schöne & Stefan Spinler, 2017. "A four-factor stochastic volatility model of commodity prices," Review of Derivatives Research, Springer, vol. 20(2), pages 135-165, July.
    2. Shao, Chengwu & Bhar, Ramaprasad & Colwell, David B., 2015. "A multi-factor model with time-varying and seasonal risk premiums for the natural gas market," Energy Economics, Elsevier, vol. 50(C), pages 207-214.
    3. Bredin, Don & O'Sullivan, Conall & Spencer, Simon, 2021. "Forecasting WTI crude oil futures returns: Does the term structure help?," Energy Economics, Elsevier, vol. 100(C).
    4. Fernando Antonio Lucena Aiube & Ariel Levy, 2019. "Recent movement of oil prices and future scenarios [Movimentos recentes dos preços do petróleo e os cenários futuros]," Nova Economia, Economics Department, Universidade Federal de Minas Gerais (Brazil), vol. 29(1), pages 223-248, January-A.
    5. Horváth, Lajos & Liu, Zhenya & Rice, Gregory & Wang, Shixuan, 2020. "A functional time series analysis of forward curves derived from commodity futures," International Journal of Forecasting, Elsevier, vol. 36(2), pages 646-665.
    6. Thomas Deschatre & Olivier F'eron & Pierre Gruet, 2021. "A survey of electricity spot and futures price models for risk management applications," Papers 2103.16918, arXiv.org, revised Jul 2021.
    7. Chris Brooks & Marcel Prokopczuk, 2013. "The dynamics of commodity prices," Quantitative Finance, Taylor & Francis Journals, vol. 13(4), pages 527-542, March.
    8. Baruník, Jozef & Malinská, Barbora, 2016. "Forecasting the term structure of crude oil futures prices with neural networks," Applied Energy, Elsevier, vol. 164(C), pages 366-379.
    9. Butler, Sunil & Kokoszka, Piotr & Miao, Hong & Shang, Han Lin, 2021. "Neural network prediction of crude oil futures using B-splines," Energy Economics, Elsevier, vol. 94(C).
    10. Siem Jan Koopman & Max I.P. Mallee & Michel van der Wel, 2007. "Analyzing the Term Structure of Interest Rates using the Dynamic Nelson-Siegel Model with Time-Varying Parameters," Tinbergen Institute Discussion Papers 07-095/4, Tinbergen Institute.
    11. Power, Gabriel J. & Eaves, James & Turvey, Calum & Vedenov, Dmitry, 2017. "Catching the curl: Wavelet thresholding improves forward curve modelling," Economic Modelling, Elsevier, vol. 64(C), pages 312-321.
    12. Bianchi, Robert J. & Fan, John Hua & Miffre, Joëlle & Zhang, Tingxi, 2023. "Exploiting the dynamics of commodity futures curves," Journal of Banking & Finance, Elsevier, vol. 154(C).
    13. Cheng, Benjamin & Nikitopoulos, Christina Sklibosios & Schlögl, Erik, 2018. "Pricing of long-dated commodity derivatives: Do stochastic interest rates matter?," Journal of Banking & Finance, Elsevier, vol. 95(C), pages 148-166.
    14. Liyang Tang, 2020. "Application of Nonlinear Autoregressive with Exogenous Input (NARX) neural network in macroeconomic forecasting, national goal setting and global competitiveness assessment," Papers 2005.08735, arXiv.org.
    15. Gao, Xin & Li, Bingxin & Liu, Rui, 2023. "The relative pricing of WTI and Brent crude oil futures: Expectations or risk premia?," Journal of Commodity Markets, Elsevier, vol. 30(C).
    16. Anh Ngoc Lai & Constantin Mellios, 2016. "Valuation of commodity derivatives with an unobservable convenience yield," Post-Print halshs-01183166, HAL.
    17. Deschatre, Thomas & Féron, Olivier & Gruet, Pierre, 2021. "A survey of electricity spot and futures price models for risk management applications," Energy Economics, Elsevier, vol. 102(C).
    18. Aiube, Fernando Antonio Lucena & Faquieri, Winicius Botelho, 2019. "Can Gaussian factor models of commodity prices capture the financialization phenomenon?," The North American Journal of Economics and Finance, Elsevier, vol. 50(C).
    19. W. Keener Hughen, 2010. "A maximal affine stochastic volatility model of oil prices," Journal of Futures Markets, John Wiley & Sons, Ltd., vol. 30(2), pages 101-133, February.
    20. Cortazar, Gonzalo & Lopez, Matias & Naranjo, Lorenzo, 2017. "A multifactor stochastic volatility model of commodity prices," Energy Economics, Elsevier, vol. 67(C), pages 182-201.

    More about this item

    Keywords

    Future prices; Forecasting; Deep learning; Commodities; Dynamic Nelson–Siegel; Schwartz–Smith model;
    All these keywords.

    JEL classification:

    • G17 - Financial Economics - - General Financial Markets - - - Financial Forecasting and Simulation
    • C14 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General - - - Semiparametric and Nonparametric Methods: General
    • G13 - Financial Economics - - General Financial Markets - - - Contingent Pricing; Futures Pricing

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:spr:digfin:v:5:y:2023:i:1:d:10.1007_s42521-022-00069-3. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.springer.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.