Multi-Factor Hedging with Clustering Algorithms
Using clusters to reduce hedging errors
In my earlier post, I discussed the performance of two-factor hedging using market and industry-level factors to calculate hedging errors. This analysis goes a step further, exploring whether clustering assets to find highly correlated stocks can improve hedging outcomes when compared to single and two-factor models.
For this analysis, we use 126-day rolling windows to perform regressions against the stock we want to hedge and its identified factors. While I won't delve into the details of the clustering algorithm, the focus is on evaluating whether selecting highly correlated stocks from clustering algorithms reduces hedging errors.
We aim to hedge the following assets:
COP (Energy)
RJF (Financial)
ACN (Information Technology)
VZ (Telecommunications)
For instance, when clustering to find the optimal hedging stock for COP, we observe the following results:
We can plot COP and EOG cumulative returns in a plot:
This also uses clustering with Out of Sample data, meaning that the clustering was made before 2022 so we wouldnt have any look ahead bias in our analysis.
We can conclude that our method of clustering works and we can move forward. We can do this for the stocks and find the following pairs for example:
and
Now lets regress and look at MSE.
Single Cluster Hedging
Starting with COP:EOG we get the following:
Results are very intuitive. SPY (market) has no correlation to energy stocks, so the difference in MSE from 1 and 2 is understandable. Now looking at 2 and 3, we do see a slightly decrease in MSE which favors our analysis.
The slight difference is understandable when you plot the returns:
For RJF:AMP we do the same:
We see a decrease of MSE from 1 to 3.
For ACN:CTSH results are:
A better performance than industry factor hedging
For VZ:T
We see whats expected, a reduction in MSE going from 1 to 3.
5 Stock Cluster
What if instead of doing 1 pair for hedging we do 5 (try to minimize the errors of the clustering algorithm and find the best correlated assets). Lets see what we get from our cluster output for COP:
Plotting:
We can already see that DVN and APA decoupled from the cluster.
For RJF:
We get good results in the clusters.
Now lets regress and see the results and plotting the MSE to compare all the regressions so for.
For COP:
We get slightly lower MSE using 5 stocks compared to 1 (from 0.0058 to 0.0055).
For RJF:
We reduced MSE from 0.0097 to 0.008 which is a very positive result.
For ACN:
From 0.0099 to 0.0093 (almost no change).
For VZ we get the same result as the average, slightly lower MSE compared to 1 pair of stock:
To Conclude:
There are numerous ways to evaluate the performance of this approach, such as increasing the number of assets we aim to hedge, analyzing the differences in hedging errors across all factors in the regression and averaging the results, or experimenting with different rolling window lengths to observe how they affect the outcomes.
What we can conclude is that this method is effective, though its success varies depending on the stock. For some assets, particularly those with well-correlated peers, the approach yields significant improvements. However, for others, especially volatile stocks or those with fewer correlated assets, the performance is less consistent. Adjustments, such as increasing the number of clustered assets, can help mitigate these challenges and enhance the overall effectiveness of the strategy.


















This is a really interesting approach. What stands out to me is that you’re essentially trying to move from broad factor exposure to more precise “behavioral matching” between assets.
In practice, it makes sense that clustering can reduce hedging error because you’re identifying securities that actually move together in real conditions, not just through predefined factors. Industry classifications and even factor models can miss that nuance, especially in periods where correlations shift.
The tradeoff I think becomes important is stability vs. precision. Highly correlated pairs or clusters can reduce error in the short term, but those relationships can break down quickly during regime shifts, especially in more volatile environments or when macro drivers change.
It would be interesting to see how this holds up across different market regimes; for example, high volatility vs. low volatility environments, or during periods of strong sector dispersion versus broad market moves.
Really good work, feels like a step toward more adaptive hedging rather than static factor-based approaches.
Clustering tends to capture factor exposures much better than simple sector hedges.