Price Index 6 months

Price Index 6 months

I wrote this strategy hoping to start some discussion on value trading vs. day trading and also to give a different option to people with little time available.

I adapted a buy-and-hold strategy based on the price index 6 months with an long-only-entry. When the close of the day crosses above 144% to the price registered 6 months ago we go long and we hold the stock for 1 year (apron 254 bars).

As I said it’s an adaptation made for automatic trading!! With Italian stocks the results are very good but might be MUCH better if you used Price to book (P/B) and  Earning yields (EY) to confirm the entry. Running this strategy manually with the use of P/B and EY12 months, and using a portfolio, returned an average of 55% a year in the last 10 years (Only one year I didn’t beat the market).

Blue sky!!!

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Nicolas • 07/07/2017 #

    Very interesting but why 144%? What about the drawdown of the portfolio? The one from this single stock is already huge! 😉 

  2. Kenneth Kvistad • 07/07/2017 #

    I have never been wondering about long trades or made any due to overnight costs, butdo you think it still can.be affordable for such long trades as months/years?
     

  3. gabri • 07/07/2017 #

    Nicolas,
    144% was just an adaptation to make the automatic trading. Any number between 140% and 150% is fine. You should take the 20-40 stocks with the highest 6 months Price Index and search their fundamentals to pick the right one. Drawdown are not really a factor when you buy and hold value stocks.
    This was actually a real trade I made but I bought only in September 2004 since P/B was 1.4 (expensive but not too bad for the market of that moment) and the other fundamentals were promising. What I wanted to prove is that there are bizilions of trend indicators on the various trading platforms but the real big wave worth surfing is the one started by the institutional investors and they buy GOOD companies for CHEAP. Price index (for momentum) and fundamentals are the only data they use. 
    Having a portfolio made with stocks selected with fundamentals leads to really high performances (they almost always beat the market), even better the one of this single stock.
    G

  4. gabri • 07/07/2017 #

    Kenneth,
    I buy stocks, hence a part of a business. For stocks there are not overnight fees. You find overnight fees for CFD and derivatives. On top of that I go LONG only. With my bank I pay approx 3.5 Euros everytime I buy and the same amount when I sell. It’s totally worth for me.
    G

  5. Kenneth Kvistad • 07/07/2017 #

    Ah okay. You can make automated trading with stocks as well 🙂 ?
    I dident know that

  6. gabri • 07/07/2017 #

    Kenneth,
    I manually trade only but I decided to code this strategy to show that there is more than intraday trading and this “more” might lead to substantial gains with less work and stress (on the stress I am not so sure 🙂 )
    G

  7. luxrun • 07/07/2017 #

    Hi Gabri,
    I realized screener with the specifications of your trading system. Do you give me feedback on its reliability? This is the code:
    // Price Index 6 months
    thr=44 // entry thresholdref=close[130]*(1+thr/100) // price entry levelcond1=(close CROSSES OVER ref)
    SCREENER[cond1] (Variation AS “% Var barra prec”)
     

  8. gabri • 07/07/2017 #

    Luxrum,
    I would personally  just make it like this:
    thr=44 // entry threshold
    ref=close[130]*(1+thr/100) // price entry level
    cond1=(close > ref)

    SCREENER [cond1] (ref AS \"Price index\")
    so you can see ONLY the stocks that meet the condition and they will be ordered by the amount of gain in the last 6 months. You want to pick the top 20-30 stocks in the list so the amount of gain is important. Like I already mentioned 44 is not a fixed umber. If you’d rather use a yearly return you can lower the threshold to 30-ish. The setting are very personal.
    G

  9. gabri • 07/07/2017 #

    Also, don’t forget to make sure you are buying stocks with low Price to Book ratio.
    G

  10. gabri • 07/07/2017 #

    Luxrun,
    I wrote the previous answer in a rush. Try this code:
    thr=44 // entry threshold
    ref=close[130]*(1+thr/100) // price entry level
    cond1=(close > ref)
    pi6m=100*(close-close[130])/close[130]
    SCREENER [cond1] (pi6m AS \"Price index\")
    Now you will see the stocks that meet the requirement and they will be ordered based on their gains. Sorry for the wrong code of before.
    G

  11. luxrun • 07/07/2017 #

    Thanks Gabri for your screener rework. I\'m working on producing the indicator to get the graphic signal on the chart. It seems to me important to understand when it signals in the six months considered by the trading system. Luxrun

  12. gabri • 07/07/2017 #

    Luxrun,
    non ho o capito di cosa hai bisogno?
     

    • luxrun • 07/07/2017 #

      Nulla di particolare! Scusa il mio inglese tradotto da google. Dicevo solo che sto provando a costruire l’indicatore che mi mostra a video quando scatta il segnale long, nei sei mesi che il trading system, prende in considerazione. Non serve a molto, ma forse aiuta visivamente. Grazie Luxrun

  13. gabri • 07/07/2017 #

    Luxrun,
    no problem per l’inglese. Ti posso fornire due soluzioni. La prima disegna la linea del 44% e quella del prezzo:
    a=close[130]

    linea1=(1+44/100)*a

    return linea1 style (dottedline,1) as \"44%\",close coloured (205,0,0) as \"Close\"
    La seconda ti disegna il ritorno degli ultimi 6 mesi e quando passa il 44% ti segnala la zona positiva:
    a=100*(close-close[130])/close[130]

    return a,44
     

  14. luxrun • 07/07/2017 #

    Benissimo, grazie, molto gentile e disponibile! Lo provo subito.  Io avevo scritto questo codice (ma programmo poco e male…), per l’indicatore:
    // Price Index 6 months indicator
    thr=44 // entry thresholdref=close[130]*(1+thr/100) // price entry level
    // conditions to verify entry longc1 = (close CROSSES OVER ref) IF c1 THEN
    cross = 1
    ENDIF
    return cross as “CROSS”

    • gabri • 07/07/2017 #

      Il tuo codice va benissimo, continua cosi’!! dovresti solo aggiungere una linea per fare in modo che cross non rimanga sempre uguale a uno:
      c1 = (close CROSSES OVER ref)

      IF c1 THEN
      cross = 1
      else
      cross=0
      ENDIF

      return cross as “CROSS”
      in questo modo ti da dei picchi quando avviene il cross over (e solo quel giorno). Oppure puoi fare cosi’:
       

  15. gabri • 07/07/2017 #

    c1 = (close CROSSES OVER ref)
    c2 = (close CROSSES under ref)
    IF c1 THEN
    cross = 1
    ENDIF
    IF c2 THEN
    cross = 0
    ENDIF

    return cross as “CROSS”
    In modo che cross rimanga uno fino a che il valore di gain e’ superiore alla soglia.
     

  16. luxrun • 07/07/2017 #

    Grazie, Gabri, per il tuo supporto e aiuto. Ti sono veramente grato! Continuerò a seguire il tuo lavoro! L 

  17. Alain Federmann • 07/07/2017 #

    Hi Garbri,

    Thanks for your share. This is a very interesting strategy.
    Does anybody know an indicator using P/B ratio to get sharpest results ?

    • gabri • 07/07/2017 #

      Alain,
      there is no way to get p/b data on PRT. Unfortunately you have to get this values from the balance sheet of the company you are planning to buy. What I do is just running a screener based on price index and check the P/B of the first 20-30 companies on internet.

  18. Alain Federmann • 07/07/2017 #

    Ok, thanks.
    That is what I thought.
    Pretty weird and such a shame a powerfull tool as PRT can not use few fundamental analysis statistics.

  19. gabri • 07/07/2017 #

    Ho knows, maybe in the future they will 🙂

  20. Miguel1980 • 07/07/2017 #

    Hello gabri ,

    well, with the results you mention, even with half those results, it does seem a very promising strategy. I totally agree on the fact that fundamentals can make or break strategies in the long run. In my opinion, using only TA or Price Action concepts is, to some extent, like playing casino: you can win, but is very hard to beat the market clearly and consistently.

    You say you use the P/B and EY metrics. No problem with the first but I have some doubts about the second, just, if I’m not wrong, the inverse of the overused P/E ratio, which in my mind doesn’t seem to be the finest of the tools when we think of forecasting the future price evolution of a stock. Looking forward to know your opinion/experience about it.

    As a guide on how your strategy works, could you run a screening for us interested, preferibly on an US market (Italy would be OK too, if you prefer so), and then explain which stock/stocks you would choose and why? When you have the time and just the once, don’t worry!

    Thanks for now.

  21. gabri • 07/07/2017 #

    Hello Miguel,
    The reason why I switched from trading to investing because I didn’t like to play casino anymore 🙂 You are right, EY is pretty much the inverse of P/E ratio and for many P/E is not a valid reference number but used properly raises awareness on what is going on. I suggest you to read the work of Shiller (a nobel price) and his use of a 10-year-PE to predict markets. I do not use only P/B and EY but I personally check all the balance sheet of a company and, if good, I try to buy at a low PE or PB. Unfortunately I cannot run any backtest because I cannot make a code to find cheap and good companies on PRT and also because you need to backtest a portfolio. Every single stock will lose at some point. Using this system will allow the portfolio to win.

  22. Miguel1980 • 07/07/2017 #

    Hi gabri,
    I was not asking you to run any backtest but a PRT screener on any market to find 20/30 stocks currently with the best (best according to your strategy) PI 6m index, and then to share some thoughts about which one to pick up, based on their P/B, EY or whatever. Simply following the thread of the post.
    But personal strategies are just that, personal, aren’t they?, so I won’t insist :- )
    Thanks for your time.

  23. gabri • 07/07/2017 #

    Miguel, copy. I just came back from vacation, I will pass you some data soon.

  24. gabri • 07/07/2017 #

    Miguel,
    I will give you some stocks. I would buy (I probably will) Serneke group AB. I will wait for the following to have a good PI 6m: gelek group, awilco drilling, arteria sa.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
BenJuice JohnScher, merci de partager ta stratégie. Je suis nouveau dans ce domaine, sur ton code q...
JohnScher As a percentage of the price, here 2%. StopLoss as well as TargetProfit. SL and TP come ...
Wilko I absolutely love the simplicity of this mean-reversion strategy. Well done!
Patrice210 bonjour STANKO, effectivement la première ligne apparait en anomalie et je ne comprend pas v...
KumoNoJuzza Hi guys, Thanks @Stanko and everyone for your contributions. I have been playing around ...
Stanko Hi KumoNoJuzza, thanks for the post. I also tried your code with Dax and the performance is ...
thomas2004ch Hi, Is this startegy suitable for daily SPY? Regards
ebous64 Je cherche à traiter des effets de bords avec un encadrement ajustable des variables. Vous a...
thomas2004ch What are the values for nbx, nby, pbx, pby, ptsup, stplos, stptg, tp, vsmax, vsmin?
JohnScher Postscript: It's running in the live right now. One position after the other is opened. ...
ullle73 nice!! how's it been since your last post on going live? :)
thomas2004ch Hi, Is this strategy suitable for daily SPY? Regards
adconsulting
3 years ago
japan 225 cash 1 h
japan 225 cash 1 h
31
Strategies
superfalcio Hello adconsulting, after the 2024 performance are you going to adjust the japan parameters?
adconsulting ciao, ho fatto delle modifiche. mi sono spostato sul time frame a 15 minuti per ridurre gli ...
superfalcio ok grazie, ottimo lavoro, sto vedendo le simulazioni... - a me non piace per principio il D...
Darren Nash I found this works well on the DOW
thomas2004ch Hi John, Is your strategy suitable for daily SPY? Regards
gatowman Hi, ich bin leider Anfänger, habe den Code zwar importiert, aber scheinbar läuft er nicht au...
KAMJKAZE thanks, really interesting!
2c95 thanks, why do U prefer average than lowest ? to close under average does'nt mean another...
emism12 Looks great, personally I don't use automated trading for single stocks, but is definitely o...
adconsulting Ciao, I look that the strategy (backtest 50 k), works very good wiht US 500 CASH 1 EURO in...
Kev Monaghan The equity curve looks to follow the stock price almost perfectly, Have you tested on stock ...
cdc.andersson Hello, I´m trying to paste the code and start testing but can´t get it to work in PRT. Shoul...
Lupo32 Thank You Aaron
superfalcio I'm having no more issue on the new Prorealtime release 11.1
Jigsaw20000 Bonjour, Je voudrais mettre le liens du code en format .itf mais je n'y arrive pas , quelqu'...
Corto78 Il faut aller dans la liste des ProBacktest & Trading Automatique (là ou tu as créer ton...
Malloc Bonjour, Votre système a l'air intéressant et prometteur mais en l'état il est inutilisable...
juanj
5 years ago
herke036 For the question how to fill the variables a,b,c,d,e,f,g, x and y? a,b,c,d,e,f,g is selecti...
herke036 In your code I see If onmarket = 0 and Type22 = 1 and hora1 and hora2 Then If InsideBar[1]...
UkDownUnder How do we apply this to a strategy we have made, Thanks
superfalcio Hello, on the 2h timeframe I got a better performance in terms of win% and profit factor. I ...
Jiankyr82 Juan thanks for sharing, I had played with it few days, as also try to catch up on my pro-re...
Lespa212 Hi Samsampop, are you using this strategy? did you add a SL and an exit in case of a trend ...
imonix Have been trying this on demo since Monday before deciding whether to go live with it. Using...
Roberto Blázquez I'm sorry, I've tried it since November 2012 and it's bad results.
Doctrading
5 years ago
Stanko Ciao doctrading, grazie per il tuo contributo. Volevo chiederti se hai tenuto in osservazion...
Stanko Buongiorno doctradinge buongiorno a tutti. Vorrei riportare all'attenzione questo sistema p...
Meta Signals Pro Hi, Yes I am monitoring all the strategies posted on this site and I confirm that the strat...
Pierreco1991 Hello Can you confirm this configuration for FRANCE ? //Time in UTC+8 Rest0Minutes =...
Godo Bonjour Souhait Sam, Après de nombreux essais pour le mettre en format afin d'utiliser ce c...
Nicolas Il faut supprimer celles qui existent dans la fenêtre d'optimisation et les créer en dur dan...
crusoe76 hi there, anyone can help making this strategy work, i have a message saying replace variabl...
Ciccarelli Franco Per lasciare che la strategia venga eseguita (dopo aver importato il file): Basta eliminare...
JADINVEST Hello Jan, hello everyone, Thanks Jan for this strategy! Since 2020, have any of you found a...
Alessandro Furlani Hi Ian, hope you still use PRT and so you can read this post. I have tested a lot your work ...
FXmike hey my friends, thank you for this great code. my problem is he make no trade open. backtest...
FXmike Can i put a Action that my start contract is smaller than 1 ? 0.3 or 0.5 ? In wich Position...
phoentzs I wrote the code for M15 back then and also variants in H1 and M1. Everything works so far....
Jan Wind Thanks for sharing ! The Gain/Loss ratio is a bit low, 1,16, hardly offset the risks take...
drive whats the period ?
Lucas0000 Hola. estoy buscando un programador en proorder, para hacer un programa basado en el Q-trend...
Ludwig Bonjour Merci pour le code, je souhaite intégrer un break even et mette en place un réinves...
superfalcio hello, this strategy is pretty interesting, anyway on index after diferent suggestion and im...
Fralex Hello everyone I optimized the original “LongOnly-DAX-4H-TMA-Channel” algorithm over a pe...

Top