PINE LIBRARY
Updated

VolTargeting

224
Library "VolTargeting"

ewmaVol(estimationWdw)
  Calculates an exponentially weighted annualised volatility
  Parameters:
    estimationWdw (simple int): Half life of exponential weighting scheme
  Returns: Exponentially weighted annualised volatility

volTargettedSize(nominalBalance, targetVolContribution, forecastVol)
  Calculates a volatility-targetted position size in number of units
  Parameters:
    nominalBalance (float): Portfolio size on which to calculate volatility targets
    targetVolContribution (float): Amount of volatility to be assigned to this position
    forecastVol (float): Volatility forecast to use in position size calculation as %
  Returns: Position size in units (shares, contracts, etc)
Release Notes
v2

Fixed spelling

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.