Historical IV Calculation

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #79856 quote
    deletedaccount14122020deletedaccount14122020
    Participant
    New

    Hello,

    I am trying to write an Indicator which will give a Historical IV Rank to a particular stock. The calculation is:

    100 x (the current Historical IV level – the 52 week Historical IV low) / (the 52 week Historical IV high – 52 week Historical IV low) = IV Rank

    I have tried the attached but I think that the terms “highest” and “lowest” only work with price. Does anyone know if my calculation can be performed by PRT

    Many thanks

    indicator1 = HistoricVolatility
    indicator2 = highest [365] HistoricVolatility
    indicator3 = lowest[365]HistoricVolatility
    
    c3 = indicator1 - indicator3
    c4 = indicator2 - indicator3
    c5 = c3 / c4
    c6 = c5 * 100
    
    Return c6 AS "IV Rank"
    
    //HOW IS IV RANK CALCULATED?
    //The formula for IV rank is simple, really. It is:
    //100 x (the current IV level - the 52 week IV low) / (the 52 week IV high - 52 week IV low) = IV Rank
    #79858 quote
    NicolasNicolas
    Keymaster
    Legend

    This is just the stochastic of the historical volatility or a normalization of its value over the last 365 periods.

    Highest and lowest instructions are working perfectly for any data serie, even if it is not price! 🙂

    indi= HistoricVolatility
    hh = highest [365](indi)
    ll = lowest[365](indi)
    
    result = 100*((indi-ll)/(hh-ll))
    
    return result
    stochastic-of-historical-volatility.png stochastic-of-historical-volatility.png
    #79861 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Topic moved from proscreener forum (dedicated to screeners) to probuider forum (dedicated to indicators)

    Nicolas thanked this post
    #79864 quote
    deletedaccount14122020deletedaccount14122020
    Participant
    New

    Nicolas,

    Many thanks for your quick reply. All working now

    Noobywan Sorry about that

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Historical IV Calculation


ProBuilder: Indicators & Custom Tools

New Reply
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by deletedaccount14122020deletedaccount14122020
8 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 09/06/2018
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...