Automated Trading Strategy #67
This is our first strategy based on correlated markets.
Important: There is no guarantee that our strategies will have the same performance in the future. We use backtests to compare historical strategy performance. Backtests are based on historical data, not real-time data so the results we share are hypothetical, not real. There are no guarantees that this performance will continue in the future. Trading futures is extremely risky. If you trade futures live, be prepared to lose your entire account. We recommend using our strategies in simulated trading until you/we find the holy grail of trade strategy.
As a quick reminder, our goal is to find the holy grail of automated trade strategy.
We haven’t found the holy grail yet, but we get closer with every strategy. Click here for the most recent performance chart.
I make a point of following all things banking. This week, the FDIC released its quarterly performance report. The chart below was taken from that publication. It shows that banks made $79.8 billion in the first quarter of 2023 (suddenly that theoretical trillion dollar coin doesn’t seem so ridiculous).
If you remove non-cash items, like the accounting treatment for failed institutions, the main reason for these record profits is “record-high trading revenue at large banks”.
Trading floors do well in volatile markets. What exactly are these banks doing to make this trading revenue? Most of it comes from fixed income, but banks also make trading revenue by engaging in algorithmic trading, high-frequency trading (subset of algorithmic trading), statistical arbitrage (exploiting price discrepancies), the use of ML and AI (ideal for pattern recognition beyond candlesticks), quantitative trading, pairs trading (identifying two correlated securities and taking positions based on their relative price movements), and options trading. At the heart of each is the employment of models to identify market-based relationships.
In general, there are five market based strategies that are used to identify these relationships: mean reversion, momentum, arbitrage, correlation trading and trend following. I’m not interested in arbitrage strategies, and we’ve already invested a lot of time exploring trend and momentum based strategies. These indicators work fine until they don’t and so one must focus on defining the conditions in which they do.
Thanks to ChatGPT, I’ve been able to review about 15 different examples of the various models used by ML/AI financial forecasting models that are currently in use today. There is a common denominator among them: the use of correlations and measures of co/divergence to determine relationships. This appears to be one of the most efficient ways for AI to both learn the relationship between two markets and develop a forecast based on the nature of that relationship without the need for large computational resources.
So, Strategy 67 is based on the use of correlations to find 100% win rate trades. I’m sure what we’ve created is crude compared to what you might find in large banks, but it’s a start.
I admit to steering away from correlations. I actually attempted to create a strategy using correlations last year, but could never get the indicator to work properly. I think we’ve worked through the issues. Thank you Kurt and Chris for your help.
Let’s get started.
Strategy 67 Description, Command Structure & Download (C#)
With Strategy 67, we’re using correlations to find high win rate trades. NT8’s correlation indicator is not intuitive, but it works.
The goal is to use this strategy as a building block for future strategies that use correlations.
This particular strategy is based on the correlation of a market with the ES futures contract. I’ll discuss some ideas for future iterations below.
First, let’s have a look at what we mean by correlation.
This chart shows the relationship between four equity futures markets: NQ, ES, RTY and MES. As you can see, they tend to move in tandem. That is, it looks like the prices are “sticky”. This “stickiness” can be measured by using correlation.
These relationships are so stable that traders like to use them for making trading decisions. In particular, what to do when there’s a divergence.
Since ES and NQ are so highly correlated (in general), when they aren’t, we can set a trap and that trap should have a high win rate, especially in the extreme. In other words, the greater the negative correlation, the higher the win rate and the lower the trade count.
For Strategy 67, we’re going to use NT8’s correlation indicator. The graph below shows the correlation between ES and NQ on a 15 minute data series. Output is between -1 and 1, but is generally close to 1, which means the two markets are highly correlated.
The goal is to take advantage of those rare occasions when this relationship breaks down. The more it diverges, the stronger the opportunity.
Here’s an example of a strong opportunity:
That dip represents an anomaly that we’re going to use to our advantage. It’s when the correlation between ES and NQ drops from positive to negative. This is what we’re interested in.