Position sizing based on Yhang-Zhan variation of Garman-Klass volatility

Position sizing based on Yhang-Zhan variation of Garman-Klass volatility

This code has to be used in conjunction with a screener, that I will post soon, in order to build a weighted portfolio based on volatility and momentum. You can choose to use the EWMA (Exponential Weighted Moving Average) or the most sophisticated Yang-Zhang variation of the Garman-Klass volatility to build your positioning. Just multiply the number the graph is showing for the basic import you are normally investing. Let’s say for example that you normally invest 1000 Euros per trade per stock and the code gives you the number 9 for stock A and 5 for stock B. You would want to buy 9000 stocks A and 5000 stocks B (or a different number but always weighted 9 to 5).

This positioning works excellent in portfolios with 20-30 stocks minimum.

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. Abz • 09/13/2017 #

    Hello,

    could you explain a little bit more about this , what numbers are you refering to 9 and 5 ? i have added the screener that works with this is the 9 – 5 the sharp index you are refering to?

  2. gabri • 09/13/2017 #

    ABZ,
    the 9 and 5 I was referring to are JUST EXAMPLES. You need to use this indicator when building portfolios in order to give a weight-based-on-volatility positioning to every stock.

    Let’s use another example. Let’s use ENEL, ENI,FCA as an example with yesterday close – 16th Sept 2017. We find that the YZidx (Yhang Zhan Index) for these titles are respectively 40.139 for ENEL, 65.129 for ENI and 6.10 for FCA. That means that you will have to buy more ENI than FCA. You can do that in a few ways. You can multiply these index for a minimum value – say 1000 Euros – and get 40.139×1000=40139 Euros of Enel, 65.129×1000=65129 Euros of ENI and 6.10×1000=6100 Euros of FCA.
    Or you can build the folio with [40.139/(40.139+65.129+6.10)]*100=36% stocks of ENEL, [65.129/(40.139+65.129+6.10)]*100=58,5% of ENI’s stocks and with [6.1/(40.139+65.129+6.10)]*100=5.5% of FCA’s stocks.

    • Abz • 09/13/2017 #

      Thanks gabri

  3. Mattzi • 09/13/2017 #

    In your opinion is less than 20 stocks a bad idea? Thank you.

  4. gabri • 09/13/2017 #

    No, you can pick as many or as little as you want. The portfolio composition depends on many factors. I like to use more portfolios with a number of titles varying from 20 to 50 (it depends on the period)

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar
Related users ' posts
Nicolas Rien, il faut l'appliquer sur la charte. Soit le mettre sur le graphique du prix, à l'aide d...
signorini Merci pour votre réponse. Je l'applique sur la charte, j'utilise la petite clé pour effacer ...
signorini Je vous remercie, Nicolas. C'est fixé. Très bon week-end.
Abz  hi , you need to add the indicator from the "price" menu in chart
Francesco Thank you Abz!
phanz Hi Nicolas, this is an interesting strategy. For long position, I assume entry when prices ...
Pelle Nævestad Thanks Nicolas, this is a keeper!
Chicane23 Hi, when uploaded the WAE isnt showing histogram; only line. Is there a way to modify?
Nicolas Change the way the lines are displayed in the indicator settings window : histogram, lines, ...
Dimi.A Perfect for counter-trend scalping. I like this!
viktorthuns Hi Nicolas! Great work you've done with all your indicators. Just wondering about the code a...
Nicolas the value is not a boolean but an average of an addition of booleans. As stated in the descr...
r.angel It seems that the formula needs a SQRT (that is Vyangzhang = SQRT(...))
RickTrader I think to have annualized view of this historical volatility you will need : Vyangzhang =...
Sofitech Bonjour. J'aimerais savoir s'il est possible de "truquer" un peu l'indicateur pour qu'il don...
Maz I actually like this very simple idea. It can also be useful for market micro-structure syst...
Nicolas Thanks Maz, I'll have a look tomorrow.

Top