The Rise of AI in Automated Portfolio Investment
In the ever-evolving landscape of finance, artificial intelligence (AI) has emerged as a transformative force in shaping investment strategies. The development of sophisticated AI systems, such as the Knave series — ranging from Knave I to VI — represents a significant advancement in the automation and optimization of portfolio management. Each iteration within this series is equipped with unique capabilities, meticulously designed to perform specific functions in the investment process. This article explores how the Knave series leverages AI to navigate complex financial markets and enhance portfolio performance.
The Knave series is structured as a hierarchical system, with each unit possessing specialized skills tailored to address distinct aspects of portfolio management. The first two units, Knave I and Knave II, are primarily responsible for the operational execution at a tactical level of investment strategies. Their main function is to implement buy, sell, and hold decisions based on the broader strategy defined by the team. These units are designed to react swiftly to market movements, ensuring that trades are executed in a timely and efficient manner.
Knave III plays a crucial role in analyzing market sentiment. This unit utilizes advanced natural language processing (NLP) and machine learning techniques to gauge the emotional and psychological state of the market. By analyzing data from various sources such as news outlets, social media, and financial reports, Knave III generates insights on market sentiment, which are then shared with Knave I and II to refine their operational decisions. This approach ensures that the portfolio is not only data-driven but also attuned to the broader market mood.
Knave IV acts as the orchestrator of the series, ensuring seamless integration and communication among the different Knave units. As the team leader, Knave IV coordinates the flow of information, verifies that each unit’s actions align with the overall strategic goals, and monitors for any discrepancies or deviations. This level of oversight is critical to maintaining a cohesive strategy and ensuring that all units operate harmoniously towards a common objective.
At the strategic level, Knave V and Knave VI are focused on risk management and opportunity identification. These units employ advanced modeling techniques to simulate various market scenarios and assess potential risks and returns. They collaborate to develop analogies and patterns that may reveal hidden opportunities or threats, thereby crafting a more comprehensive investment strategy. Their work is vital in anticipating market shifts and preparing the portfolio to adapt to a wide range of possible future conditions.
Our analysis of the general investment landscape reveals that premium funds like the Medallion Fund, Quantum Fund, and Bridgewater Associates have consistently delivered high returns, attributed largely to their sophisticated and diversified investment strategies. The Medallion Fund, operated by Renaissance Technologies, employs advanced quantitative trading, high-frequency trading, and statistical arbitrage to achieve an estimated compound annual growth rate (CAGR) of 62–66% before fees. This fund is highly reliant on cutting-edge data processing capabilities and complex algorithms, making it both powerful and highly secretive. Similarly, the Quantum Fund, managed by George Soros, focuses on global macro strategies and currency speculation, delivering returns of 30–40% while navigating high exposure to global market volatility. Bridgewater Associates, founded by Ray Dalio, utilizes a combination of global macro strategies, risk parity, and the All Weather Strategy to achieve returns between 20–30%, although it is heavily dependent on macroeconomic data and models.
Other notable funds, such as Berkshire Hathaway and Two Sigma, also demonstrate strong performance. Berkshire Hathaway, led by Warren Buffett, relies on value investing and fundamental analysis to achieve a CAGR of 20–30%. This approach focuses on equities with transparent financials and a buy-and-hold strategy. Two Sigma, on the other hand, combines quantitative trading, machine learning, and statistical arbitrage to deliver returns of 30–40%, leveraging advanced technology and vast datasets to optimize its investment decisions. These A+ and A-rated funds exemplify a range of sophisticated techniques, from macroeconomic speculation to high-frequency data-driven trading, each presenting unique strengths and operational challenges, such as high data processing demands and sensitivity to market volatility.
Our journey into automated portfolio management began with a focus on simple technical trading strategies, such as the Moving Average Convergence Divergence (MACD) indicator. The MACD is a popular tool among traders, known for its straightforward approach to identifying potential buy and sell signals. It uses the crossover of two exponential moving averages (EMA), typically the 12-day and 26-day EMAs. When the 12-day EMA crosses above the 26-day EMA, it generates a buy signal; conversely, when the 12-day EMA crosses below the 26-day EMA, it signals a sell.
While widely used, the traditional MACD strategy has limitations in its predictive power. According to the research paper, “A Refined MACD Indicator — Evidence against the Random Walk Hypothesis?”, rigorous testing of the MACD indicator across the NASDAQ-100 stocks over a decade revealed a surprisingly low success rate of 32.73%. This suggests that, while the MACD can sometimes predict market movements, its effectiveness is limited when tested under varied market conditions over longer periods.
Recognizing these limitations, the study proposed two refined methods to improve upon the traditional MACD strategy, addressing its shortcomings through rigorous testing to mitigate the risks of data-snooping — falsely identifying patterns in random data. The second of these methods, known as MACDR2, significantly improved the success rate to 89.39%. This refined strategy showed a strong positive correlation with stock volatility, indicating that it performs better in more turbulent markets. Additionally, its effectiveness can be further enhanced through the use of option trading.
However, the enhanced method also comes with caveats. The risk-adjusted performance, as measured by the Sharpe ratio, which accounts for both risk and return, demonstrated mixed results. The Sharpe ratio is particularly sensitive to the volatility inputs used in models like Black-Merton, which can affect the strategy’s perceived effectiveness. Furthermore, adjustments to the length of the exponential moving averages — either shorter or longer — do not significantly improve the success rate of the traditional MACD. Interestingly, the success rate of the MACDR2 method is slightly positively correlated with longer exponential moving averages, suggesting some benefit in fine-tuning the parameters based on market conditions.
Our Journey to Develop the GRU-MACD Strategy
Despite some limitations outlined in the literature, we decided to utilize the MACD as our tactical trading strategy due to its versatility across all seasons and asset types. Unlike value investing (VI) approaches that require detailed accounting data, the MACD can be applied to various asset classes with price-based signals. This flexibility makes it suitable for diverse market conditions. However, recognizing the potential shortcomings of the traditional MACD, we conducted a thorough review of recent literature on applying machine learning (ML) techniques to enhance the MACD strategy. After experimenting with several neural network (NN) topologies, including Recurrent Neural Networks (RNNs), Long Short-Term Memory (LSTM) networks, and Gated Recurrent Units (GRUs), we found that while RNNs and LSTMs excel in capturing regression patterns in data, the GRU demonstrated a unique ability to adapt to the natural volatility of equity markets.
Our experimentation with the GRU-MACD strategy revealed several key findings. We focused on specific cyclical assets, including SPDR Gold Shares (GLD), United States Oil Fund (USO), iShares Silver Trust (SLV), Invesco DB Agriculture Fund (DBA), iShares U.S. Home Construction ETF (ITB), SPDR S&P Metals & Mining ETF (XME), Invesco Dynamic Leisure and Entertainment ETF (PEJ), and Vanguard Consumer Discretionary ETF (VCR). These assets are influenced by various external factors such as commodity prices, macroeconomic changes, industry-specific developments, and political volatility, leading to distinct cyclical price movements.
The GRU-MACD strategy outperformed both the traditional MACD and a Buy & Hold approach for most of these assets. However, there were exceptions, such as USO, DBA, and XME, where the GRU-MACD strategy resulted in losses. These assets exhibited higher volatility compared to others in the study, with USO, for example, having the highest standard deviation of 0.028064, indicating significant price fluctuations. The average cycle length for these assets was around 25–27 days, suggesting shorter cycles that may not be ideally suited for prediction using GRU, which typically performs better with more pronounced long-term trends.
The performance of the GRU-MACD strategy in assets with high volatility and short cycles, such as USO, DBA, and XME, highlighted some of its limitations. High volatility and shorter cycles often lead to unpredictable short-term price movements influenced by multiple factors, such as economic announcements, policy changes, and shifts in supply and demand. The GRU model, as applied in the GRU-MACD strategy, may not be optimally tuned to predict these frequent and erratic movements, resulting in potential losses when applied to such volatile assets.
From our findings, the GRU-MACD strategy appears to work well in markets with clearer trends and moderate volatility but may not be as effective for assets characterized by short cycles and high volatility. To improve the effectiveness of the GRU-MACD strategy with such assets, further model optimization may be necessary, including adjusting the GRU parameters, such as the number of hidden units or layers, to better capture shorter trends and adapt to higher volatility. Additionally, incorporating more technical indicators or fundamental analysis techniques could enhance decision-making and improve the strategy’s ability to handle specific cyclical price movements.
Addressing the Limitations of GRU-MACD
While our GRU-MACD strategy has shown strong potential, it does have certain limitations, particularly in highly volatile markets with short cycle durations. To address these limitations, we have explored several alternative strategies that can better capture short-term market movements and respond quickly to volatility, where the GRU-MACD may not perform optimally.
In markets characterized by high volatility and short cycles, strategies that can respond rapidly to price movements and better capture short-term trends are more suitable than the GRU-MACD. One such approach is momentum trading, which focuses on trading in the direction of existing price trends, essentially “riding the wave” of short-term market momentum. This strategy uses indicators such as the Relative Strength Index (RSI), Stochastic Oscillator, and Rate of Change (ROC) to identify trading opportunities when assets become overbought or oversold in the short term. Momentum trading is advantageous because it can effectively capture rapid price movements and respond swiftly to market volatility, making it particularly useful in highly volatile markets.
Mean reversion trading and breakout trading are two effective strategies for volatile markets with short cycles. Mean reversion relies on the idea that asset prices will eventually return to their average, capitalizing on deviations by using indicators like Bollinger Bands and Statistical Z-Scores. In contrast, breakout trading focuses on identifying and exploiting sharp price movements when assets break through key support or resistance levels, using tools like Moving Averages and Pivot Points. Both strategies are designed to profit from short-term price fluctuations. Algorithmic trading also offers a strong alternative in such environments, using sophisticated algorithms and rapid data processing to make automated decisions based on a range of technical, fundamental, and sentiment data, providing an agile response to fast market changes.
The GRU-MACD strategy, which combines machine learning with technical analysis, is inherently more competitive than human seasonal trading due to its adaptability and ability to learn from complex patterns in real-time data. Unlike seasonal investors, who rely on fixed historical patterns and basic technical tools like moving averages and trend lines, the GRU-MACD can continuously adapt to changing market conditions by detecting non-linear relationships and learning from new data inputs. This adaptability allows the GRU-MACD to perform consistently across a range of market conditions, while human traders often struggle to adjust to unpredictable markets and can suffer from overfitting to historical data. Furthermore, the GRU-MACD’s reliance on advanced computational models enables it to respond more rapidly and accurately to market shifts, whereas human traders are limited by their dependence on recurring seasonal patterns and their slower, more rigid decision-making processes.
Optimizing the GRU-MACD Strategy with a Mixed Method Approach
According to the “Fund’s Categories and Performance” table presented earlier in this article, the GRU-MACD strategy, while superior to a fatigued human operator, still has its limitations. As a result, we categorize the plain GRU-MACD fund as C+, with a CAGR of around 8–12%. Although there are various mechanisms to enhance the performance of the standard GRU-MACD — referred to as “internal improvements” — these methods are estimated to yield only a marginal increase of 2–3% in performance. Instead of relying solely on these internal enhancements, we chose a mixed-method approach to improve our investment strategy.
Our mixed-method approach begins by diversifying our portfolio across five distinct asset classes, carefully selected based on geopolitical and economic analyses of our target markets. This diversification allows us to integrate a multi-layered system into our investment strategy: a strategic layer driven by macroeconomic analysis and a tactical layer that executes precise trading strategies using the GRU-MACD model. To further refine our approach, we employ trend analysis of target assets using Elliott Wave Theory. Recognizing that Elliott Wave interpretation can be subjective, we have developed a specific algorithm to apply consistent criteria for defining each wave across various assets. Additionally, we use a sine wave to smooth out the Elliott Wave, ensuring a more objective and consistent analysis. This combined strategy allows us to achieve better overall performance, particularly since the GRU-MACD model inherently includes a cut-loss mechanism to mitigate risk.
As demonstrated in the table, our Advanced Geopolitical GRU-MACD Fund is rated as a B+ fund with an estimated CAGR of 12–20%. However, even with these advancements, this approach does not reach the upper echelons of the A-grade funds listed in the table. To break through this “glass ceiling,” we are continually refining our geopolitical analysis model to better align portfolio investments with market rhythms, as evidenced by our accurate predictions over the past several years. Future enhancements will involve further fine-tuning our AI models to maintain a competitive edge.
In the final section, we plan to conduct an empirical test using specific stocks from the Thai stock market, such as INET.BK, to compare against other tech stocks like ADVANC.BK and AAPL, with which we are familiar. We will incorporate a sophisticated layer of accounting and financial ratio analysis to gain a deeper understanding of our overall investment strategy. It is important to note that this test is purely for experimental and educational purposes. While our GRU-MACD model may identify potential buy and sell points, this should not be taken as investment advice. Due to regulations from the Thai Securities and Exchange Commission (SEC), uncertified investment advisors are prohibited from making specific stock recommendations, and this holds true in any regulated stock market.
As we stand on the threshold of a new era — the era of full agentic AI — we find ourselves in a period of transition reminiscent of the time when steam engines began to coexist with traditional horse-drawn carriages. Much like then, the full potential of this new technology has yet to be realized. This era presents two distinct and potentially dangerous classes: the first is the “marketing-emo” class, individuals who seek to profit from the AI hype without a deep understanding of its underlying mechanisms. The second is the sophisticated AI scholar, who, while possessing a thorough knowledge of AI’s inner workings, often fails to grasp its full potential. Constrained by the limitations of traditional academia, they risk missing the true revolutionary moment, much like how Xerox PARC’s innovations were overshadowed by Apple and Microsoft, who successfully brought the Windows-based PC to market. It is crucial to demonstrate how AI can surpass traditional, human-driven portfolio investment strategies. Our new hybrid AI-human automated portfolio investment approach is our proof that the AI era has truly arrived.
(TBD)