Monte Carlo simulation and trade optimization

I have hooked my Oanda FxTrade account to MyFXbook.com. I have done so to have my trade record verified, but I also use it for after trade analysis and trade optimization. Today I will share one of the ways I use to optimize my trading.

Start of my trading strategy

By default my myfxbook trading account shows trading performance unfiltered. And that is the way it should be, because that is my actual performance. However I started consistently trading the strategy that I currently still trade as of march 2015. From that moment on I consistently applied my strategy daily and now it is a daily routine. So to see my performance as of that moment I will apply a filter, that filters out all trades made before March 2015.


Only trade best performing pairs

One of the reasons I finally started to consistently trade daily, was that I cut down on the amount of pairs I looked at daily. This reduced the time it took for me to analyse all the pairs in the evening and to monitor them during the day. Still, I am looking at about 19-20 pairs. So, why not make live simpler and only trade the pairs that I have performed best in. I realise that the performance is also related to state of the market during the period the performance was achieved, but for the sake of the exercise, let's pretend this influence is very low due to my extreme flexibility in executing my trades :-).
Then this is the filter that gives best overall performance with less pairs.
Applied filtering

And the performance stats are like this.
Performance stats after optimazation
Monthly gain after optimazation
These stats are in line with how I have experienced trading. All the pairs that performed badly for me in my experience needed indeed be filtered out in order to boost overall performance. Also I experienced July 2015 as a difficult month to navigate the markets. It could be due to all the stuff happening with Greece and China and Iran, but there is always something and I would rather think that it had to do with me. I can control / change me! Not the markets! I had a lot of other stuff going on that reduced my focus on trading. So the lesson here is NOT to trade in such circumstances. Take a long break from trading. As the old saying goes: "Sell in May, Remember to come back in September!"
I'll think I'll do that. I can use the time to do stuff like this: analyse my trading. And work on some stuff that involves trading with the Oanda FxTrade Restful api.

Monte Carlo simulation

One way of verifying the robustness of a trading strategy is to subject the per trade gains to Monte Carlo simulations and see how performance holds up or not. I exported the filtered performance data from MyFxBook and imported this into a speadsheet (I use LibreOffice). I indexed the per trade gains percentages and then randomly picked trades and their gains to build 9 new trade records, which I then plotted.
Monte Carlo simulation of filtered performance
The 'real' trade by trade cumulative gain is lower then what is shown in the MyFxBook results, because this performance does not take into account growing position sizing as the equity grows. It just looks at trade by trade performance compared to the equity at the time of the trade and then accumulates them.
The 'real' gain in this graph shows again difficult trading for me in July and August, just barely breaking even. (with the unfiltered trades I have been losing)
The average of the simulation is pretty smooth and none of the simulations shows draw downs that would make me wanna stop trading.

So I feel confident that trading less pairs will not effect the robustness of my performance and my gut tells me I will probably do better.

Comments