Mean reverting strategy on Cac40 2H
Forums › ProRealTime English forum › ProOrder support › Mean reverting strategy on Cac40 2H
- This topic has 12 replies, 5 voices, and was last updated 6 years ago by Nicolas.
-
-
11/04/2017 at 8:40 PM #51513
Hello,
first strategy contribution from my side, hope you will appreciate it. Wanted to share this strategy as payback for this great community, which already helped me having two very profitable automated strategies running live (goal is to reach 10).
I haven’t reinvented the wheel with this mean reversing strategy. Some similar strategies have already been posted but I feel the results are better than what I have seen:
- simple entry rules based on price reaching extreme level as defined by bollinger bands + some filters (candelsticks, volatility)
- stop loss set near recent low/high
- order accumulation (double the initial size max) if we are still in profit avec 10 bars
- standard trailing stop
- Take profit if we reach the opposite bollinger bands
Optimization is very limited (for the trailing stop and the volatility filter), so intuitively it should be robust. Montecarlo simulatation gives reassuring results.
The strategy performs very well on Cac40, ok on some other European index, but not on US index. Maybe the concept is too well known already and too much algo have run it there. So main caveat for me is that it could stop working in the future.
Will start paper trading asap.
There is room of improvement, so I count on your ideas!
11/04/2017 at 8:47 PM #5152211/04/2017 at 10:02 PM #5153311/04/2017 at 10:35 PM #51537WFA with the main optimized paramaters, the trailing stop steps (TGL & TGS). For me, it suggests that optimizing the strategy on latest 3 years of data is robust, but you may have a different view?
I made the error to use in-sample data for the Montecarlo simulation, sorry irrelevant then.
11/04/2017 at 10:42 PM #5153911/04/2017 at 11:01 PM #51540yes nicolas, I’m reusing some bits of code from the forum. Is there some trailing stop versions that causes an issue?
For info, I trade live an edited version of the fractal strategy on EURUSD proposed by ALE + Pathfinder on the index posting best perf on a rolling period
11/04/2017 at 11:04 PM #5154111/05/2017 at 12:45 AM #5154411/06/2017 at 9:01 PM #51734Hello Stefou
Thanks for the idea and the code
Do you have an idea how to replace these parameters with % ? (to make it less optimised and for long term evolution of price?) in your backtest, the CAC goes from 2500 to 6000.
Regards
12345//variables optimizedminATR=13maxATR=48TGL =40 // trailing stop longTGS=50 // trailing stop short11/09/2017 at 10:37 PM #52179Hello Yannick.
we could replace TGL and TGS by a multiple of the average true range(in my code “myATR”), so effecitvely making the trailing stop function of the volatility. + you can remove the maxATR threshold, doesn’t add any value.
Any other ideas to improve the code?
11/10/2017 at 9:34 AM #52195I updated the code and made a quick optimization (only to validate the ATR trailing stop) :
- fixed points trailing stop change to ATR multiple one
- “stoploss” SLS and SLL pending orders removed and replaced by SET STOP LOSS instructions (compatibility with limited risk accounts and to avoid being 1 bar without stoploss)
Overall result may have changed since the first version stefou102 has kindly shared with us, a new global WFA should be made.
11/10/2017 at 12:15 PM #5222011/10/2017 at 12:23 PM #52221 -
AuthorPosts
Find exclusive trading pro-tools on