← All Articles

Let’s Think Outside the Box For Trading Strategy Optimization

I had 3 epiphanies about algorithmic trading…

The first one came yesterday morning: every tutorial on trading strategy optimization is exactly the same. The author introduces the idea of “optimization”, shows some Python code, and ends the article with simulated backtest results. For somebody interested in algorithmic trading, these articles tend to leave a lot to be desired.

The second thought came last night: could trading-rule search benefit from the larger parameter spaces and computational budgets used to train neural networks? A sufficiently expressive neural network represents a function; the training procedure searches its parameters. That distinction matters for the analogy.

The third thought is to use a genetic algorithm to search a model’s parameters. The model represents the function; the GA scores candidate parameter vectors, selects parents and changes the vectors. For a neural network, the fitness objective could be negative prediction loss. Reaching similar predictions to gradient descent is a hypothesis to compare under the same architecture, data and compute budget, not a guarantee from raising the mutation rate. The lottery-ticket paper concerns sparse trainable subnetworks; it does not establish this GA-versus-gradient-descent claim.

Trading illustration: encode a moving-average rule as [short window, long window], such as [20, 100]. A mutation to [25, 100] changes when the crossover condition fires. Score both candidates on the same training dates and chosen objectives, then compare the selected candidate on a period that did not guide the search. Those are hypothetical parameters, not a completed experiment in this preview.

With these 3 epiphanies, I posed a question in my head: if we trained a genetic algorithm more similar to how we train neural networks, with more parameters and computational power, could it arrive at better solutions?

This article will explore this question. I will launch an experiment where I deploy such a strategy. First, I will create the automated investing strategy rules. Then, I will optimize it in a unique way similar to how one might optimize neural networks, but without gradient descent. Finally, I’ll deploy the strategy for real-time paper trading and give updates as I measure the strategy’s real-time performance. 

Read the rest of the article here for free!   Subscribe to NexusGenAI Go to NexusTrade  

📚 Follow our thought pieces on Medium 

 

🤝 Connect with me on LinkedIn

 

👨‍💻 Explore our projects on GitHub

 

📸 Catch us on Instagram

 

🎵 Dive into our TikTok 

Put your research to work

Create a free account to research a company, build a strategy with Aurora, or inspect a historical backtest. Choose the task you want to try.

or

Free to browse. No credit card required.

Discussion

Sign in or create a free account to join the discussion.

No comments yet.