Turning sector rotation into strategy: Applying industry sequencing to build a quantitative backtesting model

Introduction

In the context of sector rotation, we have observed an intriguing phenomenon: the strengthening of the shipping index often appears to precede the rally in semiconductors. If such a relationship can be verified and transformed into an actionable logic, it may serve as a valuable clue for investment decisions.

Building on the empirical analysis presented in the previous article, “Observing Sector Rotation through Data: Deconstructing the Leading and Lagging Relationship between Shipping and Semiconductors,” this paper further explores how the hypothesis of “shipping leading, semiconductors following” can be translated into a concrete asset allocation strategy. We integrate business cycle indicators, industry performance metrics, and temporal conditions to construct a backtesting framework that simulates historical trading scenarios. By evaluating the strategy’s performance, we aim to address a central question: if shipping truly signals upcoming movements in semiconductors, how should we ride this relay race?

Visualization of Industry RSI Values

From the analysis presented in the previous article, covering the period from 2012 to early 2020, we can observe a clear rotational relationship between the RSI values of the shipping and semiconductor industries. The next step is to consider how we can leverage this rotational pattern to design a reliable investment strategy. To avoid look-ahead bias, we use post-2020 market data as the subject of our backtesting research, which makes our strategy analysis more robust.

Strategy Logic Explanation: (Combined with Economic Signal Lights)

From the article “From Business Cycle Signal Lights to Asset Rotation: A Quantitative Strategy to Avoid Bear Markets,”we learned that monitoring indicators can effectively help avoid bear market volatility—holding equities only during bull markets and switching to short-term government bonds or other defensive assets during bear markets—while producing favorable backtesting results.

Incorporating the observed sector rotation phenomenon “Shipping → Semiconductors,” our strategy proposes that during bull market phases, once a sector rotation signal is detected, the originally held 0050 ETF is temporarily substituted with semiconductor-related stocks. After capturing the excess returns generated from capital rotation, the position is rotated back into the 0050 ETF. The expectation is that this dynamic allocation approach will further enhance the performance outcomes discussed in the earlier study. For benchmarking, the strategy is compared against the TAIEX Total Return Index (IR0001), hereafter referred to as the market index.

Operational Logic:
When the monitoring indicator signals an upward phase, if the RSI value of the shipping index rises above 65 (indicating that the sector is at a relative high point and the rotation cycle is likely beginning), we initiate positions in representative semiconductor-related stocks. The holdings are maintained until the RSI of the semiconductor index increases by 15 points relative to the entry level (signaling the end of the rotation), at which point the semiconductor positions are closed and rotated back into the 0050 ETF. If the market transitions into a bear phase before the rotation cycle completes, all equity positions are liquidated and shifted into short-term bonds, consistent with the design outlined in the business cycle strategy.

Semiconductor Allocation:
For exposure to the semiconductor sector, we construct a basket of ten representative Taiwanese semiconductor companies, spanning the full supply chain from upstream foundries to midstream IC design and downstream packaging, testing, and memory:

Memory: Nanya Technology (2408), Taiwan’s leading DRAM manufacturer, highly correlated with global memory pricing and supply-demand cycles.

Foundries: Taiwan Semiconductor Manufacturing Company (TSMC, 2330) and United Microelectronics Corporation (UMC, 2303) represent the leaders in advanced and mature process nodes, respectively; Vanguard International Semiconductor (VIS, 5347) specializes in 8-inch wafers, focusing on niche markets.

IC Design: MediaTek (2454), a global leader in mobile and communication chip design; Novatek (3034) and Raydium Semiconductor (4961), both key suppliers of display driver ICs within the panel supply chain.

Packaging & Testing: ASE Technology Holding (3711), Powertech Technology (6239), and ChipMOS Technologies (3264), covering back-end packaging and testing services.

These stocks collectively form the key structure of Taiwan’s semiconductor industry, while also possessing sufficient liquidity and market capitalization, making them suitable for empirical backtesting and portfolio allocation simulations.

產業輪動
Visualization of Monitoring Indicators, 0050 ETF, and U.S. Short-Term Treasury ETFs

Strategy Performance Charts & Analysis

產業輪動

From the performance comparison shown in the first chart, a total of five “Shipping → Semiconductor” sector rotation signals (indicated by the orange markers) were detected during the entire bull market period. Among them, the first three occurred in 2020, while the fourth and fifth appeared in the later phase. Overall, four out of the five signals (the 2nd to 5th) successfully captured strong upward trends in semiconductor stocks. The 2nd and 3rd signals delivered the most significant gains, driving the strategy’s cumulative return to substantially outperform the Taiwan market benchmark and achieving our objective of generating excess returns through the rotation mechanism. The 4th and 5th signals also successfully tracked semiconductor rallies, though their incremental outperformance over the benchmark was more limited, as semiconductor stocks were already the primary driver of the broader market during that time.

The second chart illustrates the business cycle score throughout the backtesting period, providing the economic context for each rotation signal. It can be observed that most of the strategy’s entry points occurred when the economy was recovering from a trough or entering the early expansion phase, aligning with the logic of business cycles and capital rotation.

The third chart presents the leverage utilization over the full backtesting horizon. Apart from two temporary spikes to 2.0 caused by portfolio rebalancing during bull-to-bear transitions, leverage levels generally remained close to 1.0. This indicates that the strategy’s performance was not dependent on excessive leverage, and that leverage-related risks were well controlled.

產業輪動

The chart illustrates the drawdown and underwater plots of the sector rotation strategy. It can be observed that for most of the period, drawdowns remained within –10%, which represents an excellent result and highlights the strategy’s ability to deliver stable long-term profitability. However, in early 2020, there was a brief drawdown of around –27%. At that time, the portfolio was primarily allocated to the 0050 ETF, suggesting that the decline was driven by systemic market risk. In fact, this downturn was triggered by the sudden outbreak of the pandemic, a classic black swan event. Therefore, this particular episode can be considered an exception and does not undermine the overall robustness of the strategy.

Multi-Strategy Comparison

產業輪動

The chart above presents a comparison of the performance and risk of four different strategies during the backtesting period.

  • Red Line (Ind): Represents the Industry Rotation Strategy designed in this study, dynamically adjusted based on the information transmission relationship between shipping and semiconductors.
  • Blue Line (All Stock): A strategy that simply buys semiconductor stocks during bull markets and exits the market once a bear market signal appears.
  • Purple Line (All ETF): A strategy that simply holds the 0050 ETF during bull markets.
  • Gray Line (Benchmark): Serves as the investment benchmark, representing the overall market return trend.

From the cumulative return performance shown in the first chart, it is evident that the blue-line strategy delivered the highest returns, but at the cost of significant volatility risk. This is further confirmed in the third chart, where its volatility consistently exceeded that of the other strategies for most of the period.

In contrast, the Industry Rotation Strategy (red line) proposed in this study demonstrated stable performance with effective risk control. While its returns were slightly lower than the all-stock strategy, they were clearly higher than the pure ETF strategy, with volatility positioned between the two. This indicates a balanced trade-off between risk and return. Overall, the industry rotation strategy did not suffer from performance erosion due to frequent portfolio rebalancing. On the contrary, it showed tangible advantages in capital flow detection and timing of entry and exit, suggesting strong potential for practical application.

Strategy Comparison Table and Analysis

Performance Indicators / StrategiesIndustry Rotation StrategyBull Market Semiconductor StrategyBull Market 0050 StrategyBenchmark
Annualized Return28.584%33.23%21.24%12.047%
Cumulative Return257.52%327.48%165.40%77.97%
Annualized Volatility16.179%17.21%14.84%18.52%
Sharpe Ratio1.641.751.370.71
Calmar Ratio1.040.980.770.45
Maximum Drawdown Period-27.60%-34.07%-27.60%-26.74%
Alpha0.230.280.160
Beta0.390.420.390.93
Note: The Calmar ratio is calculated as the annualized return divided by the maximum drawdown over the period. It measures the relationship between return and loss, similar in concept to the Sterling ratio. A higher value indicates better performance.

The Industry Rotation Strategy proposed in this paper demonstrates a solid balance between risk and return across multiple performance indicators. Its annualized return reached 28.58%, slightly lower than the all-semiconductor strategy during the bull market (33.23%), but clearly higher than the pure 0050 ETF strategy (21.24%) and the market benchmark (12.05%). The cumulative return also achieved 257.52%, showcasing strong long-term growth potential. On the risk side, the strategy’s maximum drawdown was –27.60%, comparable to the ETF strategy and significantly better than the semiconductor strategy (–34.07%). Overall, while the strategy does not aim for extreme returns, it effectively balances risk control with stable profitability.

Looking further into risk-adjusted performance metrics, the strategy achieved a Sharpe ratio of 1.64 and a Calmar ratio of 1.04, both higher than those of the ETF and benchmark strategies, with the Calmar ratio being the highest among all four strategies. This indicates the ability to generate superior annualized returns while maintaining relatively controlled drawdowns. In addition, the strategy’s Alpha was 0.23, suggesting clear excess returns after accounting for market effects, while its Beta was only 0.39, implying lower sensitivity to market volatility and a defensive asset allocation characteristic. Taken together, these results suggest that the industry rotation strategy achieves an effective balance between risk and return, making it a practical and resilient investment approach.

Full Code Link


We welcome investors to explore and apply this strategy. Future articles will continue to demonstrate how to utilize the TEJ database to construct various indicators and backtest their performance. Readers interested in systematic trading backtests are encouraged to consider the TQuant Lab solutions, which provide access to high-quality datasets for building personalized trading strategies.

Disclaimer: This analysis is for reference only and does not constitute any product recommendation or investment advice.

【TQuant Lab Backtesting System】Solving Your Quantitative Finance Pain Points

 

Further Reading

From Business Cycle Indicators to Asset Rotation: A Quantitative Strategy to Avoid Bear Markets

Michael Murphy’s Risk Assessment Rules for Investing in High-Tech Stocks

Charles Brandes’ Value Investing Principles : Building a Portfolio with a Margin of Safety

Related Links

Back
Processing...