Portfolio: Portfolio of uncorrelated systems
Uncover the hidden dangers of correlated trading botsβbefore your portfolio pays the price
Table of contents:
Introduction.
Bots doing their homework.
The portfolio zooβaka mix of bot strategies.
What are the dangers of having correlated bots?
Guide to building a portfolio of uncorrelated systems.
Balancing wins and losses.
Introduction
Trading bots are like the star players in a high-stakes orchestraβeach with its own instrument, playing a unique tune. But when theyβre all jamming together in the same portfolio, their harmony (or lack thereof) can either create a masterpiece or a cacophony. Today, weβre diving into the world of trading bots and how their interactions can make your portfolio sing or screech. The key idea? If bots move in sync, your portfolio can skyrocket or nosedive. But if they dance to their own beats, youβll enjoy smoother, more predictable returns.
Letβs kick things off by decoding what a botβs βPnLβ really means and how to tell if two bots are best buddies or bitter rivals.
Bots doing their homework
In the trading world, PnLβProfit and Lossβis like a botβs report card. It tells you how well the bot is performing. When we say two bots have correlated PnL, it means they tend to score high or low at the same time. This is measured using the correlation coefficient, denoted by Ο.
The correlation coefficient between two botsβ PnLs, PnLA and PnLBβ, is calculated as follows:
Where:
Covariance (Cov) measures how two variables move together.
ΟA and ΟB are the standard deviations of the PnLs of Bot A and Bot B.
If ΟPnL = 1, the bots are perfectly correlatedβthey move exactly in sync. If ΟPnL = β1, they are perfectly anti-correlatedβwhen one wins, the other hedge losses. And if ΟPnL = 0, their moves are independent. Think of it like two classmates: sometimes they work together on a projectβhigh correlationβand sometimes they work separatelyβzero correlation.
Our goal is for them to work independently, together but not mixed. The higher the correlation, the greater the risk. And a negative correlation can either be a real disaster or a well-coordinated portfolio of systems.
A simple example. Consider two bots:
Bot A trades technology stocks.
Bot B also trades technology stocks.
If both bots take a hit on the same day because of a tech crash, theyβre highly correlated. But if one bot loses while the other gainsβmaybe by trading different sectorsβtheyβre uncorrelated or even negatively correlated.
Now that we have defined PnL correlation, letβs look at how mixing different types of bots creates a diverse portfolioβmuch like mixing different flavors in a juice!
The portfolio zooβaka mix of bot strategies
Different bots follow different strategies. Here are three common types:
Arbitrage bot: The sneaky ninja of trading, exploiting tiny price differences between markets.
Trend-following bot: The surfer, riding the waves of rising or falling markets.
Mean-reversion bot: The bargain hunter, buying low and selling high when prices return to average.
When these bots have uncorrelated PnLs, combining them creates a robust portfolio. Itβs like a zoo where lions, penguins, and sloths all contribute in their own unique ways. The result? Their risks donβt pile up destructively. And example here:
The cumulative PnLs are plotted to show how the portfolios perform over time. The uncorrelated portfolio is expected to be smoother, while the correlated one might exhibit more volatility.
After seeing how a mix of bots affects your portfolioβs performance, the next natural question is: What happens when all the bots decide to behave in the same way?
What are the dangers of having correlated bots?
When multiple bots chase the same market signals, their PnLs become highly correlated. This scenario is dangerous because it means that when one bot makes a mistake, all of them do. Think of it as a sports team where every player runs in the same directionβif that direction turns out to be wrong, the whole team suffers.
The variance of a portfolio consisting of N bots can be expressed as:
Here, wiβ is the weightβor allocationβto bot i, Οiβ is its standard deviation, and Οijβ is the correlation between bots i and j.
If Οij β 1 for all pairs:
The second term adds up dramatically, making the portfolio extremely volatile. This is like building a tower out of jellyβit collapses easily!
Remember 2018? Several hedge funds using similar momentum strategies experienced massive losses because their bots acted in unison. When one bot dropped, others followed, and the losses compounded.
Knowing the dangers of highly correlated bots, letβs move to a practical guide on how to build an uncorrelated bot army. This is where the diversity of system typologies becomes your best friendβand by systems I don't mean vectors, but this is something we will cover in future articles.