How to determine Dependency in your Trading System
As we have explained in our previous article How to be sure your trading strategy is a winner, traders usually apply position size strategies that conform with the belief that future outcomes somehow are influenced by the previous result or results. This phenomenon, in statistical terms, is called dependency, which means the probability of the next event happening depends on the last or past events.
The example of a card game such as Blackjack or Pocker, can enlighten this concept. In a deck of cards, the odds of getting a particular card, such an ace is dependent on the cards already on the table. So, the first time, with no card drawn, the probability of drawing an ace is 4/52. But the next time we draw a card, the probability changes to 4/51 or 3/51, depending on if an ace was drawn on the last time.
What does dependency mean to Trade
Having dependency on a trading system or strategy would mean that the odds of the next trade being profitable or unprofitable change with the outcome of the last trade. If we really could prove dependency and its kind, we could adapt our trade size accordingly, making the system more profitable than assuming non-dependency.
As an example, if we devise a system on which a winning trade precludes another winner and a losing trade another loser, we could increase trade size while on a winning streak and decrease it on losing streaks. That way, we could maximize profits and minimize losses.
How do we determine if a system shows dependency
Dependency on trading has two dimensions. The first dimension is dependency in terms of wins and losses, which is the sequence of wins and losses showing dependence. The second dimension is if the size of wins and losses also show dependency.
The run Test
On events such as drawing cards without replacement, it is evident that there is a dependency. But when we cannot determine if the sequence of results show dependence, we can perform a Run Test.
The run test is merely obtaining the Z-scores for the win and loss streaks of the results. A Z-score tells us how many deviations our data is away from the mean of a normal distribution. We are not going to discuss run tests here, as there is a simpler and more complete method to find out dependency. If interested in this subject, you can find multiple sources by googling the term.
Dependency can easily be measured, using a spreadsheet, since dependency is measurable using a CORREL() function between the trade results, and the same data shifted one place. This technique uses the linear correlation coefficient r called Pearson’s r, to quantify dependency relationships.
As an example, I passed one trade system of mine I backtested some time ago to a through the correlation function CORREL. The system produced 55% winners with 1.7 reward-to-risk factor on the DAX30 Futures contract.
The following image shows the result on this system, with about 250 trades (only the first 30 shown)
Image 1 – Dependency test on a DAX System
If you click on the image, you can see the result is 0.0352, which means the test failed miserably for dependency. That means we should separate our entry decisions from the trade size. Trade size will be a function of the system’s drawdown and our appetite for risk, not a function of the last trade being a winner or a loser.
Another test in an old trade system I devised back in 2016 for the ES futures gave this result:
In this case, the correlation factor was 0.249. That is a relatively high positive correlation for a system. The figure implies that big willers aren’t usually followed by big losses, and also the vice versa: Big losses are seldom followed by big wins. Using this system, we could improve the results if we increase our trade size after a win, and decrease the trade size after a loss.
A negative correlation can be as helpful as a positive correlation. For example, on a system with a negative correlation, we can expect large wins after a large loss, so it is wise to increase the trade size if that event occurs. Also, we can expect a large loss after a large win, so it is best to reduce the trade size before a large win.
To better determine dependency, Ralf Vince, on its book The Mathematics of Money Management, recommends splitting the total data of your system into two or more parts. First, determine if dependency exists in the first part of your data. If you detect it in that section, then check for dependency in the second section, and so on. This will eliminate the cases where it seems to be dependency, but in fact, there is not.