Abstract
The stochastic, non-linear, and dynamic nature of financial markets significantly diminishes the effectiveness of traditional trading stratsgies relying on fixed parameters over extended periods. While the Efficient Market Hypothesis (EMH) suggests that asset prices reflect all available information, rendering systematic profit generation impossible, the field of algorithmic trading operates on the premise that temporary market inefficiencies and behavioral anomalies can be exploited. This study presents a comprehensive Genetic Algorithm (GA) framework designed to develop and optimize an adaptive trading strategy for multi-asset portfolios consisting of high-liquidity technology stocks (Apple, Microsoft, Google). Unlike traditional optimization methods that focus solely on parameter tuning for a single indicator, the proposed system introduces a novel "genetic switch" mechanism. This mechanism allows the algorithm to simultaneously optimize the structural components of the strategy determining which combination of indicators (EMA, MACD, RSI, Momentum) yields the best performance and their respective parameters. The model’s fitness function prioritizes risk-adjusted returns by utilizing a Calmar-like ratio, explicitly penalizing excessive drawdowns. To ensure robustness and mitigate the prevalent risk of overfitting (data snooping bias), a rigorous Walk-Forward Optimization (WFO) technique was applied to daily data spanning the 2020-2024 period. The findings demonstrate that the proposed GA framework generates a robust trading system that statistically outperforms the passive "buy-and-hold" strategy, achieving a higher Sortino Ratio (1.98 vs 1.21) and significantly lower maximum drawdown (-18.5% vs -35.1%). The outperformance over the buy-and-hold benchmark is statistically validated across all walk-forward windows, indicating robustness rather than data snooping effects.
References
Bodek, H., 2013. The Problem of HFT: Collected Writings on High Frequency Trading & Stock Market Structure Management. Decimus Capital Markets.
Chen, W., H. Zhang, and M. K. Mehlawat, 2022. A review of evolutionary algorithms for financial trading strategies: a decade survey. Archives of Computational Methods in Engineering, 29: 475–502.
De Prado, M. L., 2018. Advances in Financial Machine Learning. John Wiley & Sons.
Fama, E. F., 1970. Efficient capital markets: A review of theory and empirical work. The Journal of Finance, 25: 383–417.
Goldberg, D. E., 1989. Genetic Algorithms in Search, Optimization, and Machine Learning. Addison-Wesley.
Jansen, S., 2020. Machine Learning for Algorithmic Trading: Predictive models to extract signals from market and alternative data for systematic trading strategies with Python. Packt Publishing Ltd.
Li, Y. and L. Zhao, 2022. A genetic algorithm-based backpropagation neural network for stock price prediction. Journal of Financial Data Science, 4: 108–123.
Lo, A. W., 2004. The adaptive markets hypothesis: Market efficiency from an evolutionary perspective. Journal of Portfolio Management, 30: 15–29.
Lohpetch, D. and D. Corne, 2010. Outperforming buy-and-hold with evolved technical trading rules: Daily, weekly and monthly trading. Applied Soft Computing, 10: 1189–1198.
Murphy, J. J., 1999. Technical Analysis of the Financial Markets: A Comprehensive Guide to Trading Methods and Applications. Penguin.
Pardo, R., 2008. The Evaluation and Optimization of Trading Strategies. John Wiley & Sons.
Shiller, R. J., 2003. From efficient markets to behavioral finance. Journal of Economic Perspectives, 17: 83–104.
Singh, P. and S. Kumar, 2021. Optimization of technical trading rules using genetic algorithm for Indian stock market. Journal of King Saud University-Computer and Information Sciences, 33: 705–714.
Wilder, J. W., 1978. New Concepts in Technical Trading Systems. Trend Research.

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
