Premium Market Analysis, Trader Education, Software, and Trading Strategies. Thirty Years Of Skin In The Game

Trading Strategies

N-Bar Win Rate of Trading Systems

The win rate of a trading system is defined as the ratio of winning trades to total trades. The win rate, denoted here by the letter W,  is an important parameter because along with the ratio of average win to average loss, denoted here by the letter R, uniquely determine the profit factor (PF), which is defined as the ratio of gross profit to gross loss, and it is one of the most important performance parameters of a trading system.

The PF parameter is given by  the following formula

PF = R × W /(1 – W)

For example, if W = 75% and R = 0.5, then PF = 0.5 × 0.75 / (1 – 0.75) = 1.5

Experienced traders usually prefer trading systems with PF > 1.5. 

The win rate W considers only the total number of winning trades. Another useful parameter is the N-Bar Win Rate™, which is defined as the ratio of the winning trades closed exactly after N bars to the total number of trades. Actually, this is not just one parameter but a set of parameters. For example, consider a day trading system that operates in the 5-minute time frame. The system has generated 1000 trades, out of which 700 were winners and thus the win rate is 70%. Out these 700 winners, 450 were closed on the same bar that they were opened. In this case, if we set N =1, then the 1-Bar Win Rate, W(1), is equal to 450/1000 = 0.45 or 45%. This ratio tells us that 45% of the trades of this trading system were winners that stayed open for just 1 bar. For large samples, this is the probability of a new trade to be a winner and also stay open for just 1 bar.     

This is another example: consider a swing trading system that has generated 200 trades and 150 of those were winners. Out of the 150 winners, 50 trades were closed exactly after 3 bars. The 3-Bar Win Rate is equal to 50/200 = 0.25 or 25%. In an similar way, we can calculate the N-Bar Win Rate for any bar count N.        

The N-Bar Win Rate™ is a very important measure for both intraday and swing/position trading systems that attempt to time entry points.  The minimum value of this parameter is 0 and the maximum is the win rate W. Let us denote the N-Bar Win Rate by W(N). The following hold:         

If W(N) = W for some N = K > 0, then W(N) = 0 for all K not equal to N
∑W(N) = W, meaning that the sum of all N-Bar Win Rates over N equals the win rate W.       

Also,       

 p = W(N) is the (approximate) probability of a trade to be a winner and stay open for exactly N bars, for large samples of trades.     

For large enough samples, the distribution of W(N), a graph of W(N) as a function of N, can provide very important insight about the dynamics of a trading system. If the distribution is almost flat, that implies that the parameter number of bars in winning trades is uniformly distributed. If the distribution has a sharp peak, then this means that most of the winning trades stayed opened for the same number of bars. This kind of information can be used to analyze whether a trading system meets its objectives and what its dynamics are in terms of its timing of entry and exit signals. For example, if W(1) is equal to W, then this means that all winning trades stayed open for just 1 bar and this can be attributed to a good ability to time entries. If for the same type of system with same risk/reward objectives W(1) is equal to 10%, then, in comparison, this system does not have as good timing ability in terms of opening and closing trades.     
 
In Figure 1 below, examples of N-Bar Win Rate distributions are shown for different types of trading systems:      
    

blank

We may see that the intraday system distribution of N-Bar Win Rate starts with a peak value and then drops fast to zero. This is a typical distribution for intraday but also for some swing trading systems with a good timing ability and risk/reward parameters that contribute to fast profit capturing. The distribution for the swing trading system starts at low values, then it peaks for N = 3 and then slowly drops to zero. This is an expected distribution for swing trading systems based on daily bars. The distribution for the position trading system shows a peak at N = 7 with most values before that being zero or close to it. All three distributions have peaks and that can be attributed to systems that perform well in the timeframe of their application.          

Figure 3 shows the same types of trading systems with non-desirable N-Bar Win Rate Distributions.                  

blank

The intraday system distribution in Figure 2 shows an almost flat distribution of N-Bar Win Rates. This can be attributed to chance rather than to robust timing.   The swing trading system shows increasing values of N-Bar Win Rate as a function of N. Again, it’s overall win rate W can be attributed to chance than to some timing ability. The position trading system distribution starts at a peak and then drops fact to near zero. Although this could be a desirable distribution for an intraday system, it is not desirable for a position system because such system is supposed to let the winners run as much as possible and that implies a larger N. Thus, the N-Bar Win Rate distributions should be analyzed within the context of a trading system’s intended operation. They can provide useful information about the performance of a system and whether it accomplishes what it was design for.    

Price Action Lab, a program that discovers trading systems automatically based on user-defined performance criteria and risk/reward objectives, calculates W(1), the 1-Bar Win Rate™ as part of its scanning functionality. The following is an example of the daily scan of SPY ETF as of the close of October 29, 2010, for price patterns with profit target 1%, stop-loss 2% and a win rate W greater than 77%. In Price Action Lab output the win rate is denoted as P and the 1-Bar Win Rate as P1. CL is the maximum consecutive losers, C is the type of stop, in this case %, and Trades is the number of historical trades.        

blank

It can be seen from Figure 3 that Price Action Lab identified two price patterns that met the performance criteria. Both patterns have Win Rate > 77% and 1-Bar Win Rate W(1) greater than 25%. This means that one quarter of the trades were closed on the same bar they were opened and it is an indication these patterns may have good timing properties.  

I prefer trading systems which show a peak in the N-Bar Win Rate at values of N as close to 1 as possible and at the same time more than 75% of the trades exit withing the first 3 bars, meaning that W(1)+W(2)+W(3) >  0.75 × W 

The N-Bar Win Rate is just another parameter, or better stated another set of parameters, that allow a technical trader to better analyze system performance. 

 Disclaimer