If you have heard of systematic trading or algorithmic trading, then you must know that optimization of strategy is among one of the most important factors that dictate whether the strategy would even break even. And the worst part is: optimization is very computationally heavy. Imagine a simple MACD crossover strategy, there will be at least 3 parameters: fast, slow and signal moving average period, and hundreds of possible values for each, making it more than a million possible combinations.

Incomes genetic algorithm (GA): a probabilistic & heuristic searching algorithm inspired by Darwin’s theory on natural selection that the fittest survive through generations. In this blog, we are going to use GA as an optimization algorithm for identifying the best set of parameters. We will be illustrating it with a simple MACD crossover on Nvidia. Remember, this is only a demonstration of the application of GA for optimizing trading strategy and should not be copied nor followed blindly.

#python #data-science #machine-learning #trading

Genetic Algorithm for Trading Strategy Optimization in Python
6.30 GEEK