ProbTrader

Beta

 

Disclaimer: This app is offered as a quick freebie that was thrown together with some leftover code from another project and has had no QA. The algorithms should be fine but if you decide to download it and find an occasional way to crash it, please take it in the spirit in which it is offered.

Click ProbTrader.zip to download the installer.

Additional information on using this app here.

If you can assign some probabilities to your system or desired system, then this app can help answer questions such as the following: how much might a losing day cost, how many losers in a row could you experience, how much could the cumulative drawdown be, and over a longer period of time how much might the system make.

ProbTrader can quickly and simply summarize a possible distribution of trading outcomes based on your own probability criteria and over your selected timeframe(s). It is based on some concepts from Van Tharp who used marbles in live seminars to help traders get a better feel for their respective trading plans. These probability based trading simulations can also be easily created in spreadsheets. If you are not familiar with Van Tharp, I would highly recommend him particularly to newer traders as his writings might save you some startup time. Like Tharp's marble game, any individual trade is random but over larger numbers of instances the outcomes will converge on your designated probability inputs. Its the trip rather than the final destination that makes these simulations an interesting method of "experiencing" your trading plan. Manipulating size, commissions and slippage costs will further impact the simulation's profit/loss ratios, net profit/losses and drawdowns.

You can have any combination of setups and indicators, etc. that you like. Their details are not important. It is only important that you are consistent in using them and sticking to them (i.e. following your trading plan). The next step is to think in terms of a unit of risk. If you don't use stops or have "flexible" stops then this app will be of little use to you. If for example you trade bonds and use fixed stops of 8/32's then that is your unit of risk. If you use different stop sizes with other setups then consider them separate systems. If you track your trading results then categorize them in terms of a unit of risk. In other words how often do you get stopped? How often do you realize one unit of risk in profits? How about 2, 3, or 4 units of profit? If 8 ticks is your risk unit then 3 units of profit is 24 ticks.

Experimenting with different profit probabilities given your stop risk can help you to determine if you are taking profits too early which is a common issue with many traders. An interesting byproduct of playing around with simulations is that you will see how important it is to let your profits run whenever possible. It's surprising how quickly even a small probability 3R or 4R can turn around a losing system. This is especially the case if your win ratio is at or below 50%. Traders who have a small percentage of winning trades relative to the losers are usually masters at risk management which means maintaining tight losses and milking the profitable trades.

How to Setup ProbTrader Properties

 

 

Enter your unit risk in dollars in the "Risk$$" textbox (100 above). This is "1R" for one unit of risk. Next ".3" means 30% of the time the system generates one unit of risk in profits. 15% of the time the system generates 2 units of risk in profits and so on.

 

 

Above the system gets stopped out 45% of the time (i.e. losing 1 unit of risk). Slippage will be covered shortly. Note that in both examples above inputs like "1R" or "-2R" are simply labels. You can use these or whatever else you like. It is important however that values like ".45" or "-1" which represent the percentage and RMultiple (risk multiples) are entered as numbers. Remember to enter negative RMultiples for loss categories as shown immediately above. Finally the last group is the break even category with similar inputs as the other win and loss groups. If you are entering a variety of different percentage inputs and you're wondering what you have left, click the "Check %" button which will add up the existing inputs and give you the difference from 1 (i.e. 100%). If you click it and see "-0.05" for example you can add 5% to one of the win RMultiples.

Note: You can use your mouse wheel to quickly change the percentage values. Just click the textbox and scroll your wheel.

 

How to Generate a Simulation for a Day

 

 

Lets use the above inputs for the following explanation. These inputs describe a system that uses $100 stops per trade. 30% of the time the system generates 1R in profits (i.e. $100 per trade). 15% of the time it generates 2R in profits (i.e. $200 per trade). Finally for wins it generates 3R in profits (i.e. $300 per trade) 5% if the time. The system has a win/loss ratio of 50%. It is stopped out at 1R ($100) 50% of the time. Now we can take a look at possible trade days and groups of trading days.

 

 

These inputs are self explanatory. The setup above uses 20 trades per day. When simulated for groups of days it will use 20 day groups. One contract will be used with a $5 round turn commission cost. If you leave "Enable Days" unchecked and click "Calculate" you will see results for one trading day consisting of 20 trades. Note if you drop the number of trades per day to a low value such as 2 or 3 for example, the simulation results will not be as robust due to the small sample size. If you want to build in some slippage for market stops, etc., just add something to the Commission input which will be factored into the results on a per round turn basis.

 

 

Using the above inputs, if you click "Calculate" the listbox will fill with simulation results for one day with 20 trades. If you drop down to the bottom of the results you will see something like what's above:

1: -1R hit #: 1

This means the first trade was a 1R loss (i.e. you were stopped out). The "1" to the far right is a cumulative hit number.

3: -1R hit #: 3

2: -1R hit #: 2

Trade 3 was also a stop as was trade 2. At trade 3 you have up to this point in the simulation had a total of 3 stops. "-1R streak: 3" tells you that you just had a streak of 3 1R losses.  A streak is defined as anything over 1 consecutive occurrence.

 

 

If you scroll up to the top of the listbox you will see totals. In the above example the last trade (#20) was a 1R loss or a stop. The "15" to the right tells you that you were stopped 15 times during the day. Trade 17 shows a 3R profit but was the one and only for the day. Pretty dreary day overall...

Lets examine the first 1R totals results:

-1R Totals: NumHits 15 MaxStreak: 3 AvgStreak: 2.75 #: 4
-1R Prof/Loss Total: -15.00
 

Total hits were 15 (i.e. there were 15 1R losses). The maximum streak of 1R losses was 3. The average streak was 2.75 losses consecutively. There were 4 streaks during the day. The total profit/loss for the -1R category expressed in 1R multiples was -15 (i.e. a loss of $1,500). There were no streaks for the 3R, 2R and 1R categories. Total profits for these three categories was 8 1R's or $800.

The final tally at the top shows a win/loss ratio of .25 for the day. There were 5 wins to 15 losses. In terms of 1R's, there was a total of 8 wins to 15 losses with a -7 net. The ratio of total wins to total losses was ".53". 1R of risk was set to $100 with $100 of total commissions for the day. The final net profit/loss figure for the day including commissions was a loss of $800.

Note: Click away the "Calculate" menu item to run through consecutive day's stats.

 

How to Generate a Simulation for a Group of Days

Continuing with the inputs above, if you were to check the "Enable Days" checkbox and click "Calculate", a simulation for 20 days of 20 trades per day will be generated.

 

 

The daily results are listed with a final grand tally at the top. Lets start with the last day's results, day 20.

Day: 20 WinRatio: 0.50 TotalWins: 10 TotalLoss: 10
TotWinUnits: 17 TotLossUnits: -10 Net: 7 Ratio: 1.70
1R=$100 Commissions: $100.00 Net after Comm: $600.00

The win ratio for the day was .5 with 10 winning trades and 10 lossing trades. The day was still in the green however due to the 17 to 10 total winning units (1R's) versus total losing units. The daily net was positive 7 units ($700). The win ratio for the total units was 1.7. 1R was equal to $100 with total commissions of $100 for the day and a final net P/L of $600.

Days WinRatio: 0.46 TotalWins: 183 TotalLoss: 217
Days TotWinUnits: 295 TotLossUnits: -217 Net: 78 Ratio: 1.36
1R=$100 Commissions: $2,000.00 Net after Comm: $5,800.00

The final tally for the group of 20 days shows a win ratio of .46 for 183 total winning trades versus 217 total losing trades. The total winning units versus total losing units ratio was 1.36 given 295 total win units and 217 total losing units leaving a net of positive 78 units (again 1 unit is 1R equal to $100). There were $2000 dollars in commissions for the month leaving a net profit of $5,800.

Click away at the "Calculate" to scroll through month's of stats.

Note: At any time you can paste all the listbox information to your windows clipboard by clicking "General" and selecting "Copy to Clipboard".

Good Trading!