Kahler’s Fair Bet Historical Volatility Indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #112321 quote
    Bard
    Participant
    Master

    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 low

    Meta: 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.

    Kahlers-fair-bet-volatility-Philipp-Kahler1.png Kahlers-fair-bet-volatility-Philipp-Kahler1.png
    #112389 quote
    Nicolas
    Keymaster
    Master

    Here is the translated code for this volatility indicator (KVOL) :

    //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 low
    
    multi=1.0
    Datapoints=30
    returnperiod=5
    showresult=0 //(0=percent, 1=absolute)
    show=0 //(0=result,1=rank)
    
    rpsum=0
    rcsum=0
    for i =0 to datapoints-1 do // loop over last bars
    rc=max((close[i]-close[i+returnperiod])/close[i+returnperiod],0) // % return of call
    rp=max((close[i+returnperiod]-close[i])/close[i+returnperiod],0) // % return of put
    rcsum=rcsum+rc // sum of all %returns over time
    rpsum=rpsum+rp
    next
    icall=rcsum/datapoints
    put=rpsum/datapoints
    Kvol=icall+put
    if show=0 then //result 
    if showresult=0 then //percent 
    a=100*Kvol
    else //absolute 
    a=Kvol*close
    endif
    dline=multi*a
    endif
    hh=highest[100](kvol)
    ll=lowest[100](kvol)
    
    if show and (hh-ll)>0 then //rank 
    dline=(100-100*(hh-kvol)/(hh-ll))
    endif
    
    return dline as "KVOL"
    #112562 quote
    Bard
    Participant
    Master

    Thanks for taking the time to code this Nicolas, I think although it does show some early warnings of price rise I think Implied Volatility and it’s relationship to Historic Volatility are a better indication of future volatility.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Kahler’s Fair Bet Historical Volatility Indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Bard @brad Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Bard
6 years, 3 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/07/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...