When you make the decision to dedicate yourself to trading, you should focus on conducting a broad and in-depth study of how your trading systems work. Yes, I’m very heavy with this algorithmic trading and ratios… but really, in the end these are nothing more than evidence of whether what you are going to apply works or you should throw it away and not waste your money foolishly.
In other words, you have to learn to statistically and objectively evaluate the performance of your trading systems.
As you know, mathematical statistics provide you with a wide variety of tools that will allow you to correctly evaluate the results of a trading strategy or system. One of these tools is the sqn ratio (System Quality Number or in Indian Spanish: system quality number).
The SQN ratio was created by Van K. Tharp, in 2008 in his book The Definitive Guide to Position Sizing, to evaluate or measure the performance of a strategy or trading system. Subsequently, some variations of use have arisen, such as the indicator of the market regime, obtaining optimal parameters that simultaneously maximize the average size of the operation and the standard deviation of results in a sample space of N operations.
1. Van Tharp SQN Ratio.
SQN ratio measures the relationship between the mean (expectation) and the standard deviation of the profit distribution generated by a trading system. Van Tharp recommends that the number of trades N of the trading system be at least 100, the more trades the better.
The mathematical formula for calculating the SQN is quite simple and is described below:
- N: Number of system operations.
- EM: Mathematical expectation of the system in terms of R (Expectation or Mean Benefit).
- SD: Typical or standard deviation of the multiples of R.
The first thing that you must be very clear about is the concept of R. The R value is the difference between your entry price and the initial stop loss, that is, the initial risk. Then all gains and losses are expressed as multiples of R.
The expectation of the trading system can also be defined as the average of the multiples R (negative and positive) of the trading system.
2. How to calculate the expectation, the expected benefit and the SQN ratio according to the value of R.
Suppose our trading system has given us these results:
|No. Operations||buy $||Stop $||R-value||sale $||Operation Result $||multiples of R|
Based on our results we can obtain the following data:
- % of winning trades: 60%
- % of losing trades: 40%
- Sum of Winning Trades: 245
- Sum of losing trades: 90
- Average R: 0.775
- Standard deviation of R: 1.73
In the Van Tharp model, the expectation (E) of the system is defined as the average of the n multiples of R, therefore, in our example:
System Hope: 0.775
The expectation of the trading system allows us to calculate the profit that we can expect from our system in X number of operations, using the formula:
Expected profit = Expectation * Number of trades * R value
Knowing the standard deviation of R, we can finally calculate the SQN ratio.
Now we take the same example above, but instead of 10 operations we are going to assume that the results were obtained based on 100 operations. The SQN ratio would be as follows:
Now that you know how to calculate the SQN ratio, we are left with a no less important task: how to interpret the values obtained? Are they good or bad?
In order to assess whether our trading system is profitable or not, Van Tharp proposes the following scale:
|1.6 – 1.9||Good… Below average, but it can be operated|
|2.0 – 2.4||Neither fu nor fa in the middle|
|2.5 – 2.9||Well OK.|
|3.0 – 5.0||Excellent. |Nice!|
|5.1 – 6.9||Brutal, you nailed it.|
Summarizing the previous table a bit, it is considered that a system is good when the SQN ratio is greater than 2 and excellent if it is greater than 3.
It is important to take into account when calculating the SQN ratio, that when the trading system does not have a fixed stop loss, the value of R can be estimated as the average loss of the sequence of operations, as long as it is mean is sufficiently representative. From there we can see the distribution of the multiples of R (standard deviation) and also calculate the expectation as the average of the multiples of R.
3. The SQN ratio as a parameter optimizer.
Now that we know how to calculate the SQN ratio and determine if our trading system is good or not based on this ratio, the following question arises: Can I increase the value of the SQN ratio? How to do it in the best possible way?
If we analyze the formula to calculate the SQN ratio, we can quickly realize that there are 3 parameters that we can adjust to increase said ratio:
3.1. Improve average profit.
One of the best ways to increase the average profit is to filter the operations to have Fewer operations, but higher quality. Fewer trades also means fewer commissions.
3.2. Reduce the dispersion of results around the mean.
This can be achieved reducing stop losses and take profits. In this way we achieve that the results are concentrated as close as possible to the average.
3.3. Increase the number of operations.
Making n as big as possible, we can also improve the robustness of our trading system and the statistical data we obtain from our system becomes more reliable. Also, the profit curve becomes smoother and more continuous. Increasing the number of trades also allows us to have a broader picture of the behavior of our strategy in different time frames. Basically it is what I usually tell you in videos about having a greater statistical relevance. Therefore, the SQN ratio It positively weights those systems that have a longer history of operations.
This measure developed by Van Tharp allows us to objectively assess the performance of our trading systems. With the SQN ratio you can also optimize the parameters of your system to make it more robust. Although I’m not a big fan of optimization as you know, especially when we look for robustness. But this is another topic. In my case, I only use it to evaluate my systems and it is not among my favourites, but I find it very useful.
Any questions or comments, I’ll read below!