Thursday 7 December 2017

Trading system based on proprietary indicator, Part 2


Today I will show the trading system behaviour from October 2008. Let me introduce the macro situation before I review the backtesting results.

Brief description



The financial crisis started later in 2007. The stock market suffered a big correction in 2008. The volatility was far higher than nowadays. The central banks implemented the quantitative easing programs in order to stabilize the economies around the world. This is an example of the German Dax index and the Eurostoxx index.

     Source: TradingView, DAX vs Eurostoxx futures, daily, from 2008 to 2018


Results from October 2008


      10 Yrs Backtesting results, own elaboration with Excel and RStudio

The main difference is the volatility in the underlying. As you can imagine later in 2008 the volatility was really high and the stock market was in free falling until it bottomed in 2009.
As you can see the big bounces in 2008 are the reason for the big range shown in the backtest.

Comparison with the 5 Yrs Backtesting

                                          Comparison between the 5Yrs and 10Yrs backtesting, own elaboration

You can see a big improvement in the 10 Yr study vs the 5 Yr. The average profit was 151.28 EUR vs 95.86 EUR. The standard deviation and variance were higher due to the volatility from 2008 and 2013. The range is bigger as well because the stock was trading higher. Considering the strict risk management, I´m surprised about the winning trades percentage. I believe that a mean reversion strategy was the best one at this time, even more with the actions taken by the central banks. In addition, the return’s distribution changed and it shows higher extreme figures (in the positive side, which means a high probability of bigger profits) The system traded 733 times vs 130 times in the last 5 years, the profits are concentrated in the first 300 trades. The Sharpe Ratio is slightly worse.



                                          Max Drawdown, own elaboration using RStudio

I´m happy with this figure, losing 2820 EUR was the equivalent to 3.16% of the portfolio. This is a very conservative figure which I consider ideal. Sadly this is not applicable to another kind of strategies because the system opens and closes the positions on the same day.


         Portfolio growth, own elaboration using RStudio

There is not much to say about this chart. You can see the change in volatility from the first years to the recent years. The biggest profits are concentrated in the first 300 trades. The initial portfolio was 20000 euros. I haven´t included the commissions.

Sum up


We have seen how this system behaved during the last 10 years. You can think that is overfitted and this post doesn´t have value because I tested the system in the right period. This is not the purpose of this little article. I´m surprised with the performance but if you had bought the Dax in 2009, you would have multiplied your portfolio’s value by almost 4. In the next post, I will compare the trading system vs the DAX. I hope you like it. Thanks for reading.

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

Sunday 3 December 2017

Trading system based on a proprietary indicator Part 1


This is a new concept. I will do three parts to analyze the trading system in a better way and compare it with a benchmark. The idea is introducing the trading system, showing the backtesting (last 5 years), comparing with the 10 years backtesting, studying the system vs the benchmark and applying money management to see how the performance and risk parameters change.

Brief explanation of the trading system


The system is based on a proprietary indicator as you can see in the title. The idea behind this system is mean reversion. The levels are chosen from the study of the returns’ distribution. Does it sound familiar to you? In addition, a strict risk management system has been applied. The maximum loss allowed is 0.5% as we will see in the next points. The trading system trades 1000 shares in each trade (in the future I will apply money management) The initial portfolio

 


Results after the last 5 years (backtesting)



Backtesting statiestics from RStudio and Excel
     Backtesting statistics from RStudio and Excel, own elaboration


As you can see the system makes 95.86 euros on average per trade. I would like to make clear that the system traded 133 trades and the commissions are not included. The maximum profit in a trade was 1650 euros while the biggest loss was limited to 100 euros.  The return was 12750 euros which is the equivalent of 63.75% in 5 years (around 12.75% per year). As you can imagine, considering the strict risk management, the losing trades percentage is higher than the winning trades percentage. But the average winner is higher than the average loss. The Sharpe Ratio is 4.32, which confirms the profitability of the system.



Max Drawdown, own elaboration
                                  Max Drawdown, own elaboration using RStudio


This is the measure that I like the most. The system only loses 925 euros in the worst trading period. If we check in percentage terms, it represents a 3.53% loss. According to the asymmetrical leverage rule with a gain of 3.57%, we offset the loss. This shows the importance of risk management.

Portfolio performance
      Trading system track record, own elaboration using RStudio


Here you can see how the portfolio has been performing. The most important is its consistency.

As a curiosity, performance comparison with different initial capital


comparison

With these numbers, we would be tempted to invest 5000 euros or less. The system doesn’t require a lot of capital. The main problem with a 5000 portfolio is that we will struggle because the costs are not included and we couldn´t trade 1000 shares each time.


Conclusion


This has been the first part of a series of posts about the same trading system. In my opinion, the performance and the risk metrics are good. In the next post, I will review the 10 years backtest. The purpose of that is to check that the system hasn´t been overfitted for the last 5 years and show how it performed in a longer period. I hope that you like it.

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



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...