Saturday 18 November 2017

How can we make a strategy profitable modifying a couple of things?

Nowadays trading is in vogue, even more, if we consider the new cryptocurrency trend. Basically, everyone wants to jump in. The trader lifestyle is desired by all the people. Sadly, trading is harder than what the social media shows. The industry is changing a lot. Concepts such as machine learning, artificial intelligence are taking importance in leading investment banks and hedge funds as they are heavily investing in it.

Why do the biggest companies invest in machine learning, artificial intelligence, and algorithms?


It´s very difficult to replace an experienced trader because he knows how to adapt the strategies in different economic cycles and conditions. Some hedge fund managers are hiring a lot of developers and programmers to create algos that emulate the behaviour of their best traders. This seems really expensive, at least in the first years, but I believe that in the long run will save money for the hedge fund. How can you emulate the trader behaviour? In my humble opinion, I would divide the strategies applied by the trader in little pieces and I will study the trader´s track record in order to study the conditions (price, type of order, macro events on that day, news) of the trades. Once I understand the reasons I will try to replicate its piece of strategy and I will code it. Once it’s coded and tested, I will assign a subaccount to use this strategy and I will do the same process for each strategy. To sum up, I will have a trading account made-up of subaccounts that run a specific strategy. We can say that the main account is the portfolio and the subaccounts are different traders or fund managers.
This process can take a lot of time and some parts can be difficult to replicate.

What aspects should we modify to make a simple strategy profitable?


The strategy is based on the EURUSD futures but I'm not going to explain how it works. The main purpose of this post is to show you how to modify a simple strategy to improve the profitability and reduce the risk. It only trades once a day if the conditions are met. This backtest shows the last 5 years. The initial portfolio was 50000 USD.

Plain strategy



This is the strategy without any modification. 

     Statistics of the strategy, own elaboration using RStudio

The mean is positive and it shows that the system will make on average 16.21 USD per day. Sadly is not that easy, because there are winning days and losing days. The best day it banked a 3250USD profit. On the other hand, the worst day shows a loss of 2440 USD. The Sharpe Ratio is very low. The returns’ distribution was a normal distribution around 0. The main problem is that there were trades that lost a big percentage of the portfolio. This is why I decided to limit the loses in the second strategy. Let’s see the maximum Drawdown.


     Max drawdown and track record of the strategy, own elaboration using RStudio

Any serious investor can’t tolerate this drawdown considering the size of the portfolio. I wouldn’t be confident to use this system after reviewing the track record. Basically, it goes sideways.

Strategy 2, limiting loses


In this case, I decided to limit the loss to 600USD per day. Let’s see if the system has improved or not.



     Statistics of the strategy, own elaboration using RStudio

In general terms, this system is worse than the first one. The system makes 15,19 USD per trade on average, which is  1 dollar less than in the first strategy. The worst loss has been limited but the distribution contains more days on the negative side. The days with big swings generated the most part of the loses. The return is only 19.96% in the backtesting.




     Profit and Loss from trades distribution, own elaboration using RStudio

The losing days are concentrated around the maximum loss allowed.


     Max drawdown and track record of the strategy 2, own elaboration using RStudio

The distribution is not appealing to me. The best thing is that the max drawdown is smaller than in the first strategy. This system is clearly limited by days with big ranges.

Strategy 3, looking for different entries


Once I limited the losses of the first system and I checked that it wasn’t working as I would like it, I decided to change my entries. Will this be the solution?


     Statistics of the strategy, own elaboration using RStudio

Modifying the entries improved a lot the system. Now the system mades 49.88 USD per day. The standard deviation is lower. It would have returned 81.4% in 5 years, around 17% per year. What a change!! The winning days' percentage has increased and the Sharpe Ratio is very good. You should think that the commissions are not included.


    Max drawdown and Track record of the system, own elaboration

This is the best point. Look at the line! Now the system is consistent and the maximum drawdown has decreased a lot.

Conclusion


Even if you have read or heard about a successful trading system, you shouldn’t trade it without testing it before. We have seen that with minor tweaks the strategy can improve a lot. I hope that this post will help you to understand the process. The sky is the limit, in this field, the creativity doesn’t have limits. If you are a professional trader this can help you to test ideas and become more confident. Another important point is that you shouldn’t invest in these strategies even when the statistics are good. You should test them with a paper trading account and compare that the behaviour is similar to the previous backtesting. This is crucial because there is the risk of overfitting. I hope you like.

Have a good trading!



Disclaimer

I wrote this article myself, and it expresses my own opinions that shouldn't be used as a trading advice. Trading carries considerable risk due to the high leverage involved

No comments:

Post a Comment

Thank you for participating in fxandfixedincometradring.blogspot.com

8th day small profit that helps me to keep going in the competition

After a successful week and most importantly from recovering almost $6k, I wanted to consolidate my positive results. My desire was to b...