# Research on the Performance of the Trend Following Trading Strategy in the Chinese Commodity Market

Authors: Anran Xie; Yichong Huang; Yian Bian; Shucen Zhao; Jiaxin Lin
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

Trend following strategy is a popular strategy that investors often use in trading around the world. Stocks are bought during an upswing and sold during a decline, the two main phases of the trend-following trading technique. This research evaluates the performance of the trend-following strategy in the Chinese commodity market by systematically employing quantitative methods to trade and get back test results for performance evaluation. The main trading indicator for this research is DMAC (Dual Moving Average Crossover) with a trend indicator called ADX for adjustment. As a kind of technical analysis, so-called “Dual Moving Average Crossovers” are often cited as providing reliable signs for discerning future stock price movements. By employing these indicators and systematically backtesting on 21 commodity futures for ten years, the research discovers that DMAC does not perform well (negative annualized return and sharpe ratio) from 2011 to 2021. By refining the strategy which is to replace DMAC with MACD (Moving Average Convergence/Divergence) and abandon ADX, the backtest result performs much better. The refinement suggests that the utilization of different trading signals/indicators will lead to a different performance of the trend following strategy in the Chinese commodity market. The research concludes that the trend following strategy is worthy of exploring in the Chinese commodity market in terms of using different trading indicators.


---

## Body

## 1. Introduction

The trend-following strategy has always been one of the eternal themes of quantitative investing whose main idea is to follow the trend, which can be told by the relative position of the short period and a long period moving average lines. Since short-period MA is more sensitive to the market price than long-period MA, the short-period MA going up through the long-period MA suggests a positive price momentum and vice versa. According to herd behavior, after some traders jump on the bandwagon when a trend occurs, other people would follow and trade collectively, which prolongs the trade [1]. Also, as confirmation bias suggests, people are willing to interpret and favor information in a way that supports their prior beliefs. Investors tend to buy assets that have recently made money, and sell assets that have declined, causing trends to continue [2]. Therefore, the strategy believes that past relative performance will continue in the future, resulting in above-average returns. And in view of its past performance, the strategy is quite profitable, as it generates a mean return of 43%, although the volatility of 75% is a little bit high [3]. Trend following strategy works best for quiet (comparably low volatility) and trending markets since it’s hard to catch the trend in a highly volatile market. For this reason, the commodity market is preferable to stock markets [4] as commodities show a stronger tendency to trend than stocks. U. S commodity market is more mature compared to the Chinese market, but the maturity may lead to a crowdedness in the trading environment which may lower the performance. China’s commodity trading history is short, but it is growing rapidly, and as a major producer and consumer of commodities, China’s futures market has great potential for development [5]. Consequently, in the work, this study chooses to trade commodities in the Chinese market using the trend-following strategy.Since China’s commodity trade is still in its infancy, there is not that much research about commodity trading in China, and China’s market national condition is different from the U. S, it’s hard to tell whether the same trading strategy can have the same performance in two markets. This research mainly focuses on testing the effectiveness of the Trend-Following strategy in the Chinese commodity market. Presently researchers are proposing the use of machine learning [6] and deep learning [7] techniques for the prediction of trading. The balance of this paper is organized as follows: portfolio construction, data collection, and other microstructure issues are detailed in Section 2. The results and the analysis of the backtest are reported in Section 3, and the refinement is displayed in Section 4. This study concludes some key points about the project in Section 5, also including further concerns and recommendations.


## 2. Systematic Trading Background

### 2.1. Overview

As a subset of the trend-following strategy, Dual Moving Average Crossover (DMAC) strategy uses the difference between STMA and LTMA as trading signals, which can be calculated explicitly and instantly. Therefore, all the periodic construction of portfolios and the execution of trades for this strategy can be implemented through predefined programming algorithms without investor’s intervention. In this study, to systematically simulate the strategy performance, all transactions are made by programming following the DMAC trading rules. With initial capital being CNY100,000,000, the team establishes a comprehensive framework to account for trending strengths and market neutrality in portfolio construction. The rules of trading are specified in the next part.


### 2.2. Trading Rules

#### 2.2.1. Trading Signal

For each kind of commodity, trading signal is the difference between the moving averages of the closing prices of the past 20 days (MA20) and 60 days (MA60) before the day that the strategy opens a position, given by:(1)MA20=1/20∗P1+P2+⋯+P20MA60=1/60∗P1+P2+⋯+P60signal=MA20−MA60


#### 2.2.2. Portfolio Construction

Trading signals are evaluated daily to capture profit opportunities. For each contract in the universe, if the signal is positive, a long position will be taken, and if the signal is negative, a short position will be taken. Subsequently, the position for a contract will be closed if its price crosses its MA20 in the opposite direction as its open signal. Additionally, on each roll-date, all old contracts in the portfolio will be replaced with new ones, keeping the position for the commodity unchanged.To determine the size of each trade, the team applies a modified version of equal weighting to construct the portfolio. On the first trading day of every month, the portfolio is rebalanced by allocating an equal amount of capital to each contract in the universe, based on which the trading amount for each contract at each trade is further adjusted by a trend indicator, average directional index (ADX), calculated as follows:(2)+DI=smoothed+DMATR×100−DI=smoothed−DMATR×100DX=+DI−−DI+DI+−DI×100ADX=PriorADX×13+CurrentDX14where:
(3)ADX1=0+DMDirectionalMovement=CurrentHigh−PreviousHigh−DM=PreviousLow−CurrentLowSmoothed+/−DM=∑t=114DM−∑t=114DM14+CurrentDMCDM=CurrentDMATR=AverageTrueRangeRanging from 0 to 100, ADX differentiates weak trends from strong trends, which helps the strategy accommodate investment sizes according to the prevailing trend strengths. Everytime the trading signal occurs, ADX for the corresponding contract is evaluated simultaneously. If ADX is larger than 50, all the allocated capital for this contract would be used to trade, while if ADX is between 25 and 50, ¾ of the allocated capital would be invested to trade. Finally, if ADX is less than 25, only half of the allocated capital will be used to trade.As a strategy that profits when market trends up, DMAC is expected to exhibit high correlation with the commodity market. Therefore, to minimize this market risk, every trading day, the portfolio beta is hedged by longing or shorting extra units of Commodity index ETF (510170.SS) to make the portfolio market neutral. Portfolio beta is calculated everyday as a weighted average of previous year’s individual commodity beta, where weights being the position of each commodity in the portfolio, and benchmark being the Commodity Index (000066.SS).(4)Betaβ=CovarianceRe,RmVarianceRmwhere Re is the daily return of an individual commodity, Rm is the daily return of the overall market (here, overall market is the commodity index (000066.SS))
(5)Portfolioβ=∑i=1nwiβiwhere wi is the size of each commodity traded in the portfolio, βi is the beta value of each commodity based on commodity index.
(6)HedgingCapital=βTwhere T is the total value of the holding positions.


#### 2.2.3. Transaction Costs

This study estimates the total transaction cost as a percent of notional contract value in day t as: (the following formula is in bps form)(7)TransactionCostt=∑i=i21TickSizei∗CMi/∑i=i21Pricei,t∗CMi+1where the tick size refers to the minimum price movement of a trading commodity in the market, measured in yuan, CM is the contract multiplier, Price(t) is the price of the nearby contract at the end-of-month t, the 1 at the end refers to the estimated brokerage commission fee from China Futures’ offer.Followill, R.A. and Rodriguez, A.J.(1991) [8], and Locke, P.R. and Venkatesh, P.C.(1997) [9] concluded that the bid-ask spread of future markets is less than or equal to one tick. Therefore, to compute the fill costs, the bid-ask spread of each contract is assumed to be one tick.To simplify calculations, 3.96 bps is used as the total transaction costs for each trade of each commodity, which is the average of transaction costs across all contracts based on the formula above. Additionally, for Commodity ETF, the team assumes 5 bps of bid-ask spread and 18 bps of broker commission fee from Citic Securities, which is 23 bps as total transaction costs for each trade.


### 2.3. Data Description

Data universe chosen covers all three sectors in the Chinese commodity market, which are metal, agriculture, chemical and energy [10]. For Metal, Aluminum (AL), Copper (CU), Zinc (ZN), Wire (WR), Rebar (RB), Nickel (NI), Silver (AG) are used. In Agriculture, Non-gmo Soybeans (A), Gmo soybeans (B), Corn (C), Soybean Meal (M), Soybean Oil (Y), Palm Oil (P), Egg (JD) are chosen. In the Energy and Chemical Sector, Fuel (FU), Plastic (L), PVC (Polyvinyl chloride)(V), Rubber (RU), Bitumen (BU), Sour Crude (SC), and Coking Coal (JM) are selected. Additionally, Commodity Index ETF (510170.SS) is used for hedging to make the portfolio market neutral. And all above are considered to be traded only when their data are available, since some data are incomplete during the whole date range.For each of the commodities, only the nearby contracts are used to ensure high liquidity. Because Fei (2018) has concluded the rationale that nearby contracts are typically more liquid than deferred contracts in Chinese commodity markets, which guarantees the feasibility of the strategy in terms of liquidity [11].The data sets are composed of daily close prices of the 21 futures contracts and the Commodity Index ETF. Also, the roll-dates are set to be the last day of the month before contract expiration. That is, the nearby contracts in the universe are rolled over to the next contract on the last day of the month before contract expiration, in order to prevent price fluctuations [3].On each designated roll-date, if there is no position for the contracts that are needed to be rolled over, the universe is just updated by following the formerly normal strategy. On the other hand, on each roll-date, if there are any contracts that need to be rolled over, all the positions for the old contracts will be closed, and be replaced by new contracts.All data is obtained from the Wind database, accessed through Python.Data range is split by a ratio of 9: 2. In-sample data starts from 2010.12.30 and ends on 2019.12.30, while out-of-sample data starts from 2019.12.31 and ends on 2021.12.31. It ensures that sufficient data is reserved to test the strategy performance.


## 2.1. Overview

As a subset of the trend-following strategy, Dual Moving Average Crossover (DMAC) strategy uses the difference between STMA and LTMA as trading signals, which can be calculated explicitly and instantly. Therefore, all the periodic construction of portfolios and the execution of trades for this strategy can be implemented through predefined programming algorithms without investor’s intervention. In this study, to systematically simulate the strategy performance, all transactions are made by programming following the DMAC trading rules. With initial capital being CNY100,000,000, the team establishes a comprehensive framework to account for trending strengths and market neutrality in portfolio construction. The rules of trading are specified in the next part.


## 2.2. Trading Rules

### 2.2.1. Trading Signal

For each kind of commodity, trading signal is the difference between the moving averages of the closing prices of the past 20 days (MA20) and 60 days (MA60) before the day that the strategy opens a position, given by:(1)MA20=1/20∗P1+P2+⋯+P20MA60=1/60∗P1+P2+⋯+P60signal=MA20−MA60


### 2.2.2. Portfolio Construction

Trading signals are evaluated daily to capture profit opportunities. For each contract in the universe, if the signal is positive, a long position will be taken, and if the signal is negative, a short position will be taken. Subsequently, the position for a contract will be closed if its price crosses its MA20 in the opposite direction as its open signal. Additionally, on each roll-date, all old contracts in the portfolio will be replaced with new ones, keeping the position for the commodity unchanged.To determine the size of each trade, the team applies a modified version of equal weighting to construct the portfolio. On the first trading day of every month, the portfolio is rebalanced by allocating an equal amount of capital to each contract in the universe, based on which the trading amount for each contract at each trade is further adjusted by a trend indicator, average directional index (ADX), calculated as follows:(2)+DI=smoothed+DMATR×100−DI=smoothed−DMATR×100DX=+DI−−DI+DI+−DI×100ADX=PriorADX×13+CurrentDX14where:
(3)ADX1=0+DMDirectionalMovement=CurrentHigh−PreviousHigh−DM=PreviousLow−CurrentLowSmoothed+/−DM=∑t=114DM−∑t=114DM14+CurrentDMCDM=CurrentDMATR=AverageTrueRangeRanging from 0 to 100, ADX differentiates weak trends from strong trends, which helps the strategy accommodate investment sizes according to the prevailing trend strengths. Everytime the trading signal occurs, ADX for the corresponding contract is evaluated simultaneously. If ADX is larger than 50, all the allocated capital for this contract would be used to trade, while if ADX is between 25 and 50, ¾ of the allocated capital would be invested to trade. Finally, if ADX is less than 25, only half of the allocated capital will be used to trade.As a strategy that profits when market trends up, DMAC is expected to exhibit high correlation with the commodity market. Therefore, to minimize this market risk, every trading day, the portfolio beta is hedged by longing or shorting extra units of Commodity index ETF (510170.SS) to make the portfolio market neutral. Portfolio beta is calculated everyday as a weighted average of previous year’s individual commodity beta, where weights being the position of each commodity in the portfolio, and benchmark being the Commodity Index (000066.SS).(4)Betaβ=CovarianceRe,RmVarianceRmwhere Re is the daily return of an individual commodity, Rm is the daily return of the overall market (here, overall market is the commodity index (000066.SS))
(5)Portfolioβ=∑i=1nwiβiwhere wi is the size of each commodity traded in the portfolio, βi is the beta value of each commodity based on commodity index.
(6)HedgingCapital=βTwhere T is the total value of the holding positions.


### 2.2.3. Transaction Costs

This study estimates the total transaction cost as a percent of notional contract value in day t as: (the following formula is in bps form)(7)TransactionCostt=∑i=i21TickSizei∗CMi/∑i=i21Pricei,t∗CMi+1where the tick size refers to the minimum price movement of a trading commodity in the market, measured in yuan, CM is the contract multiplier, Price(t) is the price of the nearby contract at the end-of-month t, the 1 at the end refers to the estimated brokerage commission fee from China Futures’ offer.Followill, R.A. and Rodriguez, A.J.(1991) [8], and Locke, P.R. and Venkatesh, P.C.(1997) [9] concluded that the bid-ask spread of future markets is less than or equal to one tick. Therefore, to compute the fill costs, the bid-ask spread of each contract is assumed to be one tick.To simplify calculations, 3.96 bps is used as the total transaction costs for each trade of each commodity, which is the average of transaction costs across all contracts based on the formula above. Additionally, for Commodity ETF, the team assumes 5 bps of bid-ask spread and 18 bps of broker commission fee from Citic Securities, which is 23 bps as total transaction costs for each trade.


## 2.2.1. Trading Signal

For each kind of commodity, trading signal is the difference between the moving averages of the closing prices of the past 20 days (MA20) and 60 days (MA60) before the day that the strategy opens a position, given by:(1)MA20=1/20∗P1+P2+⋯+P20MA60=1/60∗P1+P2+⋯+P60signal=MA20−MA60


## 2.2.2. Portfolio Construction

Trading signals are evaluated daily to capture profit opportunities. For each contract in the universe, if the signal is positive, a long position will be taken, and if the signal is negative, a short position will be taken. Subsequently, the position for a contract will be closed if its price crosses its MA20 in the opposite direction as its open signal. Additionally, on each roll-date, all old contracts in the portfolio will be replaced with new ones, keeping the position for the commodity unchanged.To determine the size of each trade, the team applies a modified version of equal weighting to construct the portfolio. On the first trading day of every month, the portfolio is rebalanced by allocating an equal amount of capital to each contract in the universe, based on which the trading amount for each contract at each trade is further adjusted by a trend indicator, average directional index (ADX), calculated as follows:(2)+DI=smoothed+DMATR×100−DI=smoothed−DMATR×100DX=+DI−−DI+DI+−DI×100ADX=PriorADX×13+CurrentDX14where:
(3)ADX1=0+DMDirectionalMovement=CurrentHigh−PreviousHigh−DM=PreviousLow−CurrentLowSmoothed+/−DM=∑t=114DM−∑t=114DM14+CurrentDMCDM=CurrentDMATR=AverageTrueRangeRanging from 0 to 100, ADX differentiates weak trends from strong trends, which helps the strategy accommodate investment sizes according to the prevailing trend strengths. Everytime the trading signal occurs, ADX for the corresponding contract is evaluated simultaneously. If ADX is larger than 50, all the allocated capital for this contract would be used to trade, while if ADX is between 25 and 50, ¾ of the allocated capital would be invested to trade. Finally, if ADX is less than 25, only half of the allocated capital will be used to trade.As a strategy that profits when market trends up, DMAC is expected to exhibit high correlation with the commodity market. Therefore, to minimize this market risk, every trading day, the portfolio beta is hedged by longing or shorting extra units of Commodity index ETF (510170.SS) to make the portfolio market neutral. Portfolio beta is calculated everyday as a weighted average of previous year’s individual commodity beta, where weights being the position of each commodity in the portfolio, and benchmark being the Commodity Index (000066.SS).(4)Betaβ=CovarianceRe,RmVarianceRmwhere Re is the daily return of an individual commodity, Rm is the daily return of the overall market (here, overall market is the commodity index (000066.SS))
(5)Portfolioβ=∑i=1nwiβiwhere wi is the size of each commodity traded in the portfolio, βi is the beta value of each commodity based on commodity index.
(6)HedgingCapital=βTwhere T is the total value of the holding positions.


## 2.2.3. Transaction Costs

This study estimates the total transaction cost as a percent of notional contract value in day t as: (the following formula is in bps form)(7)TransactionCostt=∑i=i21TickSizei∗CMi/∑i=i21Pricei,t∗CMi+1where the tick size refers to the minimum price movement of a trading commodity in the market, measured in yuan, CM is the contract multiplier, Price(t) is the price of the nearby contract at the end-of-month t, the 1 at the end refers to the estimated brokerage commission fee from China Futures’ offer.Followill, R.A. and Rodriguez, A.J.(1991) [8], and Locke, P.R. and Venkatesh, P.C.(1997) [9] concluded that the bid-ask spread of future markets is less than or equal to one tick. Therefore, to compute the fill costs, the bid-ask spread of each contract is assumed to be one tick.To simplify calculations, 3.96 bps is used as the total transaction costs for each trade of each commodity, which is the average of transaction costs across all contracts based on the formula above. Additionally, for Commodity ETF, the team assumes 5 bps of bid-ask spread and 18 bps of broker commission fee from Citic Securities, which is 23 bps as total transaction costs for each trade.


## 2.3. Data Description

Data universe chosen covers all three sectors in the Chinese commodity market, which are metal, agriculture, chemical and energy [10]. For Metal, Aluminum (AL), Copper (CU), Zinc (ZN), Wire (WR), Rebar (RB), Nickel (NI), Silver (AG) are used. In Agriculture, Non-gmo Soybeans (A), Gmo soybeans (B), Corn (C), Soybean Meal (M), Soybean Oil (Y), Palm Oil (P), Egg (JD) are chosen. In the Energy and Chemical Sector, Fuel (FU), Plastic (L), PVC (Polyvinyl chloride)(V), Rubber (RU), Bitumen (BU), Sour Crude (SC), and Coking Coal (JM) are selected. Additionally, Commodity Index ETF (510170.SS) is used for hedging to make the portfolio market neutral. And all above are considered to be traded only when their data are available, since some data are incomplete during the whole date range.For each of the commodities, only the nearby contracts are used to ensure high liquidity. Because Fei (2018) has concluded the rationale that nearby contracts are typically more liquid than deferred contracts in Chinese commodity markets, which guarantees the feasibility of the strategy in terms of liquidity [11].The data sets are composed of daily close prices of the 21 futures contracts and the Commodity Index ETF. Also, the roll-dates are set to be the last day of the month before contract expiration. That is, the nearby contracts in the universe are rolled over to the next contract on the last day of the month before contract expiration, in order to prevent price fluctuations [3].On each designated roll-date, if there is no position for the contracts that are needed to be rolled over, the universe is just updated by following the formerly normal strategy. On the other hand, on each roll-date, if there are any contracts that need to be rolled over, all the positions for the old contracts will be closed, and be replaced by new contracts.All data is obtained from the Wind database, accessed through Python.Data range is split by a ratio of 9: 2. In-sample data starts from 2010.12.30 and ends on 2019.12.30, while out-of-sample data starts from 2019.12.31 and ends on 2021.12.31. It ensures that sufficient data is reserved to test the strategy performance.


## 3. Backtest Evaluation

Table1 demonstrates the backtest result of DMAC strategy using in-sample data. Although transaction costs are not extremely high, the cost indeed contributes to the negative return, implying that, on average, the generated returns cannot even offset the transaction cost, showing that it is difficult to obtain positive returns by relying solely on the traditional DMAC strategy. However, the maximum drawdown is small relative to the standard maximum drawdown in the investment world of about 20%. The low level of Skewness and VaR further evidence the small tail risk of DMAC strategy. All the low risk measurements imply that this DMAC strategy is suitable for investors with preferences for stable return and low risk.Table 1
Statistics for backtesting results.
Original (in sample)Original (out of sample)Refinement (in sample)Refinement (out of sample)ReturnCumulative return-5.93%-0.51%22.35%9.67%Annualized return-0.70%-0.27%2.35%4.89%Sharpe ratio-0.52-0.225-0.0140.21IR-0.06-0.0130.080.19Transaction cost0.96%0.22%8.05%1.56%RiskVolatility6.08%12.11%7.84%11.75%Skewness0.190.29-0.050.27Kurtosis7.813.915.521.58Maximum drawdown-10.46%-10.93%-14.03%-7.12%VaR (95%)0.58%1.21%0.78%1.23%VaR (99%)1.13%2.48%1.38%2.16%Calmar ratio0.070.024-0.17-0.69Efficacy37.50%45.45%37.66%59.09%CorrelationCorrelation (commodity index)46.66%57%36.02%47.22%Correlation (stock index)44.28%35%34.59%32.01%On the other hand, the beta calculated between backtest portfolio and Commodity Index remains as high as 0.1042. This suggests that the hedging method that tries to eliminate beta for market neutrality does not perform well in terms of lowering the correlation with the market. One possible explanation is that since the beta of the previous year is used as an estimation of each year’s beta, it’s possible that this year’s beta deviates substantially from the previous year, thus resulting in an unhedged market risk.As the implementation result deviates from the expected return of 34%, it is concluded that the MA20 and MA60 crossover signal may be ineffective in identifying and tracing the trend in a timely manner. This ineffectiveness of signal can be reflected in the observation of historical price movements (Figures1 and 2). For example, Figure 3 below demonstrates what happens for Non-gmo Soybeans contracts at the maximum backtest drawdown in 2018. It can be observed that everytime the MA20 crosses below MA60, the price of the contract has already declined for a long time and even starts to rebound, vice versa. So this signal is likely to bring about only a small profit or even a loss. Moreover, the low level of efficacy further proves the ineffectiveness of signals.Figure 1
Daily %return of in-sample data (2010.12.30-2019.12.30).Figure 2
Daily %cumulative return of in-sample data (2010.12.30-2019.12.30).Figure 3
Price, MA20 and MA60 of A00.DCE from 2018.03-2019.01.To explain the statistics being worse than expected, the fractal market hypothesis indicates that there may be different market states such as trend and mean recovery [12]. Due to the characteristics of the strategy itself, trend-following strategy can make great gains in the trend market, but not in other types of markets, which miss out on a bunch of profitable opportunities [12]. Since the trend tracking mechanism of this DMAC strategy is based only on its own price information, the trading system is prone to be misled by short-term fluctuations and send out wrong opening signals, resulting in losses [13].From Figure4 and 5 it can be seen that before 2021, the return is not that volatile, but it’s not the case starting in 2021. And also it’s obvious that the decline in the return in 2021 is much greater than 2020. It could be partially attributed to the pandemic: The commerce of COVID-19 disrupted global supply chains at the beginning of 2020, but the subsequent recovery of global consumer demand coupled with shrinked supply further increased the commodity price. This rocketing trend in commodity prices made the DMAC strategy harvest a huge profit between 2020.02-2020.07. However, after the domestic policy about stabilizing the price of raw material had been introduced, the price of commodities first became extremely volatile and then remained stable afterwards. The volatile prices together with the stabilizing phase made the strategy risk higher and the room for profit smaller after 2020.Figure 4
Daily %return of out-of-sample data (2019.12.31-2021.12.31).Figure 5
Daily %cumulative return of out-of-sample data (2019.12.31-2021.12.31).From Table1 it is obvious that the volatility of out-of-sample data is twice as much as it of in-sample data, partly due to the pandemic, which the study has discussed in the analysis of the graph. For the return, although it still generates a negative return, the returns are much less negative. It is inferred that the improvement in return is mainly caused by the spike in April 2020. The skewness is larger than the in-sample data, which is reasonable, since the market is quite turbulent, a higher tail risk is incurred. The information ratio shows that the strategy still performs worse than the market, however, it is on a correct track since the strategy has a higher IR.


## 4. Refinement

### 4.1. Method

For refinement, this research uses MACD (Moving Average Convergence/Divergence) to replace DMAC. Basically, MACD has two lines: DIF and DEA. DIF is the difference between EMA 12 (Exponential Moving Average of 12 days) and EMA 26. DEA is the EMA 9 of DIF [14]. The new trading signal is the difference between DIF and DEA (DIF - DEA). If DIF crosses above DEA, long the commodity future; if DIF crosses below DEA, short the commodity future. Meanwhile, to make the signal of stop losses less sensitive, which could potentially cause the strategy to lose profits, the signal of stop loss is changed from the difference between daily close price and MA 20 to the difference between daily close price and MA 60 because sometimes the price can temporarily fall below or crosses above the MA 20 but recover back soon. By backtesting the original one with or without ADX, the research discovers that the strategy without ADX performs better than with ADX. The main reason is that ADX can possibly shrink the profits by restraining the positions when there is a signal to trade, but the trend is not strong.


### 4.2. Evaluation

Overall, as the Table1 shows, the refined strategy itself performs not well before 2016 but performs very well after 2016, as in figure 6. The cumulative return and annualized return of the refined strategy are better than the original strategy’s, with cumulative returns of 22.35%. For example, for the in-sample period, the Sharpe ratio of -0.014 (the Sharpe ratio of the out-of-sample period is 0.21) is much higher, though it’s still negative. Transaction cost of 8.5% is much higher than 0.96% of the original strategy. The high transaction cost mostly occurs from the oscillation zone between 2011 and 2015, during which the trades are closed very quickly due to stop loss orders, causing unnecessary transaction costs. To improve the strategy, the investors should find better signals to capture the trend that sustains for a longer period of time to reduce the unnecessary transaction costs caused by stop loss. The volatility is much higher than the original strategy’s, as its maximum drawdown of 14.03% in the in-sample period shows, which is too volatile for investors who have low risk appetite. The efficacy of the in-sample period is 37.66%, which is better than that of the original strategy, suggesting that MACD may be a better indicator to generate signals for trend following strategy. The main reason could be that MACD has a much quicker reaction to the price movement and a greater capability to catch the trend than the MA does. Meanwhile, the days involved in the MACD are 12, 26, 9, which are shorter than the original strategy and are reflecting the price movement more timely. In addition, the new stop loss of MA60 clears many unnecessary stop losses caused by MA20, which is more sensitive to the price movement (Figure 7, Figures 8 and 9).Figure 6
Daily %return of in-sample data after refinement (2019.12.31-2021.12.31).Figure 7
Daily %cumulative return of out-of-sample data after refinement (2010.12.30-2019.12.30).Figure 8
Daily %return of out-of-sample data after refinement (2019.12.31-2021.12.31).Figure 9
Daily %cumulative return of out-of-sample data after refinement (2019.12.31-2021.12.31).


## 4.1. Method

For refinement, this research uses MACD (Moving Average Convergence/Divergence) to replace DMAC. Basically, MACD has two lines: DIF and DEA. DIF is the difference between EMA 12 (Exponential Moving Average of 12 days) and EMA 26. DEA is the EMA 9 of DIF [14]. The new trading signal is the difference between DIF and DEA (DIF - DEA). If DIF crosses above DEA, long the commodity future; if DIF crosses below DEA, short the commodity future. Meanwhile, to make the signal of stop losses less sensitive, which could potentially cause the strategy to lose profits, the signal of stop loss is changed from the difference between daily close price and MA 20 to the difference between daily close price and MA 60 because sometimes the price can temporarily fall below or crosses above the MA 20 but recover back soon. By backtesting the original one with or without ADX, the research discovers that the strategy without ADX performs better than with ADX. The main reason is that ADX can possibly shrink the profits by restraining the positions when there is a signal to trade, but the trend is not strong.


## 4.2. Evaluation

Overall, as the Table1 shows, the refined strategy itself performs not well before 2016 but performs very well after 2016, as in figure 6. The cumulative return and annualized return of the refined strategy are better than the original strategy’s, with cumulative returns of 22.35%. For example, for the in-sample period, the Sharpe ratio of -0.014 (the Sharpe ratio of the out-of-sample period is 0.21) is much higher, though it’s still negative. Transaction cost of 8.5% is much higher than 0.96% of the original strategy. The high transaction cost mostly occurs from the oscillation zone between 2011 and 2015, during which the trades are closed very quickly due to stop loss orders, causing unnecessary transaction costs. To improve the strategy, the investors should find better signals to capture the trend that sustains for a longer period of time to reduce the unnecessary transaction costs caused by stop loss. The volatility is much higher than the original strategy’s, as its maximum drawdown of 14.03% in the in-sample period shows, which is too volatile for investors who have low risk appetite. The efficacy of the in-sample period is 37.66%, which is better than that of the original strategy, suggesting that MACD may be a better indicator to generate signals for trend following strategy. The main reason could be that MACD has a much quicker reaction to the price movement and a greater capability to catch the trend than the MA does. Meanwhile, the days involved in the MACD are 12, 26, 9, which are shorter than the original strategy and are reflecting the price movement more timely. In addition, the new stop loss of MA60 clears many unnecessary stop losses caused by MA20, which is more sensitive to the price movement (Figure 7, Figures 8 and 9).Figure 6
Daily %return of in-sample data after refinement (2019.12.31-2021.12.31).Figure 7
Daily %cumulative return of out-of-sample data after refinement (2010.12.30-2019.12.30).Figure 8
Daily %return of out-of-sample data after refinement (2019.12.31-2021.12.31).Figure 9
Daily %cumulative return of out-of-sample data after refinement (2019.12.31-2021.12.31).


## 5. Conclusion

### 5.1. Recall

Trend following (Dual moving average crossover strategy, DMAC) is trading on the price trend based on the comparison between the short-period and long-period moving averages. To construct the portfolio, the strategy longs the commodity when its MA20 crosses above MA60 and shorts it when MA20 crosses below MA60, where the signal is the difference between MA20 and MA60 before the day traded. ADX, a way to measure trending strength, helps further determine sizes for each commodity under the equal weighting condition. During research, the returns and some other statistics are calculated, including risk and correlation, of the in-sample (2010.12.30-2019.12.30) and out-of-sample (2019.12.31-2021.12.31) data, based upon which objective analysis and subjective prediction are made. Upon analysis, the signal of MA20 and MA60 crossover is inferred not effective and timely enough to fully utilize the price trend. Therefore, a way is concluded to refine the original strategy by using MACD for signal generation, using an updated stop loss, and removing ADX.


### 5.2. Additional Concern

No one can predict whether there’s a trend or not, investors can only use the tools to roughly estimate the trend. However, the tools used by trend traders are mostly lagging. The lag caused by the tool may lead to the miss of a trend or the entrance of an opposite position. In addition, DMAC is expected to be effective over time because when prices rise or down, traders push the price more intense, which creates a continuous trend. Traders often assume that prices have risen in the past and are more likely to rise in the future, reinforcing the trend. However, due to DMAC’s lack of sophistication, the team expects the market of trading DMAC to be highly crowded. More investigation is needed to identify whether meaningful excess returns can be obtained from this strategy. What’s more, it’s common for trend following to make small losses, since it’s quite often for investors to get caught as the trend immediately turns against them. As investors go through several losses, they may lose confidence in this strategy and end the trade with a loss.


### 5.3. Recommendation

Whether to recommend the original strategy depends on who the investors are and what their risk preference is. For those who are highly risk-reverse, in general, the team does not recommend the original strategy, since for both in-sample and out-of-sample data, negative returns and a poor Sharpe ratio are generated. Thus, the study strives to find a more effective signal to better estimate and catch the trend. Since it is not so effective to use the difference of moving averages as the only factor to determine the trading signal, which has been confirmed by the statistics, analysis and refinement. So by taking into account more reasonable quantitative techniques and other influential factors, except for the previous performance of prices, this strategy may be greatly refined. The strategy has relatively low volatility and smaller maximum drawdown compared to other strategies, which is quite appealing to investors who are risk-averse. Also, the indicator can be changed of stopping the loss, like what the study do in the refinement, in the original strategy, the trade will be closed when price is equal to MA20, but since MA20 is too sensitive, it’s common for us to close the trade when trend is still going on, resulting a small return which even cannot cover the transaction cost. By changing the criteria for stopping the losses, the strategy may have higher returns.It is far from enough to only rely on technical analysis, as the strategy now is. Constructing market-neutral portfolios by linear combining beta value is still not stable and totally hedged. This strategy can be improved by eliminating the noise, taking consideration of fundamentals, etc.


## 5.1. Recall

Trend following (Dual moving average crossover strategy, DMAC) is trading on the price trend based on the comparison between the short-period and long-period moving averages. To construct the portfolio, the strategy longs the commodity when its MA20 crosses above MA60 and shorts it when MA20 crosses below MA60, where the signal is the difference between MA20 and MA60 before the day traded. ADX, a way to measure trending strength, helps further determine sizes for each commodity under the equal weighting condition. During research, the returns and some other statistics are calculated, including risk and correlation, of the in-sample (2010.12.30-2019.12.30) and out-of-sample (2019.12.31-2021.12.31) data, based upon which objective analysis and subjective prediction are made. Upon analysis, the signal of MA20 and MA60 crossover is inferred not effective and timely enough to fully utilize the price trend. Therefore, a way is concluded to refine the original strategy by using MACD for signal generation, using an updated stop loss, and removing ADX.


## 5.2. Additional Concern

No one can predict whether there’s a trend or not, investors can only use the tools to roughly estimate the trend. However, the tools used by trend traders are mostly lagging. The lag caused by the tool may lead to the miss of a trend or the entrance of an opposite position. In addition, DMAC is expected to be effective over time because when prices rise or down, traders push the price more intense, which creates a continuous trend. Traders often assume that prices have risen in the past and are more likely to rise in the future, reinforcing the trend. However, due to DMAC’s lack of sophistication, the team expects the market of trading DMAC to be highly crowded. More investigation is needed to identify whether meaningful excess returns can be obtained from this strategy. What’s more, it’s common for trend following to make small losses, since it’s quite often for investors to get caught as the trend immediately turns against them. As investors go through several losses, they may lose confidence in this strategy and end the trade with a loss.


## 5.3. Recommendation

Whether to recommend the original strategy depends on who the investors are and what their risk preference is. For those who are highly risk-reverse, in general, the team does not recommend the original strategy, since for both in-sample and out-of-sample data, negative returns and a poor Sharpe ratio are generated. Thus, the study strives to find a more effective signal to better estimate and catch the trend. Since it is not so effective to use the difference of moving averages as the only factor to determine the trading signal, which has been confirmed by the statistics, analysis and refinement. So by taking into account more reasonable quantitative techniques and other influential factors, except for the previous performance of prices, this strategy may be greatly refined. The strategy has relatively low volatility and smaller maximum drawdown compared to other strategies, which is quite appealing to investors who are risk-averse. Also, the indicator can be changed of stopping the loss, like what the study do in the refinement, in the original strategy, the trade will be closed when price is equal to MA20, but since MA20 is too sensitive, it’s common for us to close the trade when trend is still going on, resulting a small return which even cannot cover the transaction cost. By changing the criteria for stopping the losses, the strategy may have higher returns.It is far from enough to only rely on technical analysis, as the strategy now is. Constructing market-neutral portfolios by linear combining beta value is still not stable and totally hedged. This strategy can be improved by eliminating the noise, taking consideration of fundamentals, etc.



---

*Source: 5296678-2022-09-24.xml*