{"id":1086,"date":"2025-03-07T13:30:00","date_gmt":"2025-03-07T13:30:00","guid":{"rendered":"https:\/\/www.tejwin.com\/en\/insights\/enhancing-investment-performance-of-the-ichimoku-cloud-with-the-xgboost-machine-learning-algorithm\/"},"modified":"2025-03-07T13:30:00","modified_gmt":"2025-03-07T13:30:00","slug":"enhancing-investment-performance-of-the-ichimoku-cloud-with-the-xgboost-machine-learning-algorithm","status":"publish","type":"insight","link":"https:\/\/www.tejwin.com\/en\/insights\/enhancing-investment-performance-of-the-ichimoku-cloud-with-the-xgboost-machine-learning-algorithm\/","title":{"rendered":"Enhancing Investment Performance of the Ichimoku Cloud with the XGBoost Machine Learning Algorithm"},"content":{"rendered":"<figure class=\"wp-block-image size-full caption-align-center\"><img loading=\"lazy\" decoding=\"async\" alt=\" XGBoost \" class=\"wp-image-33294\" height=\"3648\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/pexels-pixabay-267582.jpg\" width=\"5472\"\/><\/figure>\n<p class=\"has-text-align-center wp-block-paragraph\">Photo from <a href=\"https:\/\/www.pexels.com\/zh-tw\/photo\/267582\/\" rel=\"noopener\" target=\"_blank\">Pexels<\/a> by <a href=\"https:\/\/unsplash.com\/@markusspiske\" rel=\"noopener\" target=\"_blank\">Markus Spiske<\/a><\/p>\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n<p class=\"wp-block-paragraph\">In financial markets, technical analysis has long been a crucial tool for investors to assess market trends and develop trading strategies. Among these techniques, the\u00a0<strong>Ichimoku Kinko Hyo<\/strong>\u00a0(Ichimoku Cloud) utilizes five moving averages and a cloud structure to analyze stock support, resistance, and trend changes, enabling traders to quickly identify bullish or bearish signals. However, traditional\u00a0<strong>Ichimoku strategies<\/strong>\u00a0rely on fixed parameters (9-26-52) and visual interpretation, making them inflexible in adapting to different market conditions. Additionally, in choppy market conditions, Ichimoku-based signals can generate false positives, leading to erroneous trades and capital drawdowns.<\/p>\n<p class=\"wp-block-paragraph\">With the advancement of machine learning,\u00a0<strong>XGBoost (Extreme Gradient Boosting)<\/strong>\u00a0has become one of the most widely used models in quantitative trading. By leveraging\u00a0<strong>Gradient Boosting Decision Trees (GBDT)<\/strong>, XGBoost learns complex high-dimensional relationships between different data points and enhances the filtering and decision-making process of trading signals. Compared to purely relying on technical indicators, XGBoost can integrate various market variables\u2014such as price momentum, volume changes, and market sentiment\u2014to uncover relationships between data and future stock returns. This ultimately improves the\u00a0<strong>accuracy and robustness<\/strong>\u00a0of trading strategies.<\/p>\n<p class=\"wp-block-paragraph\">Strategy Overview<br \/>The\u00a0Ichimoku Cloud\u00a0was developed by Japanese journalist\u00a0<strong>Goichi Hosoda<\/strong>\u00a0as a comprehensive technical indicator that evaluates market trends through five key lines. By analyzing the shape and interactions of these lines, traders can make informed investment decisions. The five components of the\u00a0<strong>Ichimoku Cloud<\/strong>\u00a0are:<\/p>\n<ul class=\"wp-block-list\">\n<li><strong>Chikou Span (Lagging Line, 26-period)<\/strong>: This line represents the current closing price, but it is shifted backward by\u00a0<strong>26 periods<\/strong>\u00a0to help traders compare past and present price levels, acting as a measure of market strength.<\/li>\n<li><strong>Tenkan-sen (Conversion Line, 9-period)<\/strong>: This is a\u00a0<strong>short-term trend indicator<\/strong>, determined by the average of the highest and lowest prices over the past\u00a0<strong>nine periods<\/strong>. A rising line suggests upward momentum, while a falling line indicates downward movement.<\/li>\n<li><strong>Kijun-sen (Base Line, 26-period)<\/strong>: This serves as a\u00a0<strong>medium-term trend indicator<\/strong>, reflecting the average price range over the past\u00a0<strong>26 periods<\/strong>. It provides a more stable trend direction compared to the Tenkan-sen and can be used as a support or resistance level.<\/li>\n<li><strong>Senkou Span A (Leading Span A)<\/strong>: This line represents the midpoint between the short-term (Tenkan-sen) and medium-term (Kijun-sen) trends. It is projected\u00a0<strong>26 periods forward<\/strong>, forming one boundary of the\u00a0<strong>Ichimoku Cloud<\/strong>, which helps traders anticipate future support and resistance levels.<\/li>\n<li><strong>Senkou Span B (Leading Span B)<\/strong>: This is a\u00a0<strong>long-term trend indicator<\/strong>, based on the average of the highest and lowest prices over the past\u00a0<strong>52 periods<\/strong>. Like Senkou Span A, it is also projected\u00a0<strong>26 periods forward<\/strong>, forming the other boundary of the\u00a0<strong>Ichimoku Cloud<\/strong>.<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">Together, these five components create a\u00a0<strong>cloud-like structure<\/strong>\u00a0that provides traders with a clear view of market trends, potential reversals, and key support or resistance zones. The relative position of the price and the cloud helps determine whether the market is in a bullish, bearish, or neutral phase.<\/p>\n<p class=\"has-text-align-center wp-block-paragraph\">Ichimoku Cloud Calculation Formula and Code Demonstration<\/p>\n<figure class=\"wp-block-image size-full caption-align-center\"><img loading=\"lazy\" decoding=\"async\" alt=\" XGBoost \" class=\"wp-image-33272\" height=\"682\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/qq.png\" width=\"1296\"\/><figcaption class=\"wp-element-caption\">This chart illustrates the Ichimoku Cloud for stock\u00a0<strong>6446<\/strong>\u00a0during the backtesting period, based on 20% of the overall data<\/figcaption><\/figure>\n<h2 class=\"wp-block-heading\">Ichimoku Cloud Entry and Exit Signals<\/h2>\n<p class=\"wp-block-paragraph\">The\u00a0<strong>Ichimoku Cloud<\/strong>\u00a0provides a trading signal interpretation method known as\u00a0<strong>\u201cThree Confirmations\u201d <\/strong>:<\/p>\n<ul class=\"wp-block-list\">\n<li><strong>Three Confirmations Bullish <\/strong>: A strong\u00a0<strong>buy signal<\/strong>, indicating an upward trend when specific conditions align.<\/li>\n<li><strong>Three Confirmations Bearish <\/strong>: A strong\u00a0<strong>sell signal<\/strong>, suggesting a downward trend when the opposite conditions are met.<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">Generally, when the price moves\u00a0<strong>outside of a consolidation range<\/strong>, a valid\u00a0<strong>Three Confirmations Bullish<\/strong>\u00a0signal suggests a strong\u00a0<strong>uptrend<\/strong>, while a\u00a0<strong>Three Confirmations Bearish<\/strong>\u00a0signal indicates a\u00a0<strong>downtrend<\/strong>.<\/p>\n<p class=\"wp-block-paragraph\">In this study, the traditional\u00a0<strong>Three Confirmations Bullish<\/strong>\u00a0signal is\u00a0<strong>slightly adjusted<\/strong>\u00a0to generate optimized\u00a0<strong>buy signals<\/strong> for enhanced trading performance.<\/p>\n<p class=\"wp-block-paragraph\"><strong>Three Confirmations Bullish  \u2013 Buy Signal:<\/strong><\/p>\n<p class=\"wp-block-paragraph\">A\u00a0<strong>bullish signal<\/strong>\u00a0occurs when the following three conditions are met:<\/p>\n<ol class=\"wp-block-list\">\n<li><strong>Conversion Line (Tenkan-sen) crosses above the Base Line (Kijun-sen).<\/strong><\/li>\n<li><strong>Lagging Span (Chikou Span) is above the past price.<\/strong><\/li>\n<li><strong>Price is above the Cloud (Senkou Span A &amp; B).<\/strong><\/li>\n<\/ol>\n<h4 class=\"wp-block-heading\"><strong>Three Confirmations Bearish \u2013 Sell Signal:<\/strong><\/h4>\n<p class=\"wp-block-paragraph\">A\u00a0<strong>bearish signal<\/strong>\u00a0occurs when the following conditions are satisfied:<\/p>\n<ol class=\"wp-block-list\">\n<li><strong>Conversion Line (Tenkan-sen) crosses below the Base Line (Kijun-sen).<\/strong><\/li>\n<li><strong>Lagging Span (Chikou Span) is below the past price.<\/strong><\/li>\n<li><strong>Price is below the Cloud (Senkou Span A &amp; B).<\/strong><\/li>\n<\/ol>\n<p class=\"wp-block-paragraph\">When a\u00a0<strong>Three Confirmations Bullish<\/strong>\u00a0signal appears, it is considered a\u00a0<strong>buy signal<\/strong>\u00a0based on the Ichimoku strategy. Conversely, a\u00a0<strong>Three Confirmations Bearish<\/strong>\u00a0signal is treated as a\u00a0<strong>sell signal<\/strong>.<\/p>\n<p class=\"wp-block-paragraph\">In this study, these signals will be\u00a0<strong>combined with machine learning model outputs<\/strong>\u00a0to generate\u00a0<strong>optimized trading decisions<\/strong>.<\/p>\n<p class=\"wp-block-paragraph\">\u00a0<strong>For more details on the Ichimoku Cloud strategy, refer to:<\/strong>\u00a0<a href=\"#\">Click Here<\/a><\/p>\n<h2 class=\"wp-block-heading\">Using XGBoost Machine Learning Algorithm for Signal Prediction<\/h2>\n<p class=\"wp-block-paragraph\"><strong>XGBoost (eXtreme Gradient Boosting)<\/strong>\u00a0is a machine learning algorithm based on\u00a0<strong>Gradient Boosting Decision Trees (GBDT)<\/strong>. It learns patterns in data by combining multiple weak\u00a0<strong>Decision Trees<\/strong>, gradually improving their predictive accuracy to form a\u00a0<strong>strong forecasting model<\/strong>. Due to its\u00a0<strong>high efficiency, interpretability, and strong generalization ability<\/strong>, XGBoost is widely applied in financial markets and quantitative trading strategies.<\/p>\n<p class=\"wp-block-paragraph\">In this study, we utilize\u00a0<strong>Ichimoku Cloud data<\/strong>\u00a0along with fundamental trading data such as\u00a0<strong>open, high, low, close, and volume (OHLCV)<\/strong>\u00a0to train the XGBoost model. The goal is to enable the model to\u00a0<strong>learn effective trading signals<\/strong>\u00a0and potentially\u00a0<strong>enhance investment performance<\/strong>.<\/p>\n<h4 class=\"wp-block-heading\"><strong>Data Preparation &amp; Model Training<\/strong><\/h4>\n<ol class=\"wp-block-list\">\n<li><strong>Dataset Split:<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>80% of the data<\/strong>\u00a0is used for\u00a0<strong>training<\/strong>, and\u00a0<strong>20%<\/strong>\u00a0is allocated for\u00a0<strong>testing<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Prediction Target:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The model predicts\u00a0<strong>trading signals<\/strong>\u00a0based on\u00a0<strong>future price movements<\/strong>.<\/li>\n<li>A\u00a0<strong>buy signal<\/strong>\u00a0is generated if the\u00a0<strong>stock price increases by more than 3% within the next five days<\/strong>.<\/li>\n<li>A\u00a0<strong>sell signal<\/strong>\u00a0is assigned otherwise.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p class=\"wp-block-paragraph\">By training the XGBoost model on these signals, we aim to identify the\u00a0<strong>hidden relationships between Ichimoku Cloud patterns and future price movements<\/strong>. The expectation is that the model will discover\u00a0<strong>profitable trading opportunities<\/strong>, ultimately improving overall\u00a0<strong>investment performance<\/strong>.<\/p>\n<p class=\"wp-block-paragraph\">\n<h2 class=\"wp-block-heading\"><strong>Trading Target<\/strong><\/h2>\n<p class=\"wp-block-paragraph\">This study focuses on a\u00a0<strong>single stock<\/strong>,\u00a0<strong>6446 <\/strong>, as the trading target. The strategy involves\u00a0<strong>adjusting capital allocation<\/strong>\u00a0dynamically based on entry and exit signals.<\/p>\n<p class=\"wp-block-paragraph\">The objective is to\u00a0<strong>outperform the buy-and-hold strategy<\/strong>\u00a0by optimizing\u00a0<strong>trading decisions<\/strong>\u00a0through the\u00a0<strong>Ichimoku Cloud and XGBoost model<\/strong>, aiming for\u00a0<strong>better investment performance<\/strong>.<\/p>\n<p class=\"wp-block-paragraph\">\n<h2 class=\"wp-block-heading\"><strong>Order Execution Logic<\/strong><\/h2>\n<p class=\"wp-block-paragraph\">This study implements\u00a0<strong>five trading strategies<\/strong>, each with a distinct logic:<\/p>\n<ol class=\"wp-block-list\">\n<li><strong>Buy-and-Hold Strategy<\/strong>\u00a0<em>(Benchmark)<\/em>\u00a0\u2013 Holding the stock without active trading.<\/li>\n<li><strong>Basic Ichimoku Cloud Strategy<\/strong>\u00a0\u2013 Trades based solely on Ichimoku Cloud signals.<\/li>\n<li><strong>Hybrid Strategy (Technical Indicator Focused)<\/strong>\u00a0\u2013 Ichimoku Cloud as the primary signal, with XGBoost as a secondary confirmation.<\/li>\n<li><strong>Hybrid Strategy (Machine Learning Focused)<\/strong>\u00a0\u2013 XGBoost as the primary signal, with Ichimoku Cloud as a secondary confirmation.<\/li>\n<li><strong>Machine Learning Model Strategy<\/strong>\u00a0\u2013 Trades based solely on XGBoost model predictions.<\/li>\n<\/ol>\n<p class=\"wp-block-paragraph\">Each strategy generates\u00a0<strong>buy and sell signals<\/strong>\u00a0based on either\u00a0<strong>Ichimoku Cloud<\/strong>\u00a0or\u00a0<strong>XGBoost predictions<\/strong>, forming\u00a0<strong>two sets of trading signals<\/strong>\u00a0during backtesting.<\/p>\n<p class=\"wp-block-paragraph\">General Strategy (Basic Ichimoku Kinko Hyo Strategy):<\/p>\n<p class=\"wp-block-paragraph\">This strategy executes trades based on the Ichimoku Kinko Hyo technical indicator. Upon the first occurrence of a buy signal, 50% of the capital position is allocated (to prevent the cash level from remaining too low and to dilute the overall strategy return). Each subsequent buy signal increases the position by 20%, while each sell signal reduces the position by 20% (adjusting the position size based on subsequent signals). Additionally, leverage usage is restricted within the trading logic, with a leverage cap of 100%, ensuring that the strategy does not exceed the principal amount (no leverage is applied) and that short selling is not allowed.<\/p>\n<h3 class=\"wp-block-heading\">Machine Learning Model Strategy:<\/h3>\n<p class=\"wp-block-paragraph\">This strategy executes trades based on the output of the XGBoost model. The position sizing logic follows the same rules as the general strategy (pure Ichimoku Kinko Hyo strategy).<\/p>\n<h3 class=\"wp-block-heading\">Hybrid Strategy (Primarily Technical Indicators):<\/h3>\n<p class=\"wp-block-paragraph\">Upon the first occurrence of a technical indicator buy signal, 50% of the capital position is allocated (to prevent the cash level from remaining too low and to dilute the overall strategy return). For subsequent trades, a dual-signal confirmation is required:<\/p>\n<ul class=\"wp-block-list\">\n<li>If both the technical indicator and machine learning model generate a buy signal, the position is increased by 30% (as the presence of both signals boosts investor confidence, leading to a larger position increase).<\/li>\n<li>If only the technical indicator generates a buy signal, but the machine learning model does not, the position is increased by only 10% (indicating lower investor confidence).<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">Similarly, leverage is not allowed, and short selling is prohibited in this strategy.<\/p>\n<h3 class=\"wp-block-heading\">Hybrid Strategy (Primarily Machine Learning Model):<\/h3>\n<p class=\"wp-block-paragraph\">The position sizing logic is similar to the hybrid strategy based on technical indicators, except that the primary signal for decision-making is derived from the machine learning model instead.<\/p>\n<p class=\"wp-block-paragraph\">\n<h2 class=\"wp-block-heading\">Machine Learning Model Results Presentation<\/h2>\n<figure class=\"wp-block-image size-full caption-align-center\"><img loading=\"lazy\" decoding=\"async\" alt=\" XGBoost \" class=\"wp-image-33274\" height=\"630\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/dd.png\" style=\"object-fit:cover\" width=\"986\"\/><figcaption class=\"wp-element-caption\"><strong>XGBoost Signal Generation Chart (Test Set)<\/strong> <strong>\u201c0: Hold, 1: Buy, 2: Sell\u201d<\/strong><\/figcaption><\/figure>\n<p class=\"wp-block-paragraph\">From the chart, it can be observed that the machine learning model\u2019s signal generation tends to fluctuate frequently, leading to inconsistent signals. As a result, placing trades strictly based on the model\u2019s signals may incur higher transaction costs. Additionally, it is noticeable that after\u00a0<strong>September 2024<\/strong>, the predicted signals are consistently\u00a0<strong>Sell<\/strong>signals. This phenomenon will be further discussed in the following sections.<\/p>\n<figure class=\"wp-block-image aligncenter size-full caption-align-center\"><img loading=\"lazy\" decoding=\"async\" alt=\" XGBoost \" class=\"wp-image-33276\" height=\"453\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/cc.png\" width=\"660\"\/><\/figure>\n<p class=\"wp-block-paragraph\">This chart represents the frequency of data features used during the training of the XGBoost model. Features that are used more frequently are considered more important. From the results, it can be observed that the top-ranked features are primarily technical indicators, indicating that incorporating these features, in addition to basic open-high-low-close-volume (OHLCV) data, enhances the model\u2019s predictive performance.<\/p>\n<figure class=\"wp-block-image aligncenter size-full caption-align-center\"><img loading=\"lazy\" decoding=\"async\" alt=\" XGBoost \" class=\"wp-image-33278\" height=\"432\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/jj.png\" width=\"502\"\/><\/figure>\n<p class=\"wp-block-paragraph\">This chart represents the\u00a0<strong>prediction confusion matrix<\/strong>\u00a0for the XGBoost model, where:<\/p>\n<ul class=\"wp-block-list\">\n<li>The\u00a0<strong>X-axis<\/strong>\u00a0represents the model\u2019s predicted signals.<\/li>\n<li>The\u00a0<strong>Y-axis<\/strong>\u00a0represents the actual signals in the test set.<\/li>\n<li>The numerical values indicate the frequency of occurrences for each classification.<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">The most important cells to analyze are:<\/p>\n<ul class=\"wp-block-list\">\n<li><strong>(Predicted Label = 1, True Label = 2) \u2192 (1,2)<\/strong><\/li>\n<li><strong>(Predicted Label = 2, True Label = 1) \u2192 (2,1)<\/strong><\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">These two cells indicate cases where the model\u2019s predictions are completely opposite to the actual signals.<\/p>\n<p class=\"wp-block-paragraph\">Starting with\u00a0<strong>(1,2)<\/strong>, this represents situations where the actual signal indicates a\u00a0<strong>sell<\/strong>, but the model predicts a\u00a0<strong>buy<\/strong>. The data shows that this scenario\u00a0<strong>never occurred (0 times)<\/strong>, suggesting that the model is less prone to this type of misclassification.<\/p>\n<p class=\"wp-block-paragraph\">On the other hand,\u00a0<strong>(2,1)<\/strong>\u00a0represents cases where the actual signal indicates a\u00a0<strong>buy<\/strong>, but the model predicts a\u00a0<strong>sell<\/strong>. This occurred\u00a0<strong>36 times<\/strong>. However, since the trading strategy prohibits short selling, this misclassification only results in\u00a0<strong>reducing positions or staying out of the market<\/strong>, rather than incurring actual losses due to shorting. Hence, while this prediction error might cause missed opportunities for gains, it does not directly lead to financial losses.<\/p>\n<p class=\"wp-block-paragraph\">\n<h2 class=\"wp-block-heading\">Performance Chart<\/h2>\n<p class=\"wp-block-paragraph\">\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full caption-align-center\"><img loading=\"lazy\" decoding=\"async\" alt=\" XGBoost \" class=\"wp-image-33286\" data-id=\"33286\" height=\"1990\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/fvfv.png\" width=\"2990\"\/><\/figure>\n<\/figure>\n<p class=\"wp-block-paragraph\">The first chart represents the\u00a0<strong>cumulative return<\/strong>\u00a0of different strategies. Looking at the final cumulative returns:<\/p>\n<ul class=\"wp-block-list\">\n<li>The\u00a0<strong>Benchmark (Buy-and-Hold Strategy)<\/strong>\u00a0achieved a cumulative return of\u00a0<strong>61.24%<\/strong>.<\/li>\n<li>The\u00a0<strong>Raw Strategy (Pure Technical Indicator Strategy)<\/strong>\u00a0had a cumulative return of only\u00a0<strong>15.44%<\/strong>, clearly underperforming the Buy-and-Hold approach.<\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\">Performance of Hybrid and Machine Learning Strategies<\/h3>\n<p class=\"wp-block-paragraph\">Examining the remaining strategies:<\/p>\n<ul class=\"wp-block-list\">\n<li>The\u00a0<strong>Hybrid Strategy (Technical Indicator Primary) [Mix Strategy 1]<\/strong>\u00a0achieved a cumulative return of\u00a0<strong>17%<\/strong>, slightly outperforming the Raw Strategy. This suggests that the machine learning model helped reinforce confidence in trade execution, leading to a slight improvement in returns. This demonstrates that machine learning contributes to strategy optimization.<\/li>\n<li>The final two strategies,\u00a0<strong>Machine Learning Strategy (ML Strategy)<\/strong>\u00a0and\u00a0<strong>Hybrid Strategy (Machine Learning Primary)<\/strong>, significantly outperformed the others. Their cumulative returns were\u00a0<strong>141.81%<\/strong>\u00a0and\u00a0<strong>137.52%<\/strong>, respectively. This highlights that the buy and sell signals generated by the machine learning model were far superior to those from technical indicators. The outstanding returns suggest that the XGBoost algorithm effectively captured patterns in the stock\u2019s price movements, enabling the strategy to\u00a0<strong>substantially outperform the Benchmark<\/strong>.<\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\">Observing Capital Utilization (Third Chart)<\/h3>\n<p class=\"wp-block-paragraph\">Next, we analyze the\u00a0<strong>capital utilization rate<\/strong>. Since leverage restrictions were imposed in the trading conditions, none of the four strategies employed leverage.<\/p>\n<p class=\"wp-block-paragraph\">Notably, during the stock\u2019s\u00a0<strong>uptrend from April 2024 to July 2024<\/strong>, the two\u00a0<strong>machine learning-driven strategies<\/strong>\u00a0built their positions\u00a0<strong>earlier<\/strong>\u00a0than the two\u00a0<strong>technical indicator-driven strategies<\/strong>. This provides evidence that the machine learning algorithm was able to\u00a0<strong>anticipate future price increases earlier<\/strong>, reinforcing the credibility of its predictive capability and the effectiveness of the strategy.<\/p>\n<p class=\"wp-block-paragraph\">\n<h2 class=\"wp-block-heading\">Stock Condition Analysis<\/h2>\n<figure class=\"wp-block-image size-full caption-align-center\"><img loading=\"lazy\" decoding=\"async\" alt=\" XGBoost \" class=\"wp-image-33288\" height=\"1489\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/bb.png\" width=\"1990\"\/><\/figure>\n<p class=\"wp-block-paragraph\">This chart represents the trading data for\u00a0<strong>stock 6446<\/strong>, covering both the backtesting period and the model training period.<\/p>\n<ul class=\"wp-block-list\">\n<li>The\u00a0<strong>first chart<\/strong>\u00a0displays the stock\u2019s\u00a0<strong>moving volatility<\/strong>, which helps assess price fluctuations. From the volatility chart, there is no significant structural change between the\u00a0<strong>volatility in the test set<\/strong>\u00a0and the\u00a0<strong>volatility in the training set<\/strong>.<\/li>\n<li>The\u00a0<strong>second chart<\/strong>\u00a0shows the\u00a0<strong>50-day moving average trend slope<\/strong>, which provides insight into short-term trends. The trend values did not exceed the highest point observed in the training set by a large margin; instead, they fluctuated within a certain range.<\/li>\n<li>However, the\u00a0<strong>third chart (price chart)<\/strong>\u00a0reveals that the stock price in the\u00a0<strong>test set<\/strong>\u00a0<strong>surpassed the highest price in the training set<\/strong>. This resulted in a scenario where the machine learning model encountered price levels it had\u00a0<strong>not learned from during training<\/strong>, leading to less reliable signal generation.<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">This explains why, in the\u00a0<strong>previous signal chart<\/strong>, the model continuously generated\u00a0<strong>sell signals at the end of the test set<\/strong>\u2014the model had never encountered such price levels before. This highlights a key limitation of relying solely on\u00a0<strong>machine learning models for signal generation<\/strong>, as they may struggle in\u00a0<strong>unseen market conditions<\/strong>.<\/p>\n<p class=\"wp-block-paragraph\">Therefore, it is recommended to\u00a0<strong>combine technical indicators or other analytical methods<\/strong>\u00a0to form a more\u00a0<strong>comprehensive strategy<\/strong>\u00a0for trade execution.<\/p>\n<p class=\"wp-block-paragraph\">\n<h2 class=\"wp-block-heading\">Discussion &amp; Future Research Directions<\/h2>\n<p class=\"wp-block-paragraph\">This study evaluates the effectiveness of trading strategies using only a\u00a0<strong>single stock<\/strong>. However, whether similar results hold across\u00a0<strong>other stocks or industries<\/strong>\u00a0requires further analysis and research.<\/p>\n<p class=\"wp-block-paragraph\">Additionally, when the stock price in the\u00a0<strong>test set surpasses its historical high<\/strong>, it may indicate that the current model is no longer suitable for making predictions. A potential\u00a0<strong>improvement<\/strong>\u00a0for future research could be designing\u00a0<strong>alert thresholds<\/strong>\u00a0that signal when the price level has exceeded the model\u2019s applicable range. Once the threshold is triggered, adjustments to the\u00a0<strong>model or trading strategy logic<\/strong>\u00a0may be necessary to\u00a0<strong>reduce investment risk<\/strong>.<\/p>\n<p class=\"wp-block-paragraph\">For future research, readers may consider\u00a0<strong>training the model with a broader set of features<\/strong>, such as incorporating different types of data attributes (<strong>volatility, 50-day moving average trend slope, and other technical indicators<\/strong>). These additional features could help the model\u00a0<strong>capture higher-dimensional price patterns and variations<\/strong>, potentially improving predictive performance.<\/p>\n<p class=\"wp-block-paragraph\">\n<p class=\"wp-block-paragraph\"><strong>Important Reminder<\/strong>: This analysis is for reference only and does not constitute any product or investment advice.<\/p>\n<p class=\"wp-block-paragraph\">We welcome readers interested in various trading strategies to consider purchasing relevant solutions from\u00a0<mark class=\"has-inline-color has-black-color\" style=\"background-color:rgba(0, 0, 0, 0)\"><a data-id=\"https:\/\/www.tejwin.com\/en\/solution\/quantitative-finance-solution\/\" data-type=\"link\" href=\"\/en\/solution\/quantitative-finance-solution\/\">Quantitative Finance Solution<\/a>. <\/mark>With our high-quality databases, you can construct a trading strategy that suits your needs.<\/p>\n<div aria-hidden=\"true\" class=\"wp-block-spacer\" style=\"height:33px\"><\/div>\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button has-custom-width wp-block-button__width-100 has-custom-font-size\" style=\"font-size:22px\"><a class=\"wp-block-button__link has-background wp-element-button\" href=\"\/en\/databank-solution\/financial-data\/\" style=\"border-radius:16px;background:linear-gradient(135deg,rgb(243,224,131) 0%,rgb(102,197,166) 50%,rgb(51,132,181) 100%)\"><strong>Access to Comprehensive Quantitative Data<\/strong><br \/><strong>Start Building Portfolios That Outperform the Market Today!<\/strong><\/a><\/div>\n<\/div>\n<div aria-hidden=\"true\" class=\"wp-block-spacer\" style=\"height:22px\"><\/div>\n<p class=\"has-text-align-center wp-block-paragraph\" style=\"font-size:32px\"><mark class=\"has-inline-color has-vivid-cyan-blue-color\" style=\"background-color:rgba(0, 0, 0, 0)\"><strong><em>\u201cTaiwan stock market data, TEJ collect it all<\/em><\/strong><\/mark><\/p>\n<p class=\"wp-block-paragraph\">The characteristics of the Taiwan stock market differ from those of other European and American markets. Especially in the first quarter of 2024, with the <strong><mark class=\"has-inline-color\" style=\"background-color:rgba(0, 0, 0, 0);color:#c05d5d\">Taiwan Stock Exchange reaching a new high of 20,000 points<\/mark><\/strong> due to the rise in TSMC\u2019s stock price, global institutional investors are paying more attention to the performance of the Taiwan stock market.\u00a0<\/p>\n<p class=\"wp-block-paragraph\"><strong><mark class=\"has-inline-color\" style=\"background-color:rgba(0, 0, 0, 0);color:#0978b8\">Taiwan Economical Journal (TEJ)<\/mark><\/strong>, a financial database established in Taiwan for over 30 years, serves local financial institutions and academic institutions, and has long-term cooperation with internationally renowned data providers, providing high-quality financial data for five financial markets in Asia.\u00a0<\/p>\n<ul class=\"wp-block-list\">\n<li><strong><mark class=\"has-inline-color has-black-color\" style=\"background-color:#ebc766\">Complete Coverage<\/mark><\/strong>: Includes all listed companies on stock markets in Taiwan, China, Hong Kong, Japan, Korea, etc.\u00a0<\/li>\n<li><strong><mark class=\"has-inline-color\" style=\"background-color:#ebc766\">Comprehensive Analysis of Enterprises<\/mark><\/strong>: Operational aspects, financial aspects, securities market performance, ESG sustainability, etc.\u00a0<\/li>\n<li><strong><mark class=\"has-inline-color\" style=\"background-color:#ebc766\">High-Quality Database<\/mark><\/strong>: TEJ data is cleaned, checked, enhanced, and integrated to ensure it meets the information needs of financial and market analysis.\u00a0<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">With TEJ\u2019s assistance, you can access relevant information about major stock markets in Asia, such as securities market, financials data, enterprise operations, board of directors, sustainability data, etc., providing investors with timely and high-quality content. Additionally, TEJ offers advisory services to help solve problems in theoretical practice and financial management!<\/p>\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-3e41869c wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button has-custom-width wp-block-button__width-100 has-custom-font-size\" style=\"font-size:21px\"><a class=\"wp-block-button__link has-background has-text-align-center wp-element-button\" href=\"\/en\/contact\/\" style=\"border-radius:16px;background:linear-gradient(135deg,rgb(160,209,216) 0%,rgb(51,145,181) 50%,rgb(50,95,191) 100%)\"><strong>Want to Learn More About Our Databases and Solutions?<br \/>Contact Us and Get the Free Trial Today!<\/strong><\/a><\/div>\n<\/div>\n<h2 class=\"wp-block-heading\">Full Code Link\uff1a<a href=\"https:\/\/github.com\/tejtw\/TQuant-Lab\/blob\/main\/example\/TQ_%E6%A9%9F%E5%99%A8%E5%AD%B8%E7%BF%92%E7%AE%97%E6%B3%95%20XGBoost%20%E6%8F%90%E5%8D%87%E6%8A%80%E8%A1%93%E6%8C%87%E6%A8%99%E4%B8%80%E7%9B%AE%E5%9D%87%E8%A1%A1%E8%A1%A8%E7%9A%84%E6%8A%95%E8%B3%87%E7%B8%BE%E6%95%88.ipynb\" rel=\"noopener\" target=\"_blank\">Click Here<\/a><\/h2>\n<h2 class=\"wp-block-heading\">Further Reading<\/h2>\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.tejwin.com\/insight\/%e4%b8%80%e7%9b%ae%e5%9d%87%e8%a1%a1%e8%a1%a8%e7%ad%96%e7%95%a5\/\">TQuant Lab Ichimoku Kinko Hyo Strategy, A Self-contained Technical Analysis Indicator<\/a><\/p>\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.tejwin.com\/insight\/%e6%8f%ad%e9%96%8b%e6%8a%95%e8%b3%87%e5%a4%a7%e5%b8%ab%e7%9a%84%e9%81%b8%e8%82%a1%e5%af%86%e7%a2%bc%ef%bc%9a%e9%ba%a5%e5%85%8b%ef%bc%8e%e5%96%9c%e5%81%89%e6%94%b6%e7%9b%8a%e5%9e%8b%e6%8a%95%e8%b3%87\/\">Michael Sivy\u2019s 4 Key Income Investing Principles Unveiled<\/a><\/p>\n<h2 class=\"wp-block-heading\">Related Links<\/h2>\n<ul class=\"wp-block-list\">\n<li><a class=\"ek-link\" href=\"https:\/\/github.com\/tejtw\/TQuant-Lab\" rel=\"noreferrer noopener\" target=\"_blank\">TQuant Lab Github<\/a><\/li>\n<li><a class=\"ek-link\" href=\"https:\/\/tquant.tejwin.com\/\" rel=\"noopener\" target=\"_blank\">TQuant Lab \u9996\u9801<\/a><\/li>\n<\/ul>\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Traditional\u00a0Ichimoku strategies\u00a0rely on fixed parameters (9-26-52) and visual interpretation, making them inflexible in adapting to different market conditions. XGBoost learns complex high-dimensional relationships between different data points and enhances the filtering and decision-making process of trading signals. This article use XGBoost to enhance investment performance of Ichimoku Cloud.<\/p>\n","protected":false},"featured_media":1079,"template":"","tags":[65,70,71],"insight_category":[13],"class_list":["post-1086","insight","type-insight","status-publish","has-post-thumbnail","hentry","tag-python","tag-tej-api","tag-quantitative-strategy","insight_category-quant-research"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/1086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight"}],"about":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/types\/insight"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media\/1079"}],"wp:attachment":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media?parent=1086"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/tags?post=1086"},{"taxonomy":"insight_category","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight_category?post=1086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}