Mean reverting strategy on Cac40 2H

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #51513 quote
    stefou102
    Participant
    Veteran

    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!

    Nicolas, Despair, Yannick and 3 others thanked this post
    Equity-Curve.jpg Equity-Curve.jpg Performance.jpg Performance.jpg Equity-Curve-1.jpg Equity-Curve-1.jpg Montecarlo.jpg Montecarlo.jpg Bollinger-Cac40-2H_04112017.itf
    #51522 quote
    Despair
    Blocked
    Master

    Looks interesting! Did you run a WFA and is the monte carlo done with OOS-trades only?

    Strange for 2h timeframe I have just a few months history though I have PRT premium. 🙁

    #51533 quote
    Nicolas
    Keymaster
    Master

    Thanks a lot stefou, I’ll have a look next week. What kind of trailing stop in your code? And..for people browsing the forums to find strategies running well live, what are the 2 ones you are satisfied with?

    #51537 quote
    stefou102
    Participant
    Veteran

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

    WFA.jpg WFA.jpg
    #51539 quote
    Nicolas
    Keymaster
    Master

    Ok so this is the coded trailing stop, sounds good.

    @Despair
    welcome in the Master Member circle 😆

    Despair thanked this post
    #51540 quote
    stefou102
    Participant
    Veteran

    yes 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

    #51541 quote
    stefou102
    Participant
    Veteran

    I trade also a lot manually on EU+US stocks, but grow increasingly frustrated that Prorealtime doesn’t allow semi-automatic trading + auto-trading on a list of stocks. Just sharing my frustration;)

    #51544 quote
    Despair
    Blocked
    Master

    Autotrading on selected stocks depending on some criteria would be awesome! ProOrder connected to ProScreener somehow.

    #51734 quote
    Yannick
    Participant
    Veteran

    Hello 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

    //variables optimized
    minATR=13
    maxATR=48
    TGL =40 // trailing stop long
    TGS=50 // trailing stop short
    #52179 quote
    stefou102
    Participant
    Veteran

    Hello 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?

    #52195 quote
    Nicolas
    Keymaster
    Master

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

    cac40-trading-automatique-stratégie.png cac40-trading-automatique-stratégie.png Bollinger-Cac40-2H_111017_Nicolas.itf
    #52220 quote
    rejo007
    Participant
    Senior

    Thanks nicolas,

    PRT ask to replace the variables by fix values.

    what fix values do you use?

    thanks

    #52221 quote
    Nicolas
    Keymaster
    Master

    The last ones that your optimisation OOS period has validated, according to your WFA.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.

Mean reverting strategy on Cac40 2H


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
stefou102 @stefou102 Participant
Summary

This topic contains 12 replies,
has 5 voices, and was last updated by Nicolas
8 years, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/04/2017
Status: Active
Attachments: 8 files
Logo Logo
Loading...