Modified SHARPE index

Modified SHARPE index

This modified SHARPE index indicator will be the base for a strategy I will publish after. The SHARPE index is simply a way to relate profits with volatility that was created in 1966. The higher the number the more “efficient” the title is. In my indicator, instead of using the simple volatility at the denominator (standard deviation) I used the volatility squared to give a slight better ramp to the curve and a better and more precise entry.

The Sharpe Ratio is a measure for calculating risk-adjusted return, and this ratio has become the industry standard for such calculations. It was developed by Nobel laureate William F. Sharpe. The Sharpe ratio is the average return earned in excess of the risk-free rate per unit of volatility or total risk. Subtracting the risk-free rate from the mean return, the performance associated with risk-taking activities can be isolated. One intuition of this calculation is that a portfolio engaging in “zero risk” investment, such as the purchase of U.S. Treasury bills (for which the expected return is the risk-free rate), has a Sharpe ratio of exactly zero. Generally, the greater the value of the Sharpe ratio, the more attractive the risk-adjusted return.
Read more: Sharpe Ratio http://www.investopedia.com/terms/s/sharperatio.asp#ixzz4t6Rh7t00 

Blue skies!!

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. jebus89 • 09/19/2017 #

    Maybe a stupid question but im getting syntax error, the following variable is undefined: Periodo. How to fix this?

    • JanWd • 09/19/2017 #

      add it as a default variable, to be found on top if you make the indicator
      Kind regards, Jan

  2. guillermus69 • 09/19/2017 #

    is not better to change this “a=log(close/close[1])” into this ? a= ((close / close [1]) -1 ) *100 ?? to get the daily % changes ??

  3. JanWd • 09/19/2017 #

    Dear Gabri,

    could you explain why you have used “RitMensNoRiskTitle” ?
    In the formula [ sharpe=(b-RitMensNoRiskTitle/100)/(s*s) ] it does nothing as far as I can see ( return RitMensNoRiskTitle always give always a zero value)

    Thanks in advance for your information.
    Kind regards, Jan

  4. gabri • 09/19/2017 #

    JanWD,
    in the original sharpe formula (made for portfolios) this is the return for a no-risk investment (they used to put the value of a ten years bond return). This days you can use also the return of a bond or you can use 0 to make the formula disconnected from it.

  5. christophe11560 • 09/19/2017 #

    salut gabri,
    Je n’ai pas de commentaire sur “s*s”, c’est ton choix personnel.
    Je me posais la question sur “sqrt(254)”. En principe, le code devrait être sqrt(periodo) puisque tu somme les rendements sur périodo.
    Pourrais tu m’expliquer l’utilité de cette modification du principe de calcul sharpe original?

    bien à toi

    • gabri • 09/19/2017 #

      Hi, the SQRT(254) it is used to annualize the value. In terms of the “s*s” I just used the standard formula you can find anywhere (also here https://www.google.com/search?q=sharpe+ratio+formula&oq=sharpe+ratio+formula&aqs=chrome..69i57j0i512l8j0i390.6865j0j7&sourceid=chrome&ie=UTF-8). In my formula the expected return ( E[Rb – Ra]) is just computed using the past return in a specific period of time (past return computed using daily value, hence the need to multiply by SQRT(254). I hope this answer your question

  6. christophe11560 • 09/19/2017 #

    Merci pour ton retour

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
jacquesgermain sì da aggiungere
Maik2404 auf welchen Wert muss ich die Kompresionsperiode stellen?
jacquesgermain — Période de compression : ce paramètre détermine la période de rétrospection utilisée pour ...
AndPar Buongiorno Nicolas, vorrei provare questo indicatore, ma quando lo inserisco in PRT mi vengo...
Nicolas Basta aggiungerlo al prezzo https://www.prorealcode.com/blog/video-tutorials/how-to-add-an-i...
Aragorna hello Nicolas, this indicator works with the last Beta version of PRT? Ive seen tha many in...
SnorreDK Works extremely well - How? How do u implement this in a startegy? Breakoutstrategy?
Keyeming Thanks, but yes same question as above, some explanations on how to read it would be appreci...
Bateson Bonjour. Merci beaucoup ! J'ai installé l'indicateur sur PRT 11 mais pour des raisons qui ...
CederTrader Hi Denis, does this indicator add to the chart as panel, or on the candles. Thanks
Nicolas Add it on the price chart as described in this video: https://www.prorealcode.com/blog/video...
Denis Hello Nicolas and Ceder Trader, Sorry, I only just saw your replies. The indicator is alre...
Seabiscuit Hi! I like this indicator a lot, been using it on a 30 min timeframe and usually confirms my...
Ramahu Bonjour et merci pour cet indicateur ! je l'observe sur les actions du Nasdaq et la plupart ...
Nicolas Il doit s'agir d'un mauvais copier/coller. Je suggère de télécharger le fichier itf contenu ...
Bard Hello @Nicolas, I can get this to display in a separate indicator panel but not on Price as ...
Stenozar Hi @Nicolas, how can I put the bands on price? Thanks, Stefano
Fabian Hi IV Mcm, have you drawn the rectangles (Dinamic, Range) by yourself in the chart or are...
IV Mcm Myself to illustrate ;)
oraclus Bonjour indicateur très intéressant existe t il un screener qui détecte les actions qui donn...
IV Mcm Ce n'est pas le but de cet indicateur, mais avec un peu d'entraînement vous pourriez le code...
Yantra Thank you for sharing your good work!
luxrun sorry, add prt code add doesn't work
robertogozzi Don't worry about PRT code, I can't make it work either! Great for pointing that out, it's ...
Khaled @Luxrun, good morning, you mentionned "y = exponentialaverage (x)", isn't the period of the ...
luxrun One question, Roberto: the two AvgT are variable, could you explain to me what they regulate...
robertogozzi AvgT stands for Average Type, it's a parameter for the AVERAGE keyword (https://www.prorealc...
robertogozzi Yes, you can use any setting that suits you best! As to which one... it depends on the inst...
DaxRider grazie Robnerto
Nicolas remplacer les valeurs de coloured(0,255,0) par coloured(r,g,b) et ajouter ces noms de variab...
mohamed merci Nicolas!
sacram14 Merci Nicolas pour ce set-up que je ne connaissais pas ! J'ai tenté de reprendre le code pou...
Vonasi Sure that is possible. I will code it and make a post in the English ProBuilder forum and pu...
Vonasi Vama v2 with Hull moving average included can be found here: https://www.prorealcode.com/top...
JMat45 Thank you, Vonasi.
Bard Very interesting approach Vonasi! I'm getting a 404 error when trying to download though?
Vonasi I just tested and I was able to download with no error.
Psari Hi Vonasi, I am a newbie and was wondering whether you could possibly help me with this pro...
Bard I've also just noticed that changing the "Bands Deviation" setting from 1.25 to eg 3 doesn't...
bartekz Hi @Nicolas, Really impressed by your work. I am trying to replicate the Wave-PM indicator t...
Nicolas You don't have to replicate it, download the file and import it into your platform.
juanj
5 years ago
juanj I have actually completely redesigned this indicator with loads of improvements, so will res...
Bard Problems with Safari latest s/ware and this site and links and adding code. Let me add the...
grimweasel47 Ok thanks Nicolas - could this be adapted to take into account MFI and then have price, volu...
Nicolas I don't understand what you mean exactly, would be better to open a topic about this idea wi...

Top