March 4, 2014

Your Account Balance chart - simulation tool

Your equity curve Monte Carlo simulation tool

Intro

monte carlo equity curve
This is to share my tool to simulate how your account equity curve may look like, given your assumptions of a win ratio and a reward to risk ratio.


Let's see what your future account balance may be after one hundred trades...

Situation

Let's say your trading system has a 40% win ratio and an average reward to risk ratio of 2.
This means 40% of your trades are winning trades and 60% are losing trades. And the average winner, in U.S. dollars or any other account currency, is 2 times bigger than an average losing trade, e.g. average win is $100, average loss is $50.

Let's say you tested and qualified this trading system. You know this system very well, you understand why it works and where the edge comes from, you trust it, you are able to trade it with High Quality, and you have proven it in backtests on historical charts and in a forward-test on demo.

Question

Now it is time to start trading it live, using a micro account. There are a few critical questions! 
What should you expect? How much money to risk per trade? If I get 5 losses in a row, shall I drop this system? What if a losing streak is 8? Is it normal or does this mean this system is poor, or stopped working, or I am not executing it with high quality?

The answer

This tool is to help you get the answers. The tool is an Excel file, and there are some screenshots with sample outcomes below. What it does is a simplified Monte Carlo simulation of how your equity curve, or account balance chart, may look like!

Technically it uses a random numbers generator to "predict" if a next trade is a winner or a loser. You set the probability, e.g. 40% for a winning trade. Then it calculates what is the impact of this trade on your account balance. If it is a loser, and you decided that you risk $50 per trade, there is a negative $50. If a random trade is a winner, and your reward to risk ratio is 2, it adds $100 to your account balance. Simple, right? Very simple. And the conclusions can be fascinating.

The most interesting part is the chart of how your simulated equity curve will look like. And the cool thing is... you hit F9 to recalculate and you see... a different scenario of how it may look like. Do it, do it many times and it will help you realize how significant is the impact of random factors!

What to take away from this

Understand the impact of win ratio and reward to risk ratio on your future possible results. You will clearly see, not only the obvious such as "higher win ratio is better", but also how the win ratio vs. R ratio is impacting the equity chart. See how playing with the parameters impacts the performance (or the potential simulated performance, I should say).

In real trading, the higher the R ratio you want to achieve, the more difficult it is to have a certain win ratio. They are "contradictory". It is easy to have a 90% win ratio by using a Take Profit 5 pips away and no stop loss. But this is a recipe for disaster. It is hard to achieve on a consistent basis the 40% winners and average 2.5R ratio, but this is a highly profitable system, and if only it provides trading setups often enough and you trade them with High Quality, this is as close as it gets to a so called Holy Grail in the real world :-)

See the losing streak number, i.e. maximum consecutive losing trades in a row, in simulation. You will quickly notice that with 40% win rate, a 4 or even 6 losers in a row is a normal thing. It happens relatively often. It is not a reason to drop the system and look for another indicator. On the other hand, if you are taking poor quality trades, it is a reason to stop and review, regardless of the outcomes. And, side comment, how to tell if a trade is high quality? Compare its execution with the written system description.

See the longer term picture... the tool simulates 100 trades and you can also run it 30 times and see results. This requires you to enable macros in excel, but saves time. Click and see results of 30 different simulations. Is such system "always" profitable? What was the worst losing streak in 30 runs of 100 trades? (this may represent months or years of trading, depending on your timeframe and frequency of setups in your system).

Have realistic expectations. Enter the starting account balance, realistic expected number of trades per month (in line with results from your backtests), enter your expected win ratio and R ratio. How much money are you going to make per year? Note that doing 20% per year consistently will put you in a world elite. This tool also shows you simply how likely you are to be net profitable after 100 trades!

Use this simulation outcomes to decide how much money to risk per trade, i.e. how to decide on the position size. While there are many position sizing methods, as Van Tharp calls it, I like equal dollar risk per trade, as this is simple and consistent. So, let's say in a simulation you had a max losing streak of 8. I would increase this by at least 50% (to account for your errors and deviations from target win ratio due to market conditions), so let's say 12.  Be ready to withstand 12 losing trades in a row! Given this information, considering your account size (or overall trading capital size), will you risk $500 or $100 per trade?!  This critical question is answered with higher quality if you have data like this. This is really important. This may determine if you are going to be able to stick to your system or not, which is a must, to become consistently profitable.

Understand the expectancy. This is a key word. This file calculates expectancy... this is an average "target" result per trade. For example, with 40% and 2R... say you have 10 trades, so there will be 4 winning trades with a $20 win each, and 6 losing trades of $10. Net result will be 4*$20 - 6*$10 = 80-60 = $20 after 10 trades. So average result per trade is $2. So this is a positive expectancy system. If the expectancy is positive, then, long term, on a large sample of trades, you should be profitable (assuming quality execution of the system, stable characteristic of the system given market conditions, etc.)

How to get the data? You need just 4 data points: number of trades per month, win ratio, R ratio, starting balance. If you use myfxbook.com and have some trading history already, you can easily use its data to put into the tool. If you only backtested, you need to record your results and calculate win ratio and R ratio. If you traded on demo, link it to myfxbook (can be private) or calculate.

OK, let's get to this. The tool is available for download here. There is no cost, no registration, no ads, no commitments, and, no responsibility on my side for your use of it. I think it is a good deal.

Examples

Here is a couple of examples of simulation results (you can run your own in the spreadsheet

System example 1

Assumptions: starting balance 10,000 USD,  risk per trade 200 USD (i.e. 2% of the starting balance)
Win ratio 40%,  R ratio 2.  (average reward to risk ratio of closed trades) 

Lucky outcome example:
equity curve Monte Carlo simulated chart
Losing streak: 6.
Luckily with 40% and 2R, most of samples looks like this, profitable. But in 30 samples often 5 or 6 series of 100 trades is slightly unprofitable. Like this:

Unlucky outcome example:
equity curve Monte Carlo simulated chart
Losing streak: 10.

The two pictures above are with the same assumptions! This is my key point. The same "trading system", identical characteristics, 40% and 2R, a positive expectancy , and yet, among many possible simulated scenarios of 100 trades, there is also this unlucky one!  Even if you have a clearly profitable trading system, it is quite possible to have a negative outcome after 100 trades! 

Of course, with even larger sample of trades , more than 100, the law of large numbers is helping us, and an unprofitable result gets very unlikely if there is a positive expectancy. 

System example 2

Assumptions: starting balance 10,000 USD,  risk per trade 200 USD (i.e. 2% of the starting balance)
Win ratio 40%,  R ratio 3.  (average reward to risk ratio of closed trades) 

Lucky outcome example:
equity curve Monte Carlo simulated chart
Losing streak 6. With 40% winners, a six losers in a row is a normal thing.
Of course, due to a 3R this time, this series is much more profitable.

Unlucky outcome example:
equity curve Monte Carlo simulated chart

Losing streak: 10
This time, thanks to 3R, even an "unlucky" run is profitable.  With 40% and 3R is is very hard to find an unprofitable run. I am not saying impossible. But also to achieve a performance of average winners 3x higher than an average loser, with 40% of winners is very hard, world elite, I'd say.

Clearly, with 3R, the results are much better. But of course, significantly harder to achieve. Even if your take profit order is always 3 times the stop loss distance on a consistent basis, the post trade performance average is likely to be different. Let's say you move the stop to 1R and it retraces...  you have just experienced a win of 1R instead of 3R (of course this is better than a 1R loss, but I am saying it will impact the average R ratio). 

System example 3

Assumptions: starting balance 10,000 USD,  risk per trade 200 USD (i.e. 2% of the starting balance)

Win ratio 70%,  R ratio 0.6.  (average reward to risk ratio of closed trades; 0.6 indicates that average winners are smaller, think $60 average winner and $100 average loser) 

Lucky outcome example:
equity curve Monte Carlo simulated chart

Losing streak: 2.  Just two. This is great. BUT, see the result, even the "lucky" run shows ending equity of 14000, compare to the ones above.


Unlucky outcome example:

equity curve Monte Carlo simulated chart

Losing streak: 3. Just three. This is good, after all, with 70% winning trades, we do not expect many losers in a row. But, look at this, even though this is a positive expectancy system, we are in red. In this specific "unlucky" sample of 100 trades there was 62% winners (instead of a target of 70%). This can be very real. 

This still has a positive expectancy, just a different characteristic and even a small decrease in win ratio will make it a losing system. 

If you download the spreadsheet tool, you will be able to run as many simulations as you want, with the parameters of your choice. Also to see how many winning trader you need to be profitable given a certain R ratio. Or the other way round.

Summary

Now you understand the impact of both a win ratio and a reward to risk ratio on how your account balance may look like after a series of trades. With this tool, or even based on examples shown, you know what losing streak is a normal thing to expect, and based on this, you know how to choose a position size (how much money to risk per trade) and when to stop trading the system and review it vs. what is still a normal random distribution of losing and winning trades. 

Questions or comments? I am happy to respond and help. Just post a comment below or contact me directly if you prefer. Please share with others. 

1 comment:

Anonymous said...

Dziękuję Ci za to!!!;-)