PyQuant News 🐍
PyQuant News 🐍

@pyquantnews

11 Tweets 7 reads Feb 08, 2023
Trying to build an algorithmic trading strategy without a framework is like walking through the jungle without a map.
Unfortunately, most beginners get frustrated finding it.
Steal this 8-step framework.
And never get lost again.
1/ The idea
Look for market anomalies that repeat.
Your strategy should be based on some economic rationale. In other words, β€œusing machine learning” is not a trading strategy.
2/ Research
Find out if the anomaly you think you found actually exists in history.
Get data and start exploring.
3/ Trade signals
Use an algorithm that can detect weak signals in data with a lot of noise.
Use a price filter first to help.
4/ Minimum Viable Python
If you made it this far, assess the strategy for an edge.
You're only trying to determine if the algorithm has an edge or not. If it does not generate a series of profitable trades, improve the algorithm or try another one.
5/ The backtest setup
Add elements that will affect performance and run out-of-sample tests.
Focus on optimizing parameters that are dependent on the marketβ€”don’t brute force optimize to find peak profit.
6/ The backtest analysis
Run state-of-the-art methods like walk-forward optimization to remove bias.
Check the validity of the backtest by randomizing the historic prices, retraining the model, and testing it again.
7/ Risk and performance analysis
Check risk metrics like drawdown, volatility, and VaR.
Since active trading takes time, your results should be significantly better than a simple buy-and-hold strategy.
8/ Execution
Let the strategy run and manually trade the signals it generates, hook up the strategy to a paper trading account, and finally, move to live execution.
Your map to building algorithmic trading strategies:
1. The idea
2. Research
3. Trade signals
4. Minimum Viable Python
5. The backtest setup
6. The backtest analysis
7. Risk and performance analysis
8. Execution
I cover these steps in a lot more detail in a recent newsletter issue.
You can read it for free:
pyquantnews.com

Loading suggestions...