A Better Implied Volatility Rank and Percentile Indicator
Forums › ProRealTime English forum › ProBuilder support › A Better Implied Volatility Rank and Percentile Indicator
- This topic has 22 replies, 2 voices, and was last updated 5 years ago by Vonasi.
Tagged: implied, implied volatility, percentile, VIX, volatility, wvf
-
-
10/20/2019 at 5:40 PM #11064810/21/2019 at 1:37 PM #110702
Here is the TradingView code from your information overload’ post converted to PRT to give the log version (I was able to convert it by guessing how TradingView code works!) I have scaled it between 0 and 100 rather than the 0 and 1 that the original code uses.
12345678910111213141516//Historical Volatility RankLength = 20annualVol = 365periods = 7// 1 = intraday chart 7 = daily chartPrice = log(close / close[1])sigma = std[length](Price)HVol = (sigma * sqrt(annualVol / periods)) * 100lowVol = lowest[annualvol](HVol)HVrankUp = HVol - lowVolmaxVol = highest[annualvol](HVol)HVrankLow = maxVol - lowVolHVR = (HVrankUp / HVrankLow)*100return HVR coloured(0,0,255)1 user thanked author for this post.
10/21/2019 at 11:14 PM #110764Cheers for coding this HV Indicator @Vonasi. Surprisingly there wasn’t as much difference as I expected between this and the simpler formula here:
https://www.prorealcode.com/topic/historical-iv-calculation/#post-79858I would be able to give more feedback on these indicators that I’ve added to PRT but for the fact that a couple of hours of work on them was lost this weekend because when I logged into PRT this morning the Vix Fix, HV, Implied Volatility Rank and Percentile indicators have disappeared from my indicators list… even indicators I know were definitely saved — because I closed them and re-opened them to add them to a different chart — have gone? This isn’t the first time this has happened! I am re-adding them now and playing around with them.
One thing I couldn’t figure and wondered if you could, is what would be the correct way to write the opposite of the high volatility market bottoms code for the IV? In other words if the Vix Fix for high volatility market bottoms is:
VIX Implied Volatility Substitute Code1WVF = (Highest (Close,22) - Low)/(Highest(Close,22))*100What would be the opposite of this equation to denote low volatility market tops? I tried with replacing the highest with lowest and the low with high but can’ t show screenshots as the indicator vanished, it also wouldn’t highlight the specific bars in green even though I thought I’d mirrored/reversed the code correctly.
Were you able to access the C# code from Ninza that I dropboxed? Ultimately it would be great to have a version of that high and low volatility bar graph indicator and have a percentile rank.
I use this chart, screen attached, which is what I would like to see in PRC arsenal of indicators, it’s from ivolatility via the Options Council website
https://www.optionseducation.org/toolsoptionquotes/historical-and-implied-volatility, it’s a line graph of the HV v’s the IV. Other vendors like Barchart also supply IV 30, IV 60 and IV 90 comparisons.I found Fidelity’s definition of HV: https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/historical-volatility
“An annualized one standard deviation of stock prices that measures how much past stock prices deviated from their average over a period of time.” Formula attached in the screenshot. I’m not sure this is what we have with these two HV codes (the one above and the one at post-79858)?
I’ll stop now in case your brain is getting an “information overload” warning again! 😃
10/21/2019 at 11:16 PM #11076610/21/2019 at 11:36 PM #110770I’ll stop now in case your brain is getting an “information overload” warning again!
Yep – the alarm bells were ringing quite early on in that one!
10/21/2019 at 11:42 PM #110771I think that if you find a specific indicator and can provide the other language code for it then it is best if you just submit a code conversion request for it to Nicolas via the normal route. I personally don’t have the time to read every page that you provide a link to and then try to work out what it is you want from the information on that page and then try to adapt the information I have read to what you want. Sometimes a simple, straightforward request of ‘can someone convert this to PRT’ achieves more than a mass of information overload. Just a polite suggestion 🙂
10/22/2019 at 1:29 PM #110829Yes, no worries and I do appreciate the help! I found the subject was more complicated that I first thought, mainly because I thought the versions of IV and HV posted in PRC were accurate but I’m now unsure that in fact they are (excluding Williams’ Vix Fix as that is how he intended it). I don’t think what’s on this forum approximates to an accurate HV/IV indicator as mentioned above and at the end of my last post. That was what was concerning me and why I posted the HV equation in case anyone with a better understanding could figure out an accurate HV indicator.
What is the normal route, I’ve always gone to the indicator forum and posted there/here?
Re: Providing code, could you not access the C# code for the Ninza indicator and image from dropbox? It is the code that is the Ninza image posted above and which plots the barchart from the centre and shows the high and low volatility. If you could guide me on the opposite of this equation code I posted directly above, to get that low volatility reading, I think I can get it to work (although it wouldn’t highlight in green). It may end up as two separate charts though unless I can figure out how to format the barchart so it shows both negative and positive ranges for high and low volatility respectively. I did attempt it but only got the barchart to show either the high vol or low vol but not both together as per the Ninza image. Probably a simple fix. May I post that double (high vol / low vol) version here?
There was a good reason Black, Scholes and Merton won the Nobel Prize for coming up with their options pricing model that predicted the future probability and pricing of asset prices! Option pricing, historical and implied volatility are crucial in that understanding and I believe it would be a great addition to the get the definitive version up here on the PRC forum.
Cheers
Bard10/22/2019 at 3:13 PM #110845The normal procedure for a free indicator conversion is via this link that can also be found under ‘Help’.
https://www.prorealcode.com/free-code-conversion/
The reason for this is to put all the information in one place, code, indicator description and images so that the person doing the conversion (usually Nicolas) does not have to waste a lot of time working out what they are supposed to be creating.
-
AuthorPosts
Find exclusive trading pro-tools on