Next Article in Journal
Rational Involutions and an Application to Planar Systems of ODE
Previous Article in Journal
Fractional-Differential Models of the Time Series Evolution of Socio-Dynamic Processes with Possible Self-Organization and Memory
Previous Article in Special Issue
Risk Premium of Bitcoin and Ethereum during the COVID-19 and Non-COVID-19 Periods: A High-Frequency Approach
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An EM/MCMC Markov-Switching GARCH Behavioral Algorithm for Random-Length Lumber Futures Trading

by
Oscar V. De la Torre-Torres
1,
José Álvarez-García
2,* and
María de la Cruz del Río-Rama
3
1
Facultad de Contaduría y Ciencias Administrativas, Universidad Michoacana de San Nicolás de Hidalgo (UMSNH), Morelia 58000, Mexico
2
Departamento de Economía Financiera y Contabilidad, Instituto Universitario de Investigación para el Desarrollo Territorial Sostenible (INTERRA), Universidad de Extremadura, 10071 Cáceres, Spain
3
Business Management and Marketing Department, Faculty of Business Sciences and Tourism, University of Vigo, 32004 Ourense, Spain
*
Author to whom correspondence should be addressed.
Mathematics 2024, 12(3), 485; https://doi.org/10.3390/math12030485
Submission received: 6 December 2023 / Revised: 20 January 2024 / Accepted: 31 January 2024 / Published: 2 February 2024

Abstract

:
This paper tests using two-regime Markov-switching models with asymmetric, time-varying exponential generalized autoregressive conditional heteroskedasticity (MS-EGARCH) variances in random-length lumber futures trading. By assuming a two-regime context (a low s = 1 and high s = 2 volatility), a trading algorithm was simulated with the following trading rule: invest in lumber futures if the probability of being in the high-volatility regime s = 2 is lower or equal to 50%, or invest in the 3-month U.S. Treasury bills (TBills) otherwise. The rationale tested in this paper was that using a two-regime Markov-switching (MS) algorithm leads to an overperformance against a buy-and-hold strategy in lumber futures. To extend the current literature in MS trading algorithms, two location parameter scenarios were simulated. The first uses an unconditional mean or expected value (no factors), and the second incorporates market and behavioral factors. With weekly simulations form 2 January 1994 to 28 July 2023, the results suggest that using MS-EGARCH models in a no-factors scenario is appropriate for active lumber futures trading with an accumulated return of 158.33%. Also, the results suggest that it is not useful to add market and behavioral factors in the MS-GARCH estimation because it leads to a lower performance.

1. Introduction

Markov-switching (MS) models with either time-fixed or generalized autoregressive conditional heteroskedasticity (GARCH) variance (henceforth MS-GARCH models) help estimate models with non-linearities, such as breaks in the time series. These breaks lead to an s number of regimes or states of nature in the behavior of the data (stochastic process) [1,2,3,4,5].
Since the proposal to determine structural breaks in economic growth (Hamilton, 1989, 1990), MS and MS-GARCH models have helped forecast changes in time series behavior, along with the probability ξ s , t of being in each regime s at t + n . These forecasted regime-specific probabilities could be helpful in several practical applications, such as risk management (value at risk (VAR) or conditional value at risk (CVAR)), regime switch contagion among economies, securities markets, or both, and even weather forecasts.
A potential use of interest herein is security trading, given the expected market volatility conditions [6]. Since this original proposal, using these in trading algorithms is a research line in development. Trading uses such as stock or currency trading, multi-asset portfolio management, or futures trading have been tested and discussed. Among these, this paper is interested in random-length lumber futures trading. Previous studies have tested using MS-GARCH models in other agricultural commodities, such as corn, wheat, oats, soybean, coffee, cocoa, and sugar.
Random-length lumber futures trading is important in the U.S. construction industry and impacts the broad economy. It also influences the performance of other countries’ economies, given their economic ties with the U.S. and its influence on the real estate market. Several seminal studies, such as those of Hirshleifer [7] or Gan [8] discuss the ties between the producers and processors of inelastic agricultural commodities (such as lumber) and trading costs.
Like most agricultural commodities, lumber futures are subject to external economic and social shocks and speculation [8,9,10]. In several economic and financial crises (such as the 2008 subprime or the 2020 COVID-19 pandemic), lumber futures experienced growth in their settlement price due to speculation, suggesting a change in the regime of the settlement price.
This regime change could be forecasted to enhance the performance of a lumber futures trader or a portfolio manager diversified in agricultural commodities futures.
This paper aims to test the benefits of using MS-GARCH models in short-term (1-month) lumber futures trading. Previous work, as mentioned in the literature section, tests the use of these models to determine buy or sell signals to outperform either a passive (buy-and-hold) investment strategy or a future-specific benchmark.
Also, this paper aims to test trading algorithms for lumber futures’ positions in a well-diversified portfolio, such as that of an institutional investor (insurance company, pension fund, mutual fund, exchange-traded fund, or ETF). If a portfolio manager wants to diversify her portfolio with lumber futures, she could manage this position in either a passive (buy-and-hold) or active strategy with the back-tested algorithm herein. The author’s theoretical position is that this investor could enhance her lumber futures position using asymmetric MS-GARCH models due to a proper forecast of the high-volatility ( s = 2 ) regime’s probability ( ξ s = 2 , t + 1 ) at t + 1 . Therefore, comparing this trading algorithm’s performance against a well-diversified (with multiple securities) portfolio is not the main interest. The main interest is comparing against the passive or buy-an-hold position that a given portfolio manager could have in this agricultural commodity. Analogously, a lumber futures hedger could use the results in this paper to determine if an MS-GARCH trading algorithm with news sentiment and market factors could lead to better performance in her lumber production sales or inventory costs.
Previous works tested the benefit of MS and MS-GARCH models in agricultural and soft commodities futures. They found these models useful for generating alpha or active returns from a passive portfolio (or benchmark). One limitation of these works is the use of either regime-specific (no factor) expected values ( r ¯ s ) in MS models or a single-regime mean ( r ¯ t ) to estimate the residuals ( ε i ) used in MS-GARCH model estimation. For the first case (MS models), the previous works assumed a Gaussian log-likelihood function ( L L F ) given regime i or regime j :
L r t , r ¯ i , σ i , P , ξ i , t = t = 1 T j = 1 J i = 1 I π i , j ξ i , t 1 1 2 π σ i e r t r ¯ i σ i 2
In the previous equation, π i , j is the time-fixed transition probability of migrating from regime s = i to regime s = j . This probability is estimated in an s × s transition probability matrix P . ξ i , t 1 is the smoothed probability of being at regime s = i at t , and r ¯ i and σ i are the regime-specific probability density function (pdf) parameters.
The original MS model of Hamilton contemplates a conditional mean expression of (1) include the effect of exogenous variables or market factors ( x k , t ):
L r t , σ i , P , ξ i , t , α i , β i , k = t = 1 T j = 1 J i = 1 I π i , j ξ i , t 1 1 2 π σ i e r t α i + k K β i , k x k , t σ i 2
Most previous works used the time-fixed variance estimation in (1) or (2) for energy and agricultural futures price modeling. For the specific use of MS-GARCH models in agricultural futures, previous works estimated the residuals from (1) and (2). They estimated a Markov-switching model with regime changes only in the variance and symmetric or asymmetric GARCH effects. They did this because Haas and Mitnik [3,4], along with Ardia [11,12], suggest the estimation of MS-GARCH models in the residuals due to the time dependence of the GARCH process in each regime. This led to the use of the next L L F to estimate the MS-GARCH model:
L ε t , P , ξ i , t = t = 1 T j = 1 J i = 1 I π i , j ξ i , t 1 1 2 π e ε t σ i 2    
The MS-GARCH models were estimated in the works related to agricultural futures modeling or trading in a two-step process. First, the single regime mean equation was estimated ( r ¯ i or α i + k K β i , k x k , t ), and, with the residuals of r t , the MS-GRCH model was estimated at t .
As mentioned, this paper aims to extend the previous literature in two ways: first, to test the benefits of MS-GARCH models in lumber futures trading, and second, to incorporate the effect that either future market factors (such as implied volatility, speculation ratios) or behavioral ones (futures, equity, economic, social media, or pandemic sentiment) have on the estimation of the smoothed regime-specific probabilities ξ s , t and the corresponding lumber futures trading signal.
To test the benefits, this paper’s authors simulated the performance of a weekly portfolio that actively invested in lumber futures with the following trading rules in a two-volatility (standard deviation σ s ) scenario:
1.
Invest in a 1-month random-length lumber futures position in an investment position given by the forecasted probability ξ s = 2 , t + 1 of being in the high-volatility regime ( s = 2 ) at t + 1 .
2.
Invest in a 3-month Treasury bill mutual fund in an investment position given by the probability ξ s = 1 , t + 1 of being in the low-volatility regime ( s = 1 ) at t + 1 .
The authors’ theoretical position is that using this trading algorithm leads to better trading signs and portfolio performance. Departing from this position, the authors tested two working hypotheses in the following sequence:
H1: 
Using an algorithm with MS-GARCH models leads to a better performance in the 1-month lumber futures’ trading against a buy and hold strategy”.
H2: 
Using an algorithm with MS-GARCH models, futures market trading factors and market sentiment indexes leads to a better performance in the 1-month lumber futures’ trading against a buy and hold strategy and the scenario with no factors in the estimation”.
The authors’ rationale is that using MS-GARCH models with a futures market and behavioral factors in the mean equation helps improve lumber trading because the mean equation incorporates the influence in the estimated residuals ε t . Therefore, filtering the observed regime s at t leads to better forecasts of ξ s = 1 , t + 1 and ξ s = 2 , t + 1 and better performance.
To test the benefits of the MS-GARCH models of interest, the authors simulated the estimation and use of these with Gaussian, Student’s t, and generalized errors distribution (GED) probability density functions (pdf) in the LLF. Also, the authors simulated the estimation of these MS-GARCH models with four variance equations:
1
A time-fixed regime-specific variance ( σ s ).
2.
A symmetric autoregressive conditional heteroskedasticity (ARCH) variance ( ε ^ s , t 2 ).
3.
A symmetric GARCH variance ( σ ^ s , t 2 ).
4.
An asymmetric EGARCH [13] variance ( σ ^ E G A R C H , s , t 2 ).
These MS-GARCH models were estimated in four scenarios according to the working hypotheses. The mean equation used in the first sequential step of the MS-GARCH estimation method was either an arithmetic mean or a financial and/or behavioral factors model.
If the results show the benefit of using MS-GARCH models with a futures market and behavioral factors in the mean equation, a portfolio manager, a lumber hedger, or even a futures trader could benefit from the algorithm to decide if it is appropriate to have a long position in futures or not, given the forecasted low-volatility regime probability ( ξ s = 1 , t ) at t + 1 .
Given this paper’s theoretical and practical motivations, the next section highlights the most relevant and related literature reviews. The third section depicts the data gathering processing and explains the MS-GARCH model estimation procedures. In this same section, the authors discuss the main results. Finally, the fourth section concludes and suggests the guidelines for further research.

2. Literature Review

Related to the use of MS and MS-GARCH models in lumber trading, no previous works test this use. The original MS model of Hamilton [1,14] had a business cycle analysis application. It modeled the non-linear behavior of a time series which has a multimodal behavior with several regimes, states of nature, or “subsets” with their own location r ¯ s and scale σ s parameters. Even if several models could measure such behavior (such as a normal mixture or threshold autoregressive models), the novelty of Hamilton’s proposal is to assume that the behavior of the time series r t could change from t to t + 1 following a first-order unobserved Markov chain process with an s × s transition probability matrix P = [ π s = i , s = j ] . These transition probabilities, with a filtered and smoothed [15] regime-specific probability ξ s , t at t as input of a mixture LLF, such as (2) and (3), could be used to estimate or forecast the probability of being in each regime at t or t + n :
ξ s = 1 , t + n ξ s = S , t + n = P n ξ s = 1 , t + 1 ξ s = S , t
The original proposal of the MS models allows the analyst to forecast, with a multiple macroeconomics factor model, the probability of being in a recession ( s = 2 , r ¯ s = 2 < 0 ).
With the s -dimensional mixture law in the maximized LLF of the MS model, the analyst could also estimate a model parameter vector with an s number of location and scale parameters to characterize the behavior of the time series, given the regime-specific probabilities ξ s , t . If the value of ξ s , t is high (usually ξ s , t > 50 % ), the analyst could conclude that the realization r t could be generated from that regime in the stochastic process. Therefore, the corresponding regime-specific location and scale parameters could be used to make inferences of r t in that regime.
A natural extension of the MS model of Hamilton (also known as Hamilton’s filter) is to filter multivariate or conditional mean models such as MS models with an s number of regime-specific regression models:
r t = α s + k K β s , k x k , t + ε t , σ s , ε t
Other authors used factor models such as (5) or MS vector autoregression (VAR) to model the multivariate short-term relationship among variables. Kanas [16], Chen [17], Walid [18], Mouratidis [19], Walid and Nguyen [20], and Tiwari et al. [21] used MS-VAR to model the relationship of currency rates with either the expectations of stock market fundamentals, the central bank monetary policy, or a volatility contagion from equity markets.
Camacho and Perez-Quiros [22] performed an impulse-response MS estimation of the relationship between the commodity prices and output growth of Argentina, Brazil, Colombia, Chile, Mexico, and Venezuela. The authors found a size, time, and sign dependency of commodity prices on their country output. Similarly, Fossati [23] characterized the regime-specific behavior (two regimes) of the economic growth rates of Argentina, Brazil, Chile, Colombia, Mexico, and Peru, finding evidence of such a structural break. Miles and Vijverberg [24] tested the relationship between inflation and uncertainty in the UK and the U.S. and found, with their MS model estimation, that inflation targets and a proper budget lowered uncertainty in distress periods.
One assumption of the original MS model is that the scale parameter σ s is time fixed. This assumption could be relaxed by estimating a time-varying variance with Engle’s autoregressive conditional heteroskedasticity (ARCH) model [25], or Bollerslev’s generalized version (GARCH) [26]:
σ ^ t = α + p = 1 P β p ε t p + q = 1 Q γ q σ ^ t q + ν t
The analyst could model and even forecast a time-varying volatility that could be high in uncertain or distressed market periods and converge to its long-term value in calm ones. This model led to several uses, such as risk management of financial derivatives valuation. This time-varying property in (6) MS and MS VAR models was extended to an ARCH or GARCH version (MS-GARCH) in σ s . Following this approach, Lopes and Nunes [27] tested for currency market contagion between the Portuguese escudo and the Spanish peseta. Shen and Holmes [28] tested the regime-switching behavior of the real exchange rate (purchasing power parity) of Australia, China, Hong Kong, Indonesia, Japan, South Korea, Malaysia, New Zealand, Philippines, Singapore, Taiwan, and Thailand.
From all the economic and financial analysis applications of MS and MS-GARCH models, the test of regime-specific behavior, risk management, and market contagion in financial markets is one of the broadest.
Ardia and Hoogerheide [29] estimated symmetric and asymmetric MS-GARCH models of constituents of the S&P500 stock index for the value at risk (VaR) and conditional value at risk (CVaR) with daily and weekly estimations. The authors found no difference in estimating the VaR and CVaR daily or weekly when using asymmetric MS-GARCH models and found a better estimation with asymmetric MS-GARCH models.
Ye et al. [30] performed a Markov-switching quantile regression to test the contagion between U.S. and Eurozone equity markets. The authors found a strong interdependence between the U.S. and Eurozone markets in high-volatility or distress ( s = 2 ) periods.
Rotta and Valls Pereira [31] estimated an MS correlation matrix with the method proposed by Pelletier [32] to test for contagion effects in the Brazilian, Korean, UK, and U.S. stock indexes. The authors found that using an MS-GARCH correlation matrix with the asymmetric GARCH model of Glosten, Jagannathan, and Runkle [33] (GJR-GARCH) helps to model the contagion effect. Also, the authors found that the highest contagion effect is in the high-volatility or distress periods ( s = 2 ).
The use of MS and MS-GARCH models in commodity futures markets was mainly tested in the influence or spillover effect that these have from and on equity markets, the estimation of hedge ratios, the long-term relationship between the futures and spot prices, or risk exposure models (VaR or CVaR).
Herrera et al. [34] estimated a Markov-switching multifractal-peaks over threshold (MSM-POT) model for the presence of short- and long-term memory in commodities such as the Brent and West Texas intermediate (WTI) oil futures, and the cocoa and cotton, and copper and gold ones. The rationale of these authors was that commodity markets are a good diversification source for portfolio managers, and to model this tail dependence and switching tail behavior is of interest to capture and manage that diversification benefit.
This last statement is a departing one for the hypotheses tested herein. Commodities are considered “alternative assets” for diversification purposes and the active trading of the lumber futures position in an institutional portfolio could be useful. Therefore, the MS-GARCH trading algorithm tested herein could be helpful for this purpose.
In the energy futures markets (mainly oil and natural gas) Balcilar et al. [35] and Fang and You [36] tested the impact of oil prices in the business cycle of the U.S., those in some developed countries, and also those in some emerging countries in a two-regime context. The authors found that oil harms the output in the low-growth phase ( s = 2 ) of oil importers. Also, they found this regime to be short lived. The higher the oil price, the lower the output of these economies; this relationship is higher when s = 2 .
Hache and Lantz [37] estimated a Markov-switching vector error correction (MS-VEC) to model the long-term relationship between the spot and future prices of the WTI. The authors concluded that there is a two-regime behavior (normal and crisis). They concluded that the activity of non-commercial traders (speculators) has a strong relationship with the crisis ( s = 2 ) regime in oil markets.
Alizadeh et al. [38] used MS models to estimate the two-regime hedge ratios in the WTI oil market, finding these useful models to hedge spot positions in oil with short-term futures.
Another set of previous works [39,40,41,42,43,44,45] tested the link or the spillover effect between the energy future markets (oil, natural gas, or electricity) and stock markets or economies of G-7 countries such as France, Germany, the UK, or the U.S. These used several MS models such as MS-GARCH, MS-VAR, MS-VEC, the hidden Markov decision tree or the MS-EGARCH (an MS model with the asymmetric GARCH model of Nelson [13]). In a parallel practice, Brigida [40] tested the cointegration of natural gas and oil prices in a two-regime context. The author found a long-term relationship between these two commodities, suggesting that the forecast of each commodity’s value should be performed in a regime-specific context and that the “decoupling” periods between both futures are due to a regime shift in their cointegration relationship.
The previous works on using MS or MS-GARCH models in agricultural commodities are not as abundant as those on the energy ones. Still, the work of Lien et al. [46] proposes a Markov-switching version of the Baba, Engle, Kraft, and Kroner (BEKK) GARCH covariance model to develop a hedge ratio of the corn, wheat, coffee, and cocoa futures markets. The MS-BEKK GARCH models led to a better performance in a portfolio that hedged the futures of these commodities in a two-regime context.
Ahmed and Sarkodie [47], Foroni et al. [48], and Xiao et al. [49] modeled the performance of agricultural and energy prices with the impact of news sentiment related to economic policy uncertainty [50] and pandemic news (COVID-19) sentiment. All these authors found that agricultural and energy commodities are negatively affected by an increase in economic policy-related uncertainty, and only the agricultural ones had a bad performance when the bad sentiment related to news of COVID-19 increased.
Given the scant literature about using news sentiment in pricing or trading, it is in the authors’ interests to test the inclusion of several news sentiment indexes in the MS-GARCH trading algorithm. They implemented this in the second hypothesis to test the potential benefit of including such behavioral factors.
There is scant literature on subjects related to agricultural commodity futures MS or MS-GARCH trading rules or algorithms like that of Brooks and Persand [6]. Only the works of De la Torre-Torres et al. [51] and De la Torre-Torres et al. [52] tested the use of MS and MS-GARCH trading rules in the corn, wheat, oats, soybean, cocoa, and coffee futures. The authors found that using these models leads to an overperformance of active trading in these futures against a buy-and-hold or directional investment in these commodities.
Related to the specific case of lumber futures, only the work of Chen and Insley [53] tested the use of MS models in lumber futures not for trading but to calibrate their two-regime performance in a harvest and land model in the lumber industry.
As noted from this literature review, only one study tested the benefits of the MS model for harvesting management purposes, and no study tests their use in lumber futures trading or hedging activities. It is important to know if the MS or MS-GACRH models are useful in lumber futures trading because they are used for diversification security due to their low correlation with other markets. Also, future prices have an important impact on building, furniture, paper or other sensitive industries. A proper hedging algorithm that could forecast high-volatility regimes could be useful to hedge and forecast the probability of these at t + 1 and the corresponding value of this commodity.
As noted from this gap in the literature, there are no works related to testing the use of any algorithm in lumber futures trading and no works related to using the MS-GARCH model (with or without financial and behavioral factors).
Departing from this practical need, this paper tests the use of the MS and MS-GARCH models in a two-regime context in the following trading rules:
1.
Hold a long position in lumber futures if the forecasted probability ξ s = 2 , t + 1 of being in the high-volatility regime is lower or equal to 50%.
2.
Invest in a risk-free asset (the U.S. 3-month Treasury bill) if this probability is higher than 50%.
Departing from the previous literature review, the main contributions of this paper include testing this trading algorithm in lumber futures and the addition of a multifactor equation with market and behavioral factors.
The estimation of the MS-GARCH model with either the E-M or Markov chain Monte Carlo (MCMC) method is impossible with a location parameter due to time path dependence. Therefore, Haas et al. [3] and Ardia et al. [11] suggest MS-GARCH estimation in residuals or a time series with zero location parameters ( ε t = r t r ¯ ). With this adjustment, the impact of external shocks and factors, such as speculators’ presence, pandemic news, or economic policy uncertainty, cannot be estimated in a two-regime context.
The relevance of incorporating market factors in a trading rule comes from the results of Kenyon et al. [54], Van Huellen [55], Alquist and Gervais [56], and Floros and Salvador [57]. These works proved that factors such as Working’s speculation ratio [58] or other volatility indicators, such as equity options-implied volatilities or energy (oil)-implied volatility.
Also, extending a model with “classical” factors to include behavioral ones is a natural extension that behavioral economics suggests due to the not-so-rational behavior of market agents, consumers, and suppliers in a given economy. With this purpose, this paper also extends the literature by estimating the MS-GARCH model of the trading algorithm in a two-step process:
1.
Estimate the factor mean equation of the lumber futures price increase percentage with market and behavioral factors.
2.
With the residuals of the previous model, estimate the two-regime MS-GARCH model and forecast the probability ξ s = 2 , t of being in the high-volatility regime at t + 1.
Departing from these theoretical and practical motivations, this paper also tested using three log-likelihood functions (LLF): symmetric Gaussian, Student’s t, and generalized error (GED) distributions. Also, the paper tested the use of Engle’s symmetric [25] ARCH and Bollerslev’s [59] GARCH models, along with the asymmetric version of Nelson’s [13] (EGARCH). The authors believe that using asymmetric GARCH leads to better trading and hedging performance. This means testing the performance of the trading rule against a buy-and-hold one and against a producer that did not hedge its sales.
A final improvement tested in this paper is the combination of E-M and Metropolis–Hastings MCMC estimations of the MS-GARCH model. The authors tested this because they were looking for efficient but feasible estimation of these models, due to their potential use in risk management applications (in the financial industry practice) which need speed and confidence in their estimation methods.
With regard to this literature review and given the theoretical and practical motivations, the next section details how the authors gathered the data and performed the simulations, and shows the main results and findings.

3. Trading Simulations

3.1. Data Gathering

To simulate the performance of a lumber futures trader that uses MS or MS-GARCH models, the authors retrieved from the databases of Refinitiv and the Chicago mercantile exchange (CME) the historical 1-month weekly settle prices ( P t ) of the random-length lumber (Refinitiv RIC LBc1). From the same databases, the authors extracted the weekly yield of the 3-month U.S. Treasury bill (USTBills). The former time series is a risky asset used for trading. The weekly value of the latter is a risk-free asset used in trading simulations ( r f t ). The time series of both securities started on 7 January 1994 and ended on 28 July 2023.
With the historical settle prices, the continuous time return, or percentage variation, was estimated as follows:
r t = ln P t ln P t 1
To model the general commodities futures market performance, the historical values of the Refinitiv core commodity futures index ( c o m m I n d e x t ) were downloaded and transformed to the continuous time return as in (7).
Also, the historical values of the lumber futures accumulated traded volume at t , along with the open interest, were retrieved from the Refitiniv’s databases. With this two-time series, the Working’s hedge ratio ( W H R t ) was estimated:
W H R t = a c u m u l a t e d   v o l u m e t o p e n   i n t e r e s t t
The higher the value of this ratio, the higher the presence of speculators in the lumber futures market, because of the higher trading volume compared to the open interest.
To incorporate the impact of distress, the uncertainty of “fear” in the financial markets, the authors downloaded the observed values of the implied volatility index ( V I X t ) of the in-the-money and at-the-money 1-month options of the S&P500 stock index. Also, they downloaded the historical percentage variations of the Refinitiv U.S. dollar index ( D X Y t ). The authors included these factors following studies like [39,40,41,42,43,44,45] which proved the spillover effect and mutual influence of equity and currency markets on commodities.
With these factors, the simulations could be performed in two scenarios:
1.
One in which the MS-GARCH models are estimated from the residuals of a time-fixed location parameter ( r ¯ ).
2.
Another in which the location parameter is a conditional mean of financial markets and behavioral factors.
For the second scenario, the commodity market index ( c o m m I n d e x t ) , Working’s speculation ratio ( W H R t ), the S&P 500 implied volatility VIX index ( V I X t ), and the U.S. dollar index ( D X Y t ) were used as the financial market factors in the conditional mean equation:
r ^ t = α + β 1 c o m m I n d e x t + β 2 W H R t + β 3 V I X t + β 4 D X Y t + ε t = α + F + ε t
The reason for using these factors relates to several works that suggest the main market factors for pricing in agricultural futures [54,57,60,61].
For the behavioral or sentiment (uncertainty) factors, the weekly historical values of three sentiment (uncertainty) indexes were downloaded:
1.
The Baker, Bloom, and Davis [50] Global Economic policy uncertainty E C U N C t index which measures the level of fear or uncertainty that the text of the main journals around the world in their articles. If the count of terms such as economic policy, financial markets, or related concatenate with the presence of other terms such as crisis, fear, or similar terms, the value of this index increases. This is a proxy of the uncertainty or fear investors or economic agents could have due to reading these journal articles.
2.
The Baker et al. [62] infectious disease equity market volatility tracker ( I N F D I S U N C t ) which is an uncertainty index with an emphasis on the influence of news and terms related to infectious diseases and epidemic (or pandemic) episodes.
3.
The Baker and Burgler [63] stock market volatility tracker ( M K T V U N C t ).
With these three sentiment or behavioral factors, the conditional mean equation in (9) was extended to arrive at the final conditional mean equation used to estimate the residuals ε t of the MS-GARCH estimations at t :
r ^ t = α + F + γ 1 E C U N C t + γ 2 I N F D I S U N C t + M K T V U N C t + ε t
With the time-fixed ( r ¯ ) or conditional mean ( r ^ t ) equations in (10), different residuals were estimated at t . With these, twelve MS models in each scenario ( r ¯ or r ^ t ) were estimated:
  • A time-fixed variance MS model, symmetric ARCH, GARCH variances, and the EGARCH one with normal or Gaussian LLF.
  • A time-fixed variance MS model, symmetric ARCH, GARCH variances, and the EGARCH one with Student’s t LLF.
  • A time-fixed variance MS model, symmetric ARCH, GARCH variances, and the EGARCH one with GED LLF.
To test a potential solution to enhance speed and feasibility in the estimation, the authors tested the MS-GARCH with the E-M algorithm using the Viterbi [64] algorithm to estimate the smoothed probabilities ξ s , t . If the estimation algorithm did not solve this specific MS-GARCH model at t , then the MCMC method was used. The authors performed this sequential two MS-GARCH estimation method to ensure a fast but also feasible estimation of ξ s , t .
To estimate the MS or MS-GARCH model at t , the authors estimated the weekly continuous time return as in (7). They used the time series from 7 January 1994 to t = the simulated week. The weekly simulations started from 2 January 2004 to 28 July 2023 (1022 weeks).
To execute the trading rule and simulations, the next trading rule’s pseudo code was estimated for each location parameter scenario and for the MS or MS-GARCH model:
Algorithm 1 The steps followed in the simulation of each of the twelve simulated portfolios of the lumber futures trading rule.
Loop 1: for t = 7 January 1994 to 28 July 2023 (t in weekly periods and T)
1. To estimate the weekly continuous time return of the settle price of the 1-month lumber futures as in (7) from January 7 1994 to date t.
Loop 2: for l = the Gaussian, Student’s t or GED LLF
Loop 3: for m = the MS, MS-ARCH, MS-GARCH or MS-GARCH model
2. With the weekly lumber returns’ time series to estimate the two-regime MS (time-fixed variance) or MS-GARCH model with the E-M algorithm.
3. Is the MS or MS-GARCH estimation feasible?
3.a. No: With the weekly lumber returns’ time series to estimate the two-regime MS (time-fixed variance) or MS-GARCH model with the MCMC algorithm.
3.b. Yes: To continue with the next step.
4. With the estimated model to forecast the probability of being in the second regime the next week (t + 1), using (4).
5. To run the trading rule:
5.a. if ξS = 2,t + 1 ≤ 50%: To take a long lumber futures position. This means a 100% investment position in lumber futures.
5.b. Else: To invest the portfolio resources in a security that pays the weekly return of the 3-month U.S. Treasury bill. This also means a 100% investment position in this security.
End loop 3
End loop 2
End
The previous pseudo code was executed in the two location types of location parameters (unconditional mean or conditional mean with market and behavioral factors).
We tested Algorithm 1 in the three pdfs of interest in symmetric and asymmetric time-fixed ARCH and GARCH variances. To check the robustness of each scenario and as an alternative estimation method, the authors estimated a “best fitting” scenario. This scenario uses the MS-GARCH probability forecast of the model with the best Akaike [] information criterion. Because we estimated the Ms and MS-GARCH models in sequence (we used the ML method for algorithmic efficiency and the MCMC if the ML was not feasible), we propose a pseudo-Akaike from the forecasted standard deviation ( σ ^ t + 1 ) at t + 1 . For the ML estimation, we used the following σ ^ t + 1 forecast:
σ ^ t + 1 = π s = 1 σ ^ s = 1 , t + 1 + π s = 2 σ ^ s = 2 , t + 1
In the previous expression, π s is a mixing law estimated in the MS or MS-GARCH model [3] that weights the persistence of each regime in the stochastic process. σ ^ s = 1 , t + 1 is the regime-specific forecasted standard deviation at t + 1 .
For the MCMC estimation, the Ardia et al. [11] MSGARCH library uses MCMCM draws for this parameter.
From the estimation of the MS and MS-GARCH models, the authors also used the regime-specific fitted degrees of freedom ( t ν t + 1 ) and tail parameters ( g e d ν t + 1 ) for the Student’s t and GED log-likelihood functions (LLF):
t λ t + 1 = π s = 1 t λ s = 1 , t + 1 + π s = 2 t λ s = 2 , t + 1
g e d λ t + 1 = π s = 1 g e d λ s = 1 , t + 1 + π s = 2 g e d λ s = 2 , t + 1
With the parameters in (11) to (13), the authors estimated the LLF functions for the Gaussian, Student’s t, and GED models. The values of σ ^ t + 1 are calculated from a time-fixed, ARCH, or GARCH (symmetric or asymmetric) model. Also, it is important to mention that the LLF was estimated from the residuals, using a factor conditional mean ( r ^ t ) as in (2), (3), and (10) or an unconditional (no factor) one (arithmetic mean in (2)):
ε t = r t r ^ t
The corresponding Gaussian, Student’s t, and GED LLF functions of interest are as follows:
L L F ^ G a u s s i a n = t = 1 T l n 1 2 π σ ^ t + 1 e 1 2 ε t σ ^ t + 1 2  
L L F ^ S t u d e n t   t = t = 1 T l n Γ t λ t + 1 + 1 2 ( t λ t + 1 2 ) π t λ t + 1 2 1 + ε t σ ^ t + 1 t λ t + 1 2 t λ t + 1 2 2        
L L F ^ G E D = t = 1 T l n g e d λ t + 1 e 1 2 ε t σ ^ t + 1 λ g e d λ t + 1 λ 2 1 + 1 g e d λ t + 1 Γ 1 g e d λ t + 1 ,     λ = Γ 1 g e d λ t + 1 4 1 / g e d λ t + 1 Γ 3 g e d λ t + 1
With the model-specific LLF functions ( L L F ^ ( ) ) in (15) to (17), the authors estimated the model-specific ( m ) Akaike information criterion (AIC) as follows:
A I C m = 2 k 2 L L F ^ ( )
In the previous expression, A I C m is the MS, MS-ARCH, or MS-GARCH model (scenario) AIC, and this value was compared, at t , to select the “best fitting” model or scenario according to which one had the lowest AIC. With this best fitting model, the authors performed steps 4 and 5 in Algorithm 1. This selection process ensured the best data fitting model selection even if the MS or MS-GARCH model was estimated with ML or MCMC methods.
The reason for using this pseudo-Akaike selection method is that the ML quickly infers the AIC from the data and the sample or classical fitting process. The MCMC uses a deviance information (DIC) criterion with a Bayesian context. Therefore, the steps that led to the AIC in (18) could be helpful, given that σ ^ t + 1 , t λ t + 1 , and g e d λ t + 1 come from a specific MS or MS-GARCH models and are filtered (or inferred (simulated) for the case of MCMC) from the sample data or their population parameters (MCMC).
This best fitting scenario was labeled as “Best fitting” in the simulated portfolios.
At the end of each simulated date, the simulated portfolio was marked to market. That is, it was valued with either the lumber futures settle price at t or the market price of the fund that paid the 3-month U.S. Treasury bill rate. No future trading fees were incorporated in the simulations.
The authors’ theoretical position was that the use of the MS or MS-GARCH models in Algorithm 1 leads to a higher accumulated return to a speculator or investor. Also, the theoretical position is that the use of market and behavioral factors leads to a better performance compared to using a no-factor MS or MS-GARCH model and compared to a buy-and-hold (passive or directional) one.
To summarize the performance of the simulated portfolios, the accumulated return ( A c c r e t u r n % ) was estimated and expressed as a base 100 value on 2 January 2004. The base 100 value of the simulated portfolio was compared with that of the lumber futures settle prices (the passive or buy-and-hold strategy).
It was also compared with the portfolio and lumber futures percentage variation according to the Sharpe [65] ratio:
S R = A c c r e t u r n % p A c c r e t u r n % r f σ p
In the previous equation, r f t is the 3-month weekly equivalent rate of the 3-month USTBILL, r p , t is the observed simulated portfolio’s return or percentage variation, and σ p , t is the standard deviation of the full simulation portfolio returns (risk exposure). The rationale of the Sharpe ratio (as a slope in a risk–return two-axis plane) is the risk premium (additional return from r f t ) the portfolio paid for each 1% of extra risk exposure. The higher the Sharpe ratio value, the better the performance of the portfolio against others with lower Sharpe ratio values.
To complement the accuracy of the trading decisions in each simulated portfolio, the authors summarized the performance with Jensen’s [66] alpha. This performance measure estimates the extra return that the simulated portfolio paid against the general commodity market performance, given the manager’s (algorithm) ability and the portfolio’s market exposure or beta ( β ):
α = r t β r m , t  
In the previous expression, r m , t is the weekly percentage variation (as in (7)) of the Refinitiv core commodity index ( c o m m I n d e x t ). This index is a proxy of the performance of all the commodity (agricultural, energy, and metals) futures in the U.S. derivative exchanges. The rationale of (12) is that if the trading algorithm leads to a better performance than expected in the portfolio due to commodity market movements, the value of α p , t should be higher. Therefore, the higher the α value, the better the portfolio performance due to active management with the algorithm.
Once the simulation pseudo code and its assumptions have been detailed, the results will be presented first for the no-factor MS and MS-GARCH models, followed by those with market and behavioral factors.

3.2. Simulation Results for the Arithmetic Mean (No-Factor) MS and MS-GARCH Models

For the scenario where the single-regime location parameter is a no-factor or unconditional mean, Table 1 summarizes the performance of the nine simulated portfolios and the buy-and-hold (passive) strategy. As noted, the passive strategy (last line of Table 1) paid an accumulated return of 7.13% in the 1022-week period. This equals 0.34% in yearly terms.
The simulated portfolios using the MS (time-fixed variance) models for high-volatility period forecasts are the ones that showed the lowest accumulated returns. The ones using Gaussian and GED LLFs paid a negative accumulated return. The one using a GED LLF with an asymmetric time-varying EGARCH variance paid the highest accumulated return out of all the simulated portfolios. These results show that incorporating asymmetries in the time-varying variance (or risk exposure), along with the fat tail in the LLF’s pdf, fits better to forecast the presence, persistence, and fading of future high-volatility periods ( s = 2 ). Therefore, asymmetric EGARCH models are the best to forecast high-volatility episodes at t + 1 ,     l e a d i n g to better sell signs for a lumber futures trader.
As Table 1 and a portfolio performance perspective noted, the best-performing portfolio does not lead to the best risk–return (mean-variance) efficiency (the symmetric GARCH, GED one does). Still, it is the second portfolio in the risk–return trade-off. The best-performing portfolio paid a positive Jensen’s alpha of 0.32% (weekly return), and the symmetric GARCH GED one paid a 0.05% alpha.
From Table 1, the authors conclude that Hypothesis H 1 (the performance of the simulated portfolios is better in a no-factors strategy than a buy-and-hold one) is true in the GED asymmetric MS-GARCH model.
Figure 1 depicts the historical performance of the nine simulated portfolios against a buy-and-hold strategy. As noted, the Ged MS-EGARCH portfolio (purple line) performs best.
This review of Table 1 and Figure 1 suggests that using GED MS-EGARCH models could lead to a better performance than using a buy-and-hold strategy. A review of Figure 2 explains the results in this portfolio. The second subplot suggests that the GED MS-EGARCH model accurately forecasts the probability of being in the high-probability regime t + 1 . As noted, in the periods in which ξ s = 2 , t + 1 > 50 % , the trading algorithm closed the long positions and invested in the USTBills. Those specific periods were the high-volatility regime ( s = 2 ), and, in most cases, when ξ s = 2 , t + 1 > 50 % , the lumber futures had lower settlement prices.
Even if the algorithm did not use directional trading signs (that is, it did not forecast if prices would increase or decrease), the proper high-volatility regime forecast, due to a time-varying EGARCH variance in the LLF, led to more accurate sell trading signals.
By contrasting the performance of the time-fixed variance MS model portfolios, these could create value because the sell trading signs lasted until the high-volatility period ended. Because the EGARCH volatility is appropriate to forecast asymmetric (mainly negative) shocks in the time series, the MS-EGARCH model was more accurate to forecast S = 2 and create a sell trading signal. Therefore, there were fewer weeks invested in the risk-free asset (USTbills) in this portfolio than in the ones using the MS model.
These first results align with the previous works that tested the use of MS-GARCH models in agricultural commodities trading [51,52]. In those papers, using Gaussian or Student’s t symmetric M-GARCH models led to an overperformance against the buy-and-hold strategy in commodities such as corn, cocoa, and coffee. Those works did not incorporate the use of asymmetric EGARCH variances. Therefore, this paper aligns with the previous literature about using MS-ARCH or MS-GARCH models for commodity trading and extends these by showing the use of MS-EGARCH in an unconditional or arithmetic mean scenario.
Despite this, a result should be highlighted in Table 1: only three portfolios had a marginally positive Jensen’s alpha. When a portfolio adds value to the investor, this value is due to market fluctuations ( β r m , t in (12)) and the manager’s (or algorithm’s) skill ( α = r t β r m , t ). If α > 0 by a significant amount, the portfolio manager or algorithm was accurate in estimating an extra pay return against the market performance.
In the case of this paper’s simulations, the benchmark or market portfolio was the entire commodity futures market (including energy and metals). The authors used this benchmark because even if the present simulations use the lumber futures as a security of interest, the performance of this commodity relies on the general asset-type demand from investors or speculators. Since commodity futures are a natural diversification security, the general commodity futures market’s benchmark (the Refinitiv core commodity index) was the market factor of interest herein.
As noted in Table 1, the buy-and-hold strategy in the 1-month lumber futures led to an underperformance of −0.13% (negative Jensen’s alpha) against the general commodity futures market. The GED MS-GARCH and MS-EGARCH are the only portfolios that paid a marginal alpha in the simulations. This suggests that the trading algorithm performs better than the buy-and-hold strategy but pays negligible active returns against the broad commodity futures markets.
A potential solution to this issue is to add factors in the MS-GARCH estimations. Because MS-GARCH models are feasible only with the estimation of the scale parameters, the following subsection shows the simulations with the conditional or factor (market and behavioral) mean equation.

3.3. Simulation Results for the Market and Behavioral Factor Mean Equation with MS and MS-GARCH Models

In this scenario, the MS and MS-GARCH models were estimated with the residuals ( ε t ) of the market and behavioral factor equation in (10).
Table 2 summarizes the performance of the simulated portfolios, and Figure 3 shows the historical performance of the simulated portfolios (as in Figure 2).
As noted from Table 2, the accumulated returns suggest a better performance only in the ones using the MS models if the market and behavioral factors are present in the mean Equation (12). The theoretical expectation was that using these factors could lead to better modeling of the regime change and forecast the probability ξ s = 2 , t + 1 of being in the high-volatility regime at t + 1 . Contrary to this expectation, using market and behavioral factors led to an underperformance in the MS-GARCH simulated portfolios. Their accumulated returns are lower than those in Table 1 (arithmetic mean in the location parameter to estimate the residuals ε t ). Also, only the Student’s t and GED MS portfolios paid a positive Jensen’s alpha.
Similarly to Table 1, the best-performing portfolio had a better risk–return profile, but as Figure 3 suggests, this better performance is only due to recent short-term smoothed probability ξ_(s = 2,t) changes in 2020 (the COVID-19 crisis). In that period, commodity futures saw an important price increase and a subsequent fall. In this period, MS models, due to their soft regime change, suggest investing in the USTbills. Only in this period did the algorithm lead to accurate sell signals that explain this overperformance of MS portfolios against the MS-GARCH ones.
From Table 2, the authors could conclude that using financial (market) and behavioral factors to estimate the MS-GARCH models leads to a better performance than the simulated portfolios in the no-factor scenario and the buy-and-hold strategy (Hypothesis H 2 ). Therefore, including these factors in the single-regime mean equation leads to residuals that better fit the regime change at t + 1 and a better trading sign in lumber futures trading.
Following Figure 3, that conclusion is not valid. As noted, the use of the trading algorithm did not add value to the simulated portfolio until the 2020 period. For practically every week (as in Figure 1 and Figure 3), the portfolio remained invested in lumber futures, and during the 2008 U.S. financial markets crisis, invested in the U S T B i l l s . Therefore, using market and behavioral factors in the mean equation to estimate the residuals ( ε _ t ) of the MS or MS-GARCH models does not add value to the portfolio. This conclusion is supported by the lower Jensen’s alpha in Table 2. The values of these portfolios are lower than those in Table 1. In conclusion, using factors (financial or behavioral) does not enhance portfolio management in the trading algorithms of interest.
In this simulation scenario, the Student’s t MS portfolio has the highest accumulated return (282.32%). The MS-GARCH portfolios in these simulations performed similarly to the MS-GARCH of the previous scenario (arithmetic mean). Figure 4 depicts the performance of the Student’s t MS portfolio.

4. Concluding Remarks

A big challenge in active portfolio management or security trading activities is determining the right time to buy or sell the security of interest. Active portfolio management aims to earn a higher return than a buy-and-hold strategy in that same security.
To determine a proper buy-and-sell trading signal, Markov-switching (MS) with time-fixed variance (MS) models and their time-varying generalized autoregressive conditional heteroskedasticity variance (MS-GARCH) version are useful to detect breaks and regimes of behavior in financial and economic time series. These models assume that a given time series is modeled with a hidden first-order Markov chain of s states or regimes. Given this assumption, it is feasible to model and forecast the probability ξ s , t + n of being in each regime n periods ahead.
Among several economic or financial uses, these models could be appropriate to forecast the probability of being in a high-volatility regime ( s = 2 ) or a calm, lower-volatility one ( s = 1 ). Given these probabilities, a trader could buy (hold) or sell the security of interest. This original proposal is due to Brooks and Persand [6]. Since that study, several applications of MS and MS-GARCH models for trading have been tested, and little has been written about using these models in agricultural commodity trading. Most of all, no attention has been given to using MS models in lumber trading, an important commodity in real estate and general U.S. and global economies.
This paper fills this gap by testing the use of MS and MS-GARCH models (with symmetric and asymmetric variances) in lumber trading. It also extends the current literature on trading with Markov-switching models by adding market and behavioral factors in the location (conditional mean) parameter. The factors included the return of the commodity futures market given with the Refinitiv core commodity’s index return minus the weekly rate of the 3-month U.S. Treasury bills (USTBills), the value of the S&P 500 at-the-money and in-the-money 1-month options implied volatility index (VIX), the Refinitiv U.S. dollar index, and the Working’s speculation ratio (lumber futures’ accumulated volume against its open interest). The behavioral factors included in the simulations were the uncertainty or fear indexes given by the U.S. economic policy uncertainty index [50], the U.S. stock market volatility news tracker [62], and the infectious disease news volatility tracker [63].
With these MS and MS-GARCH models, the Hypotheses 1 and 2 were tested:
Nine portfolios were simulated to test these hypotheses and the usefulness of MS-GARCH models. Each portfolio used two-regime time-fixed variance MS models, MS-GARCH, or MS-EGARCH models with symmetric Gaussian, Student’s t, and generalized error distribution (GED) log-likelihood functions (LLF). Each portfolio, in a weekly analysis and rebalancing, executed the next trading rule:
1.
Take a long position in the 1-month lumber futures if the probability ( ξ s = 2 , t + 1 ) volatility of being in the high-volatility regime ( s = 2 ) in the next week ( t + 1 ) is lower than or equal to 50%.
2.
Invest in a 3-month U.S. Treasury bill (USTBills) fund otherwise.
The theoretical position was to test that using MS-GARCH models is useful to create alpha or overperformance (against a buy-and-hold strategy) in two scenarios: one using the unconditional mean to estimate MS-GARCH models and another in which the conditional mean uses market and behavioral factors.
To estimate the MS, MS-GARCH, or MS-EGARCH models, the authors used the weekly historical continuous time returns ( r t ) of the 1-month lumber futures from January 7 1994 to the simulated week’s date. Also, each week, either the expectation–maximization (E-M) or the Markov Chain Monte Carlo (MCMC) method was used.
The nine portfolios were simulated in two scenarios: one in which the location parameter was an unconditional mean and another in which the conditional mean was estimated with the market and behavioral factors. In each scenario, the estimated residuals were different due to the impact and potential directionality of the factors.
The results in the scenario with no factors showed that using GED asymmetric MS-EGARCH models in the trading algorithm leads to a better performance (158.33%) than that of a passive buy-and-hold strategy. This performance is explained with the proper sell trading signals that the algorithm suggested, given the more accurate forecast of the high-volatility regime’s probability ( ξ s = 2 , t + 1 ). This proved that unconditional mean MS-GARCH models are suitable for active lumber futures trading (hypothesis H 1 ).
In the scenario that includes the market and behavioral factors in the location parameter (mean), there is no better performance of the simulated portfolios against the results of the previous (no factor) scenario. The best-performing portfolio uses a time-fixed Student’s t MS model, and the overperformance is due to extreme volatility during the 2020 COVID-19 period. Therefore, the performance of the other simulated portfolios (such as the GED MS-EGARCH) leads to an overperformance against a buy-and-hold strategy but adds less value than their no-factor scenario counterparts. These results conclude that hypothesis H 2 does not hold, and using behavioral or financial factors does not add to the estimation’s data set and improve the performance in active lumber futures trading.
The main conclusion of this research is that using GED MS-EGARCH models with no factors in the location parameter is the best solution to create active returns (a return higher than that of the buy-and-hold strategy) in the 1-month lumber futures. This result aligns with previous works that suggest that using MS-GARCH or MS-GARCH models is useful in agricultural commodity futures trading.
As a guideline for further research, the authors suggest using other methods to forecast the future direction of the forecasted return. MS-GARCH models can be estimated only with a scale (standard deviation) parameter due to path dependency in their inference. As a result, a regime change in the location (expected return) cannot be incorporated.
Also, the use of MS-GARCH models in pair trading of lumber or other agricultural futures’ term curve could be interesting, along with the pair trading of these futures against other securities such as stocks or volatility futures.

Author Contributions

Conceptualization, data gathering, simulations, numerical tests, methodology, formal analysis, investigation, writing—original draft preparation, and writing—review and editing, O.V.D.l.T.-T., J.Á.-G. and M.d.l.C.d.R.-R. All authors have read and agreed to the published version of the manuscript.

Funding

This publication has been funded by the Consejería de Economía, Ciencia y Agenda Digital de la Junta de Extremadura and by the European Regional Development Fund of the European Union through the reference grant GR21161 and by the Coordinación de la Investigación Científica at Universidad Michoacana de San Nicolás de Hidalgo, Morelia, Michoacán, México.

Data Availability Statement

The simulation and test results data presented in this study are available upon request to the corresponding author. The input data used herein are not publicly available, given the financial database user agreement restrictions. The input data presented herein can be found on public financial websites.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Hamilton, J.D. A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle. Econometrica 1989, 57, 357–384. [Google Scholar] [CrossRef]
  2. Hamilton, J.D.; Susmel, R. Autoregressive Conditional Heteroskedasticity and Changes in Regime. J. Econom. 1994, 64, 307–333. [Google Scholar] [CrossRef]
  3. Haas, M.; Mittnik, S.; Paolella, M.S. A New Approach to Markov-Switching GARCH Models. J. Financ. Econom. 2004, 2, 493–530. [Google Scholar] [CrossRef]
  4. Haas, M.; Mittnik, S.; Paolella, M.S. Mixed Normal Conditional Heteroskedasticity. J. Financ. Econom. 2004, 2, 211–250. [Google Scholar] [CrossRef]
  5. Haas, M.; Liu, J.-C. A Multivariate Regime-Switching GARCH Model with an Application to Global Stock Market and Real Estate Equity Returns. Stud. Nonlinear Dyn. Econom. 2018, 22, 20160019. [Google Scholar] [CrossRef]
  6. Brooks, C.; Persand, G. The Trading Profitability of Forecasts of the Gilt–Equity Yield Ratio. Int. J. Forecast. 2001, 17, 11–29. [Google Scholar] [CrossRef]
  7. Hirshleifer, D. Investor Psychology and Asset Pricing. J. Financ. 2001, 56, 1533–1597. [Google Scholar] [CrossRef]
  8. Gan, J.; Tian, N.; Choi, J.; Pelkki, M.H. Synchronized Movement between US Lumber Futures and Southern Pine Sawtimber Prices and COVID-19 Impacts. Can. J. For. Res. 2022, 52, 614–621. [Google Scholar] [CrossRef]
  9. Ederington, L.H.; Lee, J.H. How Markets Process Information: News Releases and Volatility. J. Financ. 1993, 48, 1161–1191. [Google Scholar] [CrossRef]
  10. Patton, A.J.; Sheppard, K. Good Volatility, Bad Volatility: Signed Jumps and The Persistence of Volatility. Rev. Econ. Stat. 2015, 97, 683–697. [Google Scholar] [CrossRef]
  11. Ardia, D. Financial Risk Management with Bayesian Estimation of GARCH Models; Springer: Berlin/Heidelberg, Germany, 2008; Volume 612. [Google Scholar]
  12. Ardia, D.; Bluteau, K.; Boudt, K.; Catania, L. Forecasting Risk with Markov-Switching GARCH Models:A Large-Scale Performance Study. Int. J. Forecast. 2018, 34, 733–747. [Google Scholar] [CrossRef]
  13. Nelson, D.B. Conditional Heteroskedasticity in Asset Returns: A New Approach. Econometrica 1991, 59, 347–370. [Google Scholar] [CrossRef]
  14. Hamilton, J.D. Analysis of Time Series Subject to Changes in Regime. J. Econom. 1990, 45, 39–70. [Google Scholar] [CrossRef]
  15. Kim, C.-J. Dynamic Linear Models with Markov-Switching. J. Econom. 1994, 60, 1–22. [Google Scholar] [CrossRef]
  16. Kanas, A. Regime Linkages between the Mexican Currency Market and Emerging Equity Markets. Econ. Model. 2005, 22, 109–125. [Google Scholar] [CrossRef]
  17. Chen, S.-S. Revisiting the Interest Rate-Exchange Rate Nexus: A Markov-Switching Approach. J. Dev. Econ. 2006, 79, 208–224. [Google Scholar] [CrossRef]
  18. Walid, C.; Chaker, A.; Masood, O.; Fry, J. Stock Market Volatility and Exchange Rates in Emerging Countries: A Markov-State Switching Approach. Emerg. Mark. Rev. 2011, 12, 272–292. [Google Scholar] [CrossRef]
  19. Mouratidis, K.; Kenourgios, D.; Samitas, A.; Vougas, D. Evaluating Currency Crises: A Multivariate Markov Regime Switching Approach. Manch. Sch. 2013, 81, 33–57. [Google Scholar] [CrossRef]
  20. Walid, C.; Nguyen, D.K. Exchange Rate Movements and Stock Market Returns in a Regime-Switching Environment: Evidence for BRICS Countries. Res. Int. Bus. Financ. 2014, 31, 46–56. [Google Scholar] [CrossRef]
  21. Tiwari, A.K.; Albulescu, C.T.; Gupta, R. Time–Frequency Relationship between US Output with Commodity and Asset Prices. Appl. Econ. 2016, 48, 227–242. [Google Scholar] [CrossRef]
  22. Camacho, M.; Perez-Quiros, G. Commodity Prices and the Business Cycle in Latin America: Living and Dying by Commodities? Emerg. Mark. Financ. Trade 2014, 50, 110–137. [Google Scholar] [CrossRef]
  23. Fossati, S. Output Growth and Structural Reform in Latin America: Have Business Cycles Changed? Contemp. Econ. Policy 2017, 35, 62–75. [Google Scholar] [CrossRef]
  24. Miles, W.; Vijverberg, C.-P. Formal Targets, Central Bank Independence and Inflation Dynamics in the UK: A Markov-Switching Approach. J. Macroecon. 2011, 33, 644–655. [Google Scholar] [CrossRef]
  25. Engle, R. Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation. Econometrica 1982, 50, 987–1007. [Google Scholar] [CrossRef]
  26. Bollerslev, T. Generalized Autorregresive Conditional Hetersoskedasticity. J. Econom. 1986, 31, 307–327. [Google Scholar] [CrossRef]
  27. Lopes, J.M.; Nunes, L.C. A Markov Regime Switching Model of Crises and Contagion: The Case of the Iberian Countries in the EMS. J. Macroecon. 2012, 34, 1141–1153. [Google Scholar] [CrossRef]
  28. Shen, X.; Holmes, M.J. Do Asia-Pacific Stock Prices Follow a Random Walk? A Regime-Switching Perspective. Appl. Econ. Lett. 2013, 21, 189–195. [Google Scholar] [CrossRef]
  29. Ardia, D.; Hoogerheide, L.F. GARCH Models for Daily Stock Returns: Impact of Estimation Frequency on Value-at-Risk and Expected Shortfall Forecasts. Econ. Lett. 2014, 123, 187–190. [Google Scholar] [CrossRef]
  30. Ye, W.; Zhu, Y.; Wu, Y.; Miao, B. Markov Regime-Switching Quantile Regression Models and Financial Contagion Detection. Insur. Math. Econ. 2016, 67, 21–26. [Google Scholar] [CrossRef]
  31. Rotta, P.N.; Valls Pereira, P.L. Analysis of Contagion from the Dynamic Conditional Correlation Model with Markov Regime Switching. Appl. Econ. 2016, 48, 2367–2382. [Google Scholar] [CrossRef]
  32. Pelletier, D. Regime Switching for Dynamic Correlations. J. Econom. 2006, 131, 445–473. [Google Scholar] [CrossRef]
  33. Glosten, L.; Jaganathan, R.; Runkle, D.E. On the Relation between the Expected Value and the Volatility of the Nominal Excess Return on Stocks. J. Financ. 1993, 48, 1779–1801. [Google Scholar] [CrossRef]
  34. Herrera, R.; Rodriguez, A.; Pino, G. Modeling and Forecasting Extreme Commodity Prices: A Markov-Switching Based Extreme Value Model. Energy Econ. 2017, 63, 129–143. [Google Scholar] [CrossRef]
  35. Balcilar, M.; van Eyden, R.; Uwilingiye, J.; Gupta, R. The Impact of Oil Price on South African GDP Growth: A Bayesian Markov Switching-VAR Analysis. Afr. Dev. Rev. 2017, 29, 319–336. [Google Scholar] [CrossRef]
  36. Fang, C.-R.; You, S.-Y. The Impact of Oil Price Shocks on the Large Emerging Countries’ Stock Prices: Evidence from China, India and Russia. Int. Rev. Econ. Financ. 2014, 29, 330–338. [Google Scholar] [CrossRef]
  37. Hache, E.; Lantz, F. Speculative Trading and Oil Price Dynamic: A Study of the WTI Market. Energy Econ. 2013, 36, 334–340. [Google Scholar] [CrossRef]
  38. Alizadeh, A.H.; Nomikos, N.K.; Pouliasis, P.K. A Markov Regime Switching Approach for Hedging Energy Commodities. J. Bank. Financ. 2008, 32, 1970–1983. [Google Scholar] [CrossRef]
  39. Balcilar, M.; Ozdemir, A.Z. The Causal Nexus between Oil Prices and Equity Market in the U.S.: A Regime Switching Model. Energy Econ. 2013, 39, 271–282. [Google Scholar] [CrossRef]
  40. Charlot, P.; Marimoutou, V. On the Relationship between the Prices of Oil and the Precious Metals: Revisiting with a Multivariate Regime-Switching Decision Tree. Energy Econ. 2014, 44, 456–467. [Google Scholar] [CrossRef]
  41. Khalfaoui, R.; Boutahar, M.; Boubaker, H. Analyzing Volatility Spillovers and Hedging between Oil and Stock Markets: Evidence from Wavelet Analysis. Energy Econ. 2015, 49, 540–549. [Google Scholar] [CrossRef]
  42. Roubaud, D.; Arouri, M. Oil Prices, Exchange Rates and Stock Markets under Uncertainty and Regime-Switching. Financ. Res. Lett. 2018, 27, 28–33. [Google Scholar] [CrossRef]
  43. Hou, C.; Nguyen, B.H. Understanding the US Natural Gas Market: A Markov Switching VAR Approach. Energy Econ. 2018, 75, 42–53. [Google Scholar] [CrossRef]
  44. Aloui, C.; Jammazi, R. The Effects of Crude Oil Shocks on Stock Market Shifts Behaviour: A Regime Switching Approach. Energy Econ. 2009, 31, 789–799. [Google Scholar] [CrossRef]
  45. Zachmann, G. A Stochastic Fuel Switching Model for Electricity Prices. Energy Econ. 2013, 35, 5–13. [Google Scholar] [CrossRef]
  46. Lien, D.; Lee, H.-T.; Sheu, H.-J. Hedging Systematic Risk in the Commodity Market with a Regime-Switching Multivariate Rotated Generalized Autoregressive Conditional Heteroskedasticity Model. J. Futur. Mark. 2018, 38, 1514–1532. [Google Scholar] [CrossRef]
  47. Ahmed, M.Y.; Sarkodie, S.A. COVID-19 Pandemic and Economic Policy Uncertainty Regimes Affect Commodity Market Volatility. Resour. Policy 2021, 74, 102303. [Google Scholar] [CrossRef] [PubMed]
  48. Foroni, B.; Morelli, G.; Petrella, L. The Network of Commodity Risk. Energy Syst. 2022, 1–47. [Google Scholar] [CrossRef]
  49. Xiao, D.; Su, J.; Ayub, B. Economic Policy Uncertainty and Commodity Market Volatility: Implications for Economic Recovery. Environ. Sci. Pollut. Res. 2022, 29, 60662–60673. [Google Scholar] [CrossRef]
  50. Baker, S.R.; Bloom, N.; Davis, S.J. Economic Policy Uncertainty Index. Available online: https://www.policyuncertainty.com/index.html (accessed on 28 September 2020).
  51. De la Torre-Torres, O.V.; Aguilasocho-Montoya, D.; de la Cruz del Río-Rama, M. A Two-Regime Markov-Switching GARCH Active Trading Algorithm for Coffee, Cocoa, and Sugar Futures. Mathematics 2020, 8, 1001. [Google Scholar] [CrossRef]
  52. De la Torre-Torres, O.V.; Aguilasocho-Montoya, D.; Álvarez-García, J.; Simonetti, B. Using Markov-Switching Models with Markov Chain Monte Carlo Inference Methods in Agricultural Commodities Trading. Soft Comput. 2020, 24, 13823–13836. [Google Scholar] [CrossRef]
  53. Chen, S.; Insley, M. Regime Switching in Stochastic Models of Commodity Prices: An Application to an Optimal Tree Harvesting Problem. J. Econ. Dyn. Control 2012, 36, 201–219. [Google Scholar] [CrossRef]
  54. Kenyon, D.; Kling, K.; Jordan, J.; Seale, W.; McCabe, N. Factors Affecting Agricultural Futures Price Variance. J. Futur. Mark. 1987, 7, 73–91. [Google Scholar] [CrossRef]
  55. van Huellen, S. Price Discovery in Commodity Futures and Cash Markets with Heterogeneous Agents. J. Int. Money Financ. 2019, 95, 1–13. [Google Scholar] [CrossRef]
  56. Alquist, R.; Gervais, O. The Role of Financial Speculation in Driving the Price of Crude Oil. Energy J. 2013, 34, 35–54. [Google Scholar] [CrossRef]
  57. Floros, C.; Salvador, E. Volatility, Trading Volume and Open Interest in Futures Markets. Int. J. Manag. Financ. 2016, 12, 629–653. [Google Scholar] [CrossRef]
  58. Working, H. A Random-Difference Series for Use in the Analysis of Time Series. J. Am. Stat. Assoc. 1934, 29, 11–24. [Google Scholar] [CrossRef]
  59. Bollerslev, T. Moddeling the Coherence in Short-Run Nominal Exchange Rates: A Multivariate Generalized ARCH Model. Rev. Econ. Stat. 1990, 72, 498–505. [Google Scholar] [CrossRef]
  60. Sanders, D.R.; Irwin, S.H.; Merrin, R.P. The Adequacy of Speculation in Agricultural Futures Markets: Too Much of a Good Thing? Appl. Econ. Perspect. Policy 2010, 32, 77–94. [Google Scholar] [CrossRef]
  61. Staugaitis, A.J. The Effect of Diary Futures Trading Activity on Their Price Volatility: Literature Review. Sci. Stud. Account. Financ. Probl. Perspect. 2019, 13, N1. [Google Scholar] [CrossRef]
  62. Baker, S.R.; Bloom, N.; Davis, S.J.; Kost, K.; Sammon, M.; Viratyosin, T. The Unprecedented Stock Market Reaction to COVID-19. Rev. Asset Pricing Stud. 2020, 10, 742–758. [Google Scholar] [CrossRef]
  63. Baker, M.; Wurgler, J. Investor Sentiment in the Stock Market. J. Econ. Perspect. 2007, 21, 129–151. [Google Scholar] [CrossRef]
  64. Viterbi, A. Error Bounds for Convolutional Codes and an Asymptotically Optimum Decoding Algorithm. IEEE Trans. Inf. Theory 1967, 13, 260–269. [Google Scholar] [CrossRef]
  65. Sharpe, W. Mutual Fund Performance. J. Bus. 1966, 39, 119–138. [Google Scholar] [CrossRef]
  66. Michael, C. Jensen Problems in Selection of Security Portfolios the Performance of Mutual Funds in the Period 1945–1964. J. Financ. 1968, 23, 389–416. [Google Scholar]
Figure 1. The historical performance of the simulated portfolios in a no-factors scenario.
Figure 1. The historical performance of the simulated portfolios in a no-factors scenario.
Mathematics 12 00485 g001
Figure 2. The timing and detail of the historical performance of the MS-EGARCH simulated portfolio in a no-factors scenario.
Figure 2. The timing and detail of the historical performance of the MS-EGARCH simulated portfolio in a no-factors scenario.
Mathematics 12 00485 g002
Figure 3. The historical performance of the simulated portfolios in the market and behavioral factors scenario.
Figure 3. The historical performance of the simulated portfolios in the market and behavioral factors scenario.
Mathematics 12 00485 g003
Figure 4. The timing and detail of the historical performance of the Student’s t MS simulated portfolio in the market and behavioral factors scenario.
Figure 4. The timing and detail of the historical performance of the Student’s t MS simulated portfolio in the market and behavioral factors scenario.
Mathematics 12 00485 g004
Table 1. Summary of the simulated portfolios’ base 100 values in the no-factor scenario.
Table 1. Summary of the simulated portfolios’ base 100 values in the no-factor scenario.
Simulated PortfolioAccumulated Return (%)Risk (Standard Deviation %)Sharpe RatioJensen’s Alpha (%)
MS with norm pdf−52.9371.33−0.061−0.1
MS with tStud pdf22.3421.429−0.005−0.034
MS with GED pdf−20.0891.434−0.034−0.076
MS-GARCH with norm pdf147.7592.2160.0520.011
MS-GARCH with tStud pdf86.1492.0360.027−0.028
MS-GARCH with GED pdf151.031.9020.0620.05
MS-EGARCH with norm pdf126.5952.2030.043−0.008
MS-EGARCH with tStud pdf68.632.1640.018−0.06
MS-EGARCH with GED pdf158.3332.130.0590.032
Buy-and-hold (passive portfolio)7.1322.282−0.01−0.135
Best-fitting strategy66.3822.28217.656−0.077
Table 2. Summary of the simulated portfolios’ base 100 values in the market and behavioral factors scenario.
Table 2. Summary of the simulated portfolios’ base 100 values in the market and behavioral factors scenario.
Simulated PortfolioAccumulated Return (%)Risk (Standard Deviation %)Sharpe RatioJensen’s Alpha (%)
MS with norm pdf144.8472.2820.0490
MS with tStud pdf282.3281.9840.1250.169
MS with GED pdf216.1612.0920.0870.092
MS-GARCH with norm pdf144.8472.2820.0490
MS-GARCH with tStud pdf91.4382.2330.027−0.046
MS-GARCH with GED pdf92.6182.2120.028−0.043
MS-EGARCH with norm pdf144.8472.2820.0490
MS-EGARCH with tStud pdf131.6542.2760.044−0.012
MS-EGARCH with GED pdf123.4752.2730.04−0.02
Buy-and-hold (passive portfolio)7.1322.282−0.01−0.135
Best-fitting strategy123.8482.28241.792−0.02
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

De la Torre-Torres, O.V.; Álvarez-García, J.; del Río-Rama, M.d.l.C. An EM/MCMC Markov-Switching GARCH Behavioral Algorithm for Random-Length Lumber Futures Trading. Mathematics 2024, 12, 485. https://doi.org/10.3390/math12030485

AMA Style

De la Torre-Torres OV, Álvarez-García J, del Río-Rama MdlC. An EM/MCMC Markov-Switching GARCH Behavioral Algorithm for Random-Length Lumber Futures Trading. Mathematics. 2024; 12(3):485. https://doi.org/10.3390/math12030485

Chicago/Turabian Style

De la Torre-Torres, Oscar V., José Álvarez-García, and María de la Cruz del Río-Rama. 2024. "An EM/MCMC Markov-Switching GARCH Behavioral Algorithm for Random-Length Lumber Futures Trading" Mathematics 12, no. 3: 485. https://doi.org/10.3390/math12030485

APA Style

De la Torre-Torres, O. V., Álvarez-García, J., & del Río-Rama, M. d. l. C. (2024). An EM/MCMC Markov-Switching GARCH Behavioral Algorithm for Random-Length Lumber Futures Trading. Mathematics, 12(3), 485. https://doi.org/10.3390/math12030485

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop