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
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 of being in each regime at . 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 () regime’s probability () at . 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 (
) in MS models or a single-regime mean (
) to estimate the residuals (
) used in MS-GARCH model estimation. For the first case (MS models), the previous works assumed a Gaussian log-likelihood function (
) given regime
or regime
:
In the previous equation, is the time-fixed transition probability of migrating from regime to regime . This probability is estimated in an transition probability matrix . is the smoothed probability of being at regime at , and and 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 (
):
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
to estimate the MS-GARCH model:
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 ( or ), and, with the residuals of , the MS-GRCH model was estimated at .
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 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 ) scenario:
- 1.
Invest in a 1-month random-length lumber futures position in an investment position given by the forecasted probability of being in the high-volatility regime () at .
- 2.
Invest in a 3-month Treasury bill mutual fund in an investment position given by the probability of being in the low-volatility regime () at .
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 . Therefore, filtering the observed regime at leads to better forecasts of and 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 ().
- 2.
A symmetric autoregressive conditional heteroskedasticity (ARCH) variance ().
- 3.
A symmetric GARCH variance ().
- 4.
An asymmetric EGARCH [
13] variance (
).
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 () at .
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
and scale
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
could change from
to
following a first-order unobserved Markov chain process with an
transition probability matrix
. These transition probabilities, with a filtered and smoothed [
15] regime-specific probability
at
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
or
:
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 (, ).
With the -dimensional mixture law in the maximized LLF of the MS model, the analyst could also estimate a model parameter vector with an number of location and scale parameters to characterize the behavior of the time series, given the regime-specific probabilities . If the value of is high (usually ), the analyst could conclude that the realization 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 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
number of regime-specific regression models:
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
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]:
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
. 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 (
) 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 (
).
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 (
) 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
.
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 (
) 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 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 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 (
). 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 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 () 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 (). 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:
To model the general commodities futures market performance, the historical values of the Refinitiv core commodity futures index () were downloaded and transformed to the continuous time return as in (7).
Also, the historical values of the lumber futures accumulated traded volume at
, along with the open interest, were retrieved from the Refitiniv’s databases. With this two-time series, the Working’s hedge ratio (
) was estimated:
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 (
) 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 (
). 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 ().
- 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 (
, Working’s speculation ratio (
), the S&P 500 implied volatility VIX index (
), and the U.S. dollar index (
) were used as the financial market factors in the conditional mean equation:
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
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 (
) 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 (
).
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
of the MS-GARCH estimations at
:
With the time-fixed () or conditional mean () equations in (10), different residuals were estimated at . With these, twelve MS models in each scenario ( or ) 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
. If the estimation algorithm did not solve this specific MS-GARCH model at
, 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
.
To estimate the MS or MS-GARCH model at , the authors estimated the weekly continuous time return as in (7). They used the time series from 7 January 1994 to 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 (
) at
. For the ML estimation, we used the following
forecast:
In the previous expression,
is a mixing law estimated in the MS or MS-GARCH model [
3] that weights the persistence of each regime in the stochastic process.
is the regime-specific forecasted standard deviation at
.
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 (
) and tail parameters (
) for the Student’s t and GED log-likelihood functions (LLF):
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
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 (
) as in (2), (3), and (10) or an unconditional (no factor) one (arithmetic mean in (2)):
The corresponding Gaussian, Student’s t, and GED LLF functions of interest are as follows:
With the model-specific LLF functions (
) in (15) to (17), the authors estimated the model-specific (
) Akaike information criterion (AIC) as follows:
In the previous expression, is the MS, MS-ARCH, or MS-GARCH model (scenario) AIC, and this value was compared, at , 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 , , and 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 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 () 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:
In the previous equation, is the 3-month weekly equivalent rate of the 3-month USTBILL, is the observed simulated portfolio’s return or percentage variation, and 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 ) 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 (
):
In the previous expression, is the weekly percentage variation (as in (7)) of the Refinitiv core commodity index (). 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 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 (). Therefore, asymmetric EGARCH models are the best to forecast high-volatility episodes at 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
(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
. As noted, in the periods in which
, the trading algorithm closed the long positions and invested in the USTBills. Those specific periods were the high-volatility regime (
), and, in most cases, when
, 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 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 (
in (12)) and the manager’s (or algorithm’s) skill (
). If
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 () 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
of being in the high-volatility regime at
. 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
). 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
). Therefore, including these factors in the single-regime mean equation leads to residuals that better fit the regime change at
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
. Therefore, using market and behavioral factors in the mean equation to estimate the residuals (
) 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 states or regimes. Given this assumption, it is feasible to model and forecast the probability of being in each regime periods ahead.
Among several economic or financial uses, these models could be appropriate to forecast the probability of being in a high-volatility regime (
) or a calm, lower-volatility one (
). 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 () volatility of being in the high-volatility regime () in the next week () 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 () 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 (). This proved that unconditional mean MS-GARCH models are suitable for active lumber futures trading (hypothesis ).
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 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.