“Insanity: doing the same thing over and over again and expecting different results.” Albert Einstein
In the last couple of posts, I have outlined a number of statistics we can use to evaluate the performance of a trading system. In this post, I will outline the usage of an Excel document I use to evaluate trading systems and introduce a couple of more statistics to use to tell us if we have an effective trading strategy or not. I will do this by reviewing a trading system that I traded live and failed miserably with. But I don’t consider it a failure; in fact, it taught me a lot about what works and what doesn’t and moving forward I want to make sure that I don’t make the same mistake twice.
Inputs for Trading System
The table below outlines the inputs for the trading system that we are going to examine:
Winning Percentage | 70.00% |
Average Win | 50 |
Average Loss | 150 |
Account Size | 15,000 |
Sample Size | 100 |
Standard Dev (All Trades) | 150 |
Largest Losing Trade | 150 |
Right off the bat, you can probably already tell that this is not the greatest system in the world because the average risk to reward is 3 to 1 (Avg Loss/Avg Win). But I was totally taken aback that you could win 70% of the time! I needed to be right and this led to the failure of this specific trading system.
Trading Statistics Calculator: Outputs
To link to this Trading Statistics Calculator on the web, go here.
The outputs for the trading system are given below:
Outputs | ||
| $ | % |
Expectancy Per Trade | -10.00 | - |
Edge | - | -0.07% |
Fractional Gain (FG) | 50 | 0.33% |
Fractional Loss (FL) | 150 | 1.00% |
Initial Risk Per Trade (Unit Size) | 150 | 1.00% |
Win/Loss Ratio (Profit Ratio) | - | 0.33 |
Capital Units Available | - | 100.00 |
Minimum Win % Required to Be Profitable1 | - | 75.00% |
Maximum Average Loss to Be Profitable3 | 116.67 | 0.78% |
Minimum Avg Win to Be Profitable2 | 64.29 | 0.43% |
Risk of Ruin | - | 114.26% |
t-Test | - | 3.33 |
Optimal F | - | -0.2 |
Maximum Leverage | -750 | - |
Expectancy
Expectancy was discussed before and is given by the following formula:
Exp = (Win% * AvgWin) – ((1-Win%) * AvgLoss)
Where,
Win% = The percent of profitable trades
AvgWin = The average dollar amount made per profitable trade
AvgLoss = The average dollar amount lost per losing trade
For this trading system, Exp was calculated as
Exp = (.7 * 50) * ((1 - .7) * 150) = -10%
A negative expectancy means that you will lose money over multiple trades. A positive expectancy means that you should make money over multiple trades. For this system, for every dollar you put into the trade, you were expected to lose 10% or stated another way, for every $150 risked, you were expected to lose $15. Expectancy does not take into account your account size, only how much you can expect to win or lose over a large sample of trades.
Edge
Edge is similar to expectancy, in that it predicts your average return per trade. However, Edge takes into account your initial account size and, for this example, assumes that you will not vary your risk as your account increases or decreases.
Edge = FG * Win% - FL * (1 – Win%)
Where,
FG = Fractional Gain or Profit Per Trade = AvgWin / Account Size
FL = Fraction Loss or Loss Per Trade = AvgLoss / Account Size
Win% = The percent of profitable trades
For this system, Edge was calculated as:
Edge = (50/1500) * .7 – (150/1500) * (1 - .7) = -.07%
Again, a negative edge means you will lose money and a positive edge means you will make money. For this system, we were expected to lose an average of .07% of our initial account size for every trade we put on. Since -.07% of our initial account was -$10, we could expect to have, on average, a balance of $14,000 after 100 trades of this system. This can be found by the following formula:
Account Balance After N Trades = AcctSize + (AcctSize * Edge *N)
Where,
AcctSize = Initial Account Size
Edge = Formula given above
N = Number of trades
This formula is just an estimate; remember, there is a random distribution of wins and losses for any given set of trades. So instead of having 70 wins and 30 losses, we could have had 60 wins and 40 losses etc. These formulas are just used to give us an average number that we can work off of in a probabilistic manner.
Another formula for edge is:
Edge = ((Profit Ratio + 1) * Win%) – 1
Where,
Profit Ratio = Win Loss Ratio = The AvgWin / AvgLoss
Win% = The percent of profitable trades
Minimum Win % Required to Be Profitable
This statistic shows the minimum Win% required to make the trading system profitable, assuming that the Avg Win Per Trade and the Avg Loss Per Trade remain the same. This was found by plugging winning percentages from 1% to 100% into excel, solving for the expectancy, graphing the results and finding where the Exp was greater than 0.
You can see from that graph below that any Win% greater than 75 would turn the system into a positive Exp system. This is useful information because we could then determine if we could increase the Win% through optimizing the system or if we should go back to the drawing board and start designing a new trading system.
Maximum Average Loss to Be Profitable
This statistic tells us the minimum average loss the trading system would have to have to make it a positive expectancy system, assuming the Win% and AvgWin remained the same.
This is found by the following formula:
Max Average Loss = FG * Win% / (1 – Win%)
Where,
FG = Fractional Gain or Profit Per Trade = (AvgWin / Account Size)
Win% = The percentage of profitable Trades
For this trading system, the Max Average Loss the system could sustain and have the system be profitable with a 70% Win% and $50 AvgWin is $116.67. Anything less than a $116.67 loss would result in a positive Exp system. This is useful because it tells us (1) where to set our stop loss to create a breakeven system and (2) if more optimization is required to get a smaller AvgLoss.
Minimum Average Win to Be Profitable
The next statistic is the minimum average win to have the system be profitable or have a positive Exp, assuming the Win% and AvgLoss remained the same.
This is found by the following formula:
Min Avg Win = AcctSize * (1 – Win%)/(1-(1-Win%))
Where,
AcctSize = Account Size
Win% = The percent of profitable trades
For this trading system, assuming the Win% stayed at 70% and AvgLoss stayed at $150, and AvgWin of greater than $64.29 would have turned the system into a positive expectancy system. This is good to know because we can then go back and optimize the trading system to make the profit target larger.
Risk of Ruin
The risk of ruin is a great statistic to know to determine how likely it is that your capital will be wiped out with the trade settings you have created. As you now know, even with a system with positive Exp and a small AvgLoss, it is possible to clear out your trading account if you encounter a large string of losses. The risk of ruin statistic attempts to quantify this probability.
The formula is:
Risk of Ruin = ((1-Edge)/(1+Edge))^Capital Units
Where,
Edge = As calculated above
Capital Units = AcctSize / AvgLoss
You are looking for a risk of ruin as close to zero as possible. A risk of ruin of 114% for this trading system virtually ensures that if we trade this system enough, we will eventually blow out our account. Risk of ruin is a great statistic when optimizing your system because it can tell you that you either need increase your edge or increase your account size (or both).
We already know what the Optimal F, T-test and maximum leverage calculations are from previous posts. Remember, Optimal F and maximum leverage determines the size of your account and the T-test determines whether your results were obtained by chance. You can find those definitions here.
Optimal Risk
The last two statistics are under the heading “Optimal” risk and are given in the table below. These two formulas below define the “optimum” percentage of capital to place at risk for your system. I use “optimum” in quotes because there is a lot of controversy surrounding both of these equations and whether you should use them.
Optimal Risk | |
Leibfarth Formula | -0.02% |
Kelly Formula | -20.00% |
Leibfarth % = Edge * FG / FL
Where,
Edge = Edge as calculated above
FG = Fractional gain on each trade
FL = Fractional loss on each trade
Kelly % = Win% – [(1 – Win%) / Win/Loss Ratio]
Where,
Win% = The percentage of profitable trades
Win/Loss Ratio = Profit Ratio = AvgWin / AvgLoss
A negative result on either the Leibfarth% or the Kelly% means that you shouldn’t risk any money using the system. In our trading system, we get -.02% and -20% respectively for each equation. This means we do not have a tradeable system.
For more on why the Kelly % is not a tradeable formula, click here.
Edge v Win/Loss Ratio Chart
The chart below gives you a good idea of what it takes to have a system with a positive Edge. The y-axis shows the projected Edge. The x-axis is the win/loss ratio or profit ratio. Each line represents a given Win%.
For example, look at the second line from the top. This assumes a 70% Win% on all trades. If we were testing, what Win/Loss ratio should we be shooting for to make it a system with a positive edge? You can easily find it by looking at the chart – we are looking for a system with a Win/Loss ratio greater than 0.4. That is, the system’s AvgWin divided by the systems AvgLoss would have to be greater than 0.4 to have a positive edge – something like an AvgWin of $40 and an AvgLoss of $100. This tells us to to disregard any system with a Win% less than 30% because no matter how large your Win/Loss ratio, the system will never have a positive edge (unless the Win/Loss ratio approached 4 to 5 which is very high).
how to determine sample size plz
ReplyDeleteidk
Delete