TradingView
xel_arjona
30 Apr 2020 pukul 19.53

Realized Volatility IIR Filters with Bands 

US Russ 2000OANDA

Deskripsi

DISCLAIMER:

The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.

The following indicator was made for NON LUCRATIVE ACTIVITIES and must remain as is following TradingView's regulations. Use of indicator and their code are published by Invitation Only for work and knowledge sharing. All access granted over it, their use, copy or re-use should mention authorship(s) and origin(s).


WARNING NOTICE!

THE INCLUDED FUNCTION MUST BE CONSIDERED AS TESTING. The models included in the indicator have been taken from open sources on the web and some of them has been modified by the author, problems could occur at diverse data sceneries.

WHAT'S THIS...?

Work derived by previous own research for study:

This is mainly an
, it's purpose is to catch trend given by the nature of lag given by a VOLATILITY ESTIMATION ALGORITHM as it's coefficient. It provides as well an INFINITE IMPULSE RESPONSE DEVIATION FILTER that uses the same coefficients of the main filter to plot deviation bands as an auxiliary tool.

The given Filter based indicator provides my own Multi Volatility-Estimators Function with only 3 models:
  • ELASTIC VOLUME WEIGHTED VOLATILITY: This is a Modified Daigler & Padungsaksawasdi "Volume Weighted Volatility" as on DOI: 10.1504/IJBAAF.2018.089423 but with Elastic Volume Weighted Moving Average instead of VWAP (intraday) for faster (but inaccurate) calculation. A future version is planned on the way using intra-bar inspection for intraday timeframe as described in original paper.

  • GARMAN & KLASS / YANG-ZANG EXTENSION: As one of the best range based (OHLC) with open gaps inclusion in a single bar.

  • PETER MARTIN'S ULCER INDEX: This is a better approach to measure realized volatility than standard deviation of log returns given it's proven convex risk metric for DrawDowns as shown in Chekhlov et al. (2005). Regarding this particular model, I take a different approach to use it as coefficient feed: Given that the UI only takes in consideration DrawDawns, I code myself the inverse of this to compute Draw-Ups as well and use both of them to filter minimums volatility levels in order to create a SLOW version of the IIR filter, and maximums of both to calculate as FAST variation. This approach can be used as a better proxy instead of any other common moving average given that with NO COMPOUND IN TIME AT ALL (N=1) or only using as long as N=3 bars of compund, the filter can catch a trend easily, making the indicator nearly a NON PARAMETRIC FILTER.




NOTES:

This version DO NOT INCLUDE ALERTS.
This version DO NOT INCLUDE STRATEGY: ALL Feedback welcome.


DERIVED WORK:

Incremental calculation of weighted mean and variance by Tony Finch (fanf2@cam. ac .uk) (dot@dotat.at), 2009.
Volume weighted volatility: empirical evidence for a new realised volatility measure by Chaiyuth Padungsaksawasdi & Robert T. Daigler, 2018.
Basic DSP Tips & Trics by TradingView user @alexgrover


CHEERS!

@xel_arjona 2020.
Komentar
Vallor
Great work keep it coming
xel_arjona
@SavedByTheBellBrent, Thank you!
emrekurttekin
Sadece beyaz çizgiyi kullanıyorum. Sade iş ve temiz sonuç alıyorum. Kafam rahat artık.
himanshudas1997
How to get the Elastic volume weighted drawup drawdown indictor as shown as volume indicator??
tylerwitucki
TradingView has this hidden? This indicator isn't showing up in the indicators & strategies section. Your other indicators are though.
alexgrover
Wow, that's a nice script :D Well done
xel_arjona
@alexgrover, Thank you very much @alexgrover, your posts feed me a lot for my own understandings in filtering and volatility which is my passion this days. It's quite interesting that most instruments (symbols) react quite well for the volatility coefficients as lag means. If volatility persist greater than 10% (at N=1 -no time compound for volatility for a given timeframe-), the IIR will react as the measured array (using close as the last price in time). The beauty of the "Ulcer" or Peter Martin's model is that we could have 2 measures of direction (DrawDown or DrawUp) then use them as a low-band pass measuring only minimums instead of maximums, with this you could have a Slow (laggy) version of the same reading and use them as crossover signals between both without mess with "random parametrization". Feel free to play with them! Other interesting fact that I perceived is that using no time compound at all (N = 1) most of this filters follows quite well the so much used 200 day arithmetic MA, this leads me to start research why this parameter in an Arithmetic MA is not so picked random or used as a consensus, but indeed follows a -random walk- kind of order. Cheers!
sudhir.mehta
Thanks for sharing, it is Great!!!!!! After a long time saw your Great work!!!!
xel_arjona
@sudhir.mehta, Thank you very much. It's a pleasure to share ideas.
Lebih lanjut