implied volatility minus realized volatility
03/24/2022 at 12:45 AM #19037103/24/2022 at 4:14 PM #19042503/24/2022 at 5:29 PM #190427
I have coded this indicator, but it seems it’s not the one you are looking for.
If you know how the average and the STD are applied to the result of the division, I could change it:12345678910111213141516171819// Implied Volatility (Vix Fix)pd = 22 //22 LookBack Periodswvf = ((highest[pd](close)-low)/(highest[pd](close)))*100 //Vix Fix//// Realized VolatilityPeriods = 10IF BarIndex > 0 THENR = Log(close) - Log(close) //or Log(close / close)VolReal = Sqrt(summation[Periods](Square(R))) * 100ENDIF//AvgP = 20 //average PeriodsStdP = 10 //STD periodsMyVol = wvf / VolReal//// Standard Deviation on averageAvg = average[AvgP,0](MyVol)AvgSTD = STD[StdP](Avg)RETURN AvgSTD AS "STD of Implied Vol / Realized Vol"03/24/2022 at 10:42 PM #190441
really really appreciate your help roberto!! 😀
I think the indicator is made frome this: http://www.diva-portal.org/smash/get/diva2:697293/FULLTEXT01
If you go to the end of the document there are alot of calculations.
There seems to be a pretty big edge
Results should look something like this when adding it to sp500/omxs30 chart03/24/2022 at 10:45 PM #190443
i also found this when googled for volatility ratio calculations:
How is Volatility Ratio Calculated?
One of the most commonly used methods for calculating volatility is the standard deviation. However, calculations of volatility and volatility ratiox may vary across the industry. In his book, “Technical Analysis,” Jack Schwager introduced the concept of volatility ratio. Another common method of identifying rice ranges and patterns that can lead to trading signals is plotting historical volatility.
1. The formula by Jack Schwager is as follows:
VR = TTR/ATR
Here, VR stands for Volatility Ratio.
TTR stands for Today’s True Range, which is calculated by subtracting the maximum price from the minimum price. The maximum price is the highest price of the current trading day minus the closing price of the previous trading day. The minimum price is the lowest price of the current trading day minus the closing price of the previous trading day.03/25/2022 at 6:22 PM #190499
Yes, you can find a version at https://www.prorealcode.com/prorealtime-indicators/volatility-ratio-schwager/.03/26/2022 at 8:24 PM #190530
Yes, you can find a version at https://www.prorealcode.com/prorealtime-indicators/volatility-ratio-schwager/.
is it possible to have it shown as a deviation -4 to 4 from std/average? like the original picture i showed? 😀03/28/2022 at 11:00 AM #19063903/28/2022 at 11:00 AM #19064003/28/2022 at 11:00 AM #19064203/28/2022 at 11:01 AM #19064303/29/2022 at 10:45 PM #19076103/31/2022 at 11:41 PM #19088804/05/2022 at 10:29 PM #191286
i found this code nicolas posted in an indicator. Is it possible to combine this code to the one you created for me to have it shown similar to my original post?
link to nicolas indicator: https://www.prorealcode.com/prorealtime-indicators/z-score-distance-from-vwap/z-score123456789101112131415161718192021222324252627282930313233//PRC_VWAP Z-score//08.01.2019//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge// --- settingsSDminPeriod = 100 //minimal period to compute the Standard DeviationsmoothZscore = 0 //smooth the curve? (0=false ; 1=true)// --- end of settingsd = max(2,intradaybarindex)//max(1, intradaybarindex)if intradaybarindex=0 thenvwap = (volume*customclose)/(volume)elseVWAP = SUMMATION[d](volume*customclose)/SUMMATION[d](volume)endifsd = SUMMATION[max(SDminPeriod,d)](max(abs(high-vwap),abs(vwap-low)))/max(SDminPeriod,d)if smoothZscore thenzscore=average((close-vwap)/sd)elsezscore = (close-vwap)/sdendifif zscore>=2 thendrawcandle(2,2.5,2,2.5) coloured(255,0,0,100) bordercolor(0,0,0,0)endifif zscore<=-2 thendrawcandle(-2,-2.5,-2,-2.5) coloured(0,255,0,100) bordercolor(0,0,0,0)endifRETURN zscore style(line,2), 1 coloured(168,168,168) style(line,2), 2 coloured(210,210,210) style(line,2), -1 coloured(168,168,168) style(line,2), -2 coloured(210,210,210) style(line,2), 0 coloured(168,168,168) style(dottedline)04/08/2022 at 3:11 PM #191436