Kahler’s Fair Bet Historical Volatility Indicator
Forums › ProRealTime English forum › ProBuilder support › Kahler’s Fair Bet Historical Volatility Indicator
- This topic has 2 replies, 2 voices, and was last updated 5 years ago by Bard.
Tagged: volatility
-
-
11/07/2019 at 1:01 PM #112321
This indicator is an improved variation on historical volatility by quant trader Philipp Kahler. Kahler has used the calculated fair bet price for an options straddle (where you’re long “at the money” Call and Put options) as a starting place for this indicator. It aims to give earlier warning of strong or extreme ongoing market moves along with its ability to not over react to single candlestick events by dampening it’s response. For a full explanation please visit the link below.
https://www.quanttrader.com/index.php/kvol-kahlers-volatility/KahlerPhilipp2018
The chart (below) shows you a comparison between KVOL (blue) and historical volatility (standard deviation). On the chart shown above both calculate the volatility for 10 day returns, using the previous 30 bars as data sample. As you can see historical volatility and KVOL are highly correlated.
But there are some major differences: As an example in the end of 2017/beginning of 2018 KVOL starts to rise as the market is exploding to the upside: This is due to the virtual Call used to calculate KVOL gains value. At the same time historical volatility stays low, as the market has got one direction and no setbacks.
//KVOL – Tradesignal Equilla Code:
//The code to calculate KVOL is simple and straightforward.
//The inputs:
//multi: just a multiplier, like you can display 1 or 2 standard deviations..
//datapoints: The number of bars used to calculate KVOL
//returnperiod: calculate the volatility for 1,2,3… bars
//showresult: show the result as a percentage of the underlying or as an absolute number
//show: show either kvol or the rank of kvol within the last 100 bars. This gives an idea if volatility is high or lowMeta: subchart(true);
Inputs: multi(1.0), Datapoints(30), returnperiod(5), showresult(percent, absolute), show(result,rank);
Variables:Kvol, i, rp,rc, rpsum, rcsum, call, put, hh,ll;
rpsum=0;
rcsum=0; for i =0 to datapoints-1 begin // loop over last bars
rc=maxlist((close[i]-close[i+returnperiod])/close[i+returnperiod],0); // % return of call
rp=maxlist((close[i+returnperiod]-close[i])/close[i+returnperiod],0); // % return of put
rcsum=rcsum+rc; // sum of all %returns over time
rpsum=rpsum+rp;
end;
call=rcsum/datapoints;
put=rpsum/datapoints;
Kvol=call+put;
if show=result then drawline(multi*iff(showresult=percent,100*Kvol,Kvol*close),”KVOL”);
hh=highest(kvol,100);
ll=lowest(kvol,100);
if show=rank and (hh-ll)>0 then drawline(100-100*(hh-kvol)/(hh-ll),”rank”);Cheers.
11/08/2019 at 9:23 AM #112389Here is the translated code for this volatility indicator (KVOL) :
123456789101112131415161718192021222324252627282930313233343536373839404142//KVOL - Tradesignal Equilla Code://The code to calculate KVOL is simple and straightforward.//The inputs://multi: just a multiplier, like you can display 1 or 2 standard deviations..//datapoints: The number of bars used to calculate KVOL//returnperiod: calculate the volatility for 1,2,3… bars//showresult: show the result as a percentage of the underlying or as an absolute number//show: show either kvol or the rank of kvol within the last 100 bars. This gives an idea if volatility is high or lowmulti=1.0Datapoints=30returnperiod=5showresult=0 //(0=percent, 1=absolute)show=0 //(0=result,1=rank)rpsum=0rcsum=0for i =0 to datapoints-1 do // loop over last barsrc=max((close[i]-close[i+returnperiod])/close[i+returnperiod],0) // % return of callrp=max((close[i+returnperiod]-close[i])/close[i+returnperiod],0) // % return of putrcsum=rcsum+rc // sum of all %returns over timerpsum=rpsum+rpnexticall=rcsum/datapointsput=rpsum/datapointsKvol=icall+putif show=0 then //resultif showresult=0 then //percenta=100*Kvolelse //absolutea=Kvol*closeendifdline=multi*aendifhh=highest[100](kvol)ll=lowest[100](kvol)if show and (hh-ll)>0 then //rankdline=(100-100*(hh-kvol)/(hh-ll))endifreturn dline as "KVOL"11/11/2019 at 5:13 PM #112562 -
AuthorPosts
Find exclusive trading pro-tools on