Systems Workshop: "Buttonwood" E-mini daytrading system

Post anything related to mechanical systems and automated trading here.
orionsbelt
Posts: 33
Joined: Tue Jul 21, 2015 9:19 pm
Contact:

Re: Systems Workshop: "Buttonwood" E-mini daytrading system

Post by orionsbelt » Wed Feb 24, 2016 6:46 pm

Earik,

do you have a plain script with the spherical astro that will plot the days in advance of when the trades will be executed so we can prepare for future trading days?

thanks

User avatar
earik
Site Admin
Posts: 474
Joined: Mon Dec 01, 2014 12:41 pm
Contact:

Re: Systems Workshop: "Buttonwood" E-mini daytrading system

Post by earik » Tue Mar 08, 2016 6:54 pm

Hi Orion,

Actually, yes, I do. Here you go! Use it on a daily chart, and it will plot the filters out ahead of time so you can find those days when trades will happen.

Regards,

Earik
Attachments
buttonwood_index.zip
Unzip, double-click, then apply to daily charts
(1.33 KiB) Downloaded 727 times

orionsbelt
Posts: 33
Joined: Tue Jul 21, 2015 9:19 pm
Contact:

Re: Systems Workshop: "Buttonwood" E-mini daytrading system

Post by orionsbelt » Fri Apr 01, 2016 12:33 am

thanks for the script Earik.
i could not clearly see the actual trading days on a "daily" chart but could easily see them on a "60-minute" chart.


thanks again Earik

buttonwood_index.png
buttonwood_index.png (82.37 KiB) Viewed 30047 times

hjelmstade
Posts: 34
Joined: Wed May 18, 2016 6:51 pm
Contact:

Re: Systems Workshop: "Buttonwood" E-mini daytrading system

Post by hjelmstade » Wed Jan 11, 2017 8:06 am

Hi all,

I've been working on a modified version of the Buttonwood system for a couple months now and finally have something I am happy with. You can find the backtesting code for my version here: http://www.wave59.com/library/scriptdetail.asp?id=181

You will see I did a little refactoring on some of the original code so its in a similar format to the Livermore system I created.


Before we get into exactly what I changed, lets review how v7 of Buttonwood has fared over the last year. These results are using the default settings for v7 on an @ES#C chart from 10/1/12 to 1/10/17 with all holidays and half-days excluded. I started the chart from 10/1/12 as I first began my own version in 10/16 and wanted four years of history and have just been expanding the chart as time went on.
es_5m_buttonwood_original_summary.PNG
es_5m_buttonwood_original_summary.PNG (42.63 KiB) Viewed 29965 times
es_5m_buttonwood_original_equity_small.PNG
es_5m_buttonwood_original_equity_small.PNG (46.38 KiB) Viewed 29965 times
So as you can see, it did not perform as well during the volatility we saw in 2016 and the average trade value has dropped by half.



This is the final result of my implementation on the same chart which has a profit per unit of risk score of 20.1 trading a base contract size of 2 like in v7 (before equity curve adjustment).
es_5m_buttonwood_2cts_summary.PNG
es_5m_buttonwood_2cts_summary.PNG (51.29 KiB) Viewed 29965 times
es_5m_buttonwood_2cts_equity_small.PNG
es_5m_buttonwood_2cts_equity_small.PNG (45.96 KiB) Viewed 29965 times
es_5m_buttonwood_2cts_annual.PNG
es_5m_buttonwood_2cts_annual.PNG (43.21 KiB) Viewed 29965 times

While I did create some versions with a higher average trade value, they all had a lower profit per unit of risk score and a less smooth equity curve so I believe what I have now offers a better balance and hopefully will not degrade as quickly.

So this is what I did.

First, I re-optimized the existing Fast/Slow SMA sub-system to use lengths of 12 by 48 instead of 12 by 46 as it looks like the ideal values changed in 2016. I tried implementing an adaptive version to avoid some of this degradation going forward but nothing I tried showed improvement over the static values.

However, for the Channel Breakout, I was able to implement an adaptive version that did improve the system. Rather than using a static value of 7, it now adapts over a lookback period of 100 between AMA lengths of 2 to 7, incrementing by 1.

I then set about trying to add additional sub-systems to improve the merged signal and believe me, I tried a lot. My custom momentum divergence system, bollinger bands system, variations of systems included in my daily Livermore system and so many others never made the final list. While some of them did show some improvements, it always came with its drawbacks and when I would do an optimization run that would determine the best combination of sub-systems, the two systems above and only the two systems below ever made the list. I do plan to come back to try to experiment with more but I'm happy with what I have now.

The first additional system I added is a genetic program originally created on an 8m @ES#C chart that uses TSI and USM, both with a length of 10. It just so happens it works well on a 5m chart as well.

The last system I added just resulted in slight improvements. A while back I discovered that using ExBars with higher inputs actually indicated trend continuation so in this case I am using it as an inverse signal. If ExBars2 with an input of 11 gives a red (bearish) ExBar, it triggers a +1 signal.


I was becoming frustrated that I could not find settings for my momentum divergence sub-system that improved Buttonwood as it kept giving such great signals on a 5m chart. It then dawned on me that if I couldn't use it as an entry system, maybe I could use it as an exit system. Buttonwood will now reverse/exit on a signal change or if momentum divergence is detected. However, there is a points of profit threshold that must be reached before it will exit, otherwise I found it exits some positions way too early and decreases the average trade value in the long run. If you disable the momentum divergence exit system, you will see it does not add very much profit but what it does do is decrease the max draw down significantly which means you can trade more contracts for your account size.

Next, I implemented catastrophe ATR stops. As expected, whenever the ATR stop was hit, it decreased overall performance so a large multiplier of 20 is used as the largest multiplier that was hit over the last four years was in the low teens so this way we have some leeway.

Then I tweaked the equity curve filter. Originally, Buttonwood would decrease contract size by half after two or more wins and would increase by half after two or more losses. I tried many different equity curve filters and eventually found that if we start with a base contract size of two like the original, we can increase contract size by half after one loss and then double contract size after two or more losses without affecting the max draw down. My implementation does not decrease contract size after successive wins so is a little riskier than the original but greatly increases profit without affecting MDD.

Lastly, I re-optimized the astro filters. I'll be honest, I still have a lot to learn when it comes to the astro tools in Wave59 so I only optimized the orb and threshold values. I found the ideal threshold values are still the same from a year ago and that the orb values have barely changed at all. I now have the progressed_orb set at 0.95 instead of 1 and spherical orb set to 9 instead of 8. I did not try optimizing the correction or index values.

Considering how little the inputs for the astro filters have changed in a year, I believe this filter is extremely stable and will work great on future systems as well.


The comments in the code go into a little more detail on everything, including the inputs, but let me know if you have any questions. Below are what I believe will need to be re-optimized in the future. I plan to track the average trade value on a rolling four year chart and re-optimizing everything whenever the average trade value drops below $50. I'm taking my live implementation of this version online tomorrow as its been performing as expected on my paper account.

First as we are using static values for Fast/Slow SMA's, these will change.
fast_avg
slow_avg

Then the momentum divergence exit system will need to be optimized again if it begins to miss obvious exits.
mom_len_long
min_mom_div_dist_long
mom_div_point_thresh_long
mom_len_short
min_mom_div_dist_short
mom_div_point_thresh_short

Then lastly, the following may need to be optimized again but from what I can tell they will only change slightly.
progressed_orb
spherical_orb


Other than that, it is possible the genetic system degrades and needs to be removed but that is easy to test for as you can set s3_enabled to false to see if it would have performed better over a certain time period.


If anyone can think of additional sub-systems, exit systems, etc. they want to add, please let me know and I'm happy to help. While I consider this to be usable now, I'm sure we can make it better :)

I haven't tried adapting Buttonwood to another time frame yet but will also try this when I have time.

I have a couple more comparison charts I'll share in the next post.

hjelmstade
Posts: 34
Joined: Wed May 18, 2016 6:51 pm
Contact:

Re: Systems Workshop: "Buttonwood" E-mini daytrading system

Post by hjelmstade » Wed Jan 11, 2017 9:04 am

Alright, here are a couple more charts.

First, just for kicks, here is the backtesting summary with dynamic position sizing and a contract cap of 100. This is on the same chart as the previous screenshots from 10/1/12 to 1/10/17. Starting account size is $25k and it trades one contract per $10k of account and rebalances after account increases by 5% or decreases by 30%.
es_5m_buttonwood_100cts_summary.PNG
es_5m_buttonwood_100cts_summary.PNG (35.19 KiB) Viewed 29965 times
What I found interesting is with dynamic position sizing, it actually increased the average trade value. In my experience on the other systems I've built, including the many I ended up discarding, the opposite was true.

As expected though, the profit per unit of risk score did drop. With a contract cap of 100, its score is 16.69 which is still great but has decreased by almost 4 points.



After I completed the system, I decided to test on 8 years of data to see how it compared to v7 over that same time and make sure it was still usable.

First, here is v7 from 1/1/09 to 1/10/17.
es_5m_buttonwood_original_summary_2009.PNG
es_5m_buttonwood_original_summary_2009.PNG (48.65 KiB) Viewed 29965 times
es_5m_buttonwood_original_equity_2009.PNG
es_5m_buttonwood_original_equity_2009.PNG (34.78 KiB) Viewed 29965 times
As you can see, the average trade value increased for the original buttonwood on a longer time frame. This makes sense as we are including more years for which it was originally optimized.


And here is my implementation over the same time period, again with a base cts of 2.
es_5m_buttonwood_2cts_summary_2009.PNG
es_5m_buttonwood_2cts_summary_2009.PNG (37.39 KiB) Viewed 29965 times
es_5m_buttonwood_2cts_equity_2009.PNG
es_5m_buttonwood_2cts_equity_2009.PNG (39.5 KiB) Viewed 29965 times
Although the average trade value has dropped, it is still usable and still better than the original. What is interesting though is that the MDD has increased to now be more than the original buttonwood. However, my implementation made an additional $120k of profit which offsets the increased MDD so it is still has a better profit per unit of risk. In fact, it is now even better than it was before on the 4 year chart.

Original Buttonwood: 12.9

My implementation: 20.95 (previous over last four years was 20.1)


Alright, so thats all I have. I'd love to get this thread restarted so please start sharing any ideas, critiques, etc.

I have a feeling the markets are going to take everyone for a ride the next couple years so if we continue to work on Buttonwood, we could have a real edge.

orionsbelt
Posts: 33
Joined: Tue Jul 21, 2015 9:19 pm
Contact:

Re: Systems Workshop: "Buttonwood" E-mini daytrading system

Post by orionsbelt » Sat Jan 14, 2017 4:12 am

Great Stuff hjelmstade.
i have been meaning to get back to this for a while now.
i will digest what you have shared and get back with anything potentially useful i find.
in the mean time anything you can add is always really appreciated.
thanks again :D

hjelmstade
Posts: 34
Joined: Wed May 18, 2016 6:51 pm
Contact:

Re: Systems Workshop: "Buttonwood" E-mini daytrading system

Post by hjelmstade » Sun Jan 15, 2017 9:53 am

Thanks orionsbelt. Appreciate any feedback or ideas :)

Unfortunately, it looks like Murphy's Law has struck again. These were the trades it took the first three days I took the system live.
buttonwood_1-11-17_through_1-13-17_trade_results.PNG
buttonwood_1-11-17_through_1-13-17_trade_results.PNG (38.78 KiB) Viewed 29942 times
Hopefully we don't see as many zig zag days next week as that is one of the weaknesses of this system.

I did a little more work the last couple days seeing if I could create any additional filters and while some of them would have prevented the big losses over the last couple days, overall they made the system perform worse so I think it is best to just weather out this draw down period rather than making additional changes that will hinder the system once it is over. Here are couple things I tried.

1. Attempted to add additional sub-system using Action Zones to identify potential reversal points. I went through a lot of rules and was not able to improve the system in any way. I tried creating a stand alone Action Zone system mixed with additional indicators a while back but was not able to find anything with a higher average trade than $25.

2. Attempted to add a TSI filter to only allow trading in a specific direction based on either the positive/negative TSI value or by the slope of the TSI. Neither showed improvements in the long run.

3. Attempted to add an ROC (rate of change) filter to only allow trading in a specific direction but was not able to get this to work either.

4. Attempted to add a 9-5 Trend filter on 5m scale but this did not work either.

5. Attempted to add a 9-5 Trend filter on a larger time frame and then feed those results into this 5m system. I did this by running a parallel @ES#C chart over the same time period but on a larger time frame and then outputting the 9-5 Trend value into a text file that was then read into this 5m system. I tried both a 15m and 20m time frame and had high hopes this would yield good results. In several instances I was able to get the accuracy above 50% and the average trade value to $60 but every time in decreased profit and increased max draw down to the point where the profit per unit of risk score was well below what we have here (in the 14 to 15 range compared to the score of 20 we have now).

This idea of having indicators from larger time frames fed into a system that trades on a shorter time frame is still something I think we can use in the future so I plan on exploring it more later.

User avatar
earik
Site Admin
Posts: 474
Joined: Mon Dec 01, 2014 12:41 pm
Contact:

Re: Systems Workshop: "Buttonwood" E-mini daytrading system

Post by earik » Sun Jan 15, 2017 6:09 pm

FWIW, I've lost money on the first set of trades every time I've taken a system live. Usually I go into a max drawdown right then. Happens without fail. :(

Earik

pleiterr
Posts: 10
Joined: Wed Oct 28, 2015 4:54 pm
Contact:

Re: Systems Workshop: "Buttonwood" E-mini daytrading system

Post by pleiterr » Sun Jan 15, 2017 8:03 pm

Hi Hjelmstade,

I think you are on the right path, it looks very robust although the actual drawdown.

I opened a new topic with a system that I use with minor pivots and SmartMoney that maybe gives you some ideas to test :D

All the best!

hjelmstade
Posts: 34
Joined: Wed May 18, 2016 6:51 pm
Contact:

Re: Systems Workshop: "Buttonwood" E-mini daytrading system

Post by hjelmstade » Sun Jan 15, 2017 9:35 pm

@Earik - Yes, the paragraph in your MTS book where you describe your experience with Murphy's Law always makes me feel better about these situations :)


@pleiterr - Great, thank you :) I've added it to my to do list.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests