S&P500 – The "Bollinger Bounce"

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #39617 quote
    Doctrading
    Participant
    Master

    Hello,

    It is quite easy to take position on the S&P500 : it is bullish over most of the time.

    Because of this, I had the idea to try some strategies, only LONG strategies.

    Here is one that works well.

    We take a BUY (only) trade if :

    – The 50 simple moving average is greater than the 120 simple moving average (upward trend)

    – We have a close lower than the lower Bollinger band, set to 29 periods

    We CLOSE the trade as soon as we close upper than the lower Bollinger band.

    We place a stop loss at 3%.

    Some considerations :

    Why 29 periods for the Bollinger Band ?

    Simply because I have ‘suroptimized’ the backtest, to give the best gross gain. Actually, you can set it to 30 periods.

    On the screenshot, the backtest was made without reinvesting the earnings, with a very correct profit factor (> 4).

    Of course, you can set « REINV = 1 » to test it with reinvested earning, which leads us to a gross profit of 2549K.

    You can change the leverage according to the drawdown.

    The strategy is very simple, maybe too simple… and maybe “suroptimized”.

    Maybe would you find a way to improve it ?

    DEFPARAM CumulateOrders = False
    
    // TAILLE DES POSITIONS
    LEVIER = 4
    REINV = 0
    
    IF REINV = 0 THEN
    n = LEVIER
    ELSIF REINV = 1 THEN
    capital = 100000 + strategyprofit
    n = (capital / 100000) * levier
    ENDIF
    
    // ACHAT
    ca1 = close < BollingerDown[29](close)
    ca2 = average[50](close) > average[120](close)
    
    IF ca1 and ca2 THEN
    BUY n shares at market
    ENDIF
    
    IF close > BollingerDown[29](close) THEN
    sell at market
    ENDIF
    
    set stop %loss 3
    sp-stratgie-bollinger-bounce-1499031233l4cp81.png sp-stratgie-bollinger-bounce-1499031233l4cp81.png
    #39621 quote
    Nicolas
    Keymaster
    Master

    Hi, thanks for sharing this new strategy. I moved your post to the forum instead of a public release into the library.

    Now that we have a tool to test robustness of strategies optimisation, I’m trying to limit the over fitted ones in the library section of the website.  If you think it is over optimized on past price history, please do at least some WF analysis in order to have a clear idea about its robustness or not. I made French videos and blog article (FAQ) about the tool.  Thank you.

    Once you made those tests, please post them here and I’ll add the strategy into the library. Thanks again for your contribution.

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

S&P500 – The "Bollinger Bounce"


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Doctrading @doctrading Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
8 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/03/2017
Status: Active
Attachments: 1 files
Logo Logo
Loading...