Daily Factor Indicator [CC]The Daily Factor Indicator was created by Andrea Unger (Stocks and Commodities Jun 2023 pgs 26-31), and this is a new volatility indicator that compares the body, which is the absolute difference between the previous open and previous close, and the range which is the difference between the previous high and previous low. The indicator is calculated by dividing the body and range to determine the volatility for the previous bar. This indicator will range between 0 and 1. Values closer to 1 mean very high volatility, and values closer to 0 mean very low volatility. I have introduced a simple moving average strategy to decide buy or sell signals and colors. Darker colors mean the indicator is above the threshold level, and lighter colors mean the indicator is below the threshold level. Colors are shades of green when the price is above the moving average and shades of red when the price is below the moving average. Feel free to try out your own threshold level and general buy and sell signals.
Let me know if there are any other indicators you would like me to publish!
Volatilitytrade
Squeeze Momentum Strategy [LazyBear] Buy Sell TP SL Alerts-Modified version of Squeeze Momentum Indicator by @LazyBear.
-Converted to version 5,
-Taken inspiration from @KivancOzbilgic for its buy sell calculations,
-Used @Bunghole strategy template with Take Profit, Stop Loss and Enable/Disable Toggles
-Added Custom Date Backtesting Module
------------------------------------------------------------------------------------------------------------------------
All credit goes to above
Problem with original version:
The original Squeeze Momentum Strategy did not have buy sell signals and there was alot of confusion as to when to enter and exit.
There was no proper strategy that would allow backtesting on which further analysis could be carried out.
There are 3 aspects this strategy:
1 ) Strategy Logic (easily toggleable from the dropdown menu from strategy settings)
- LazyBear (I have made this simple by using Kivanc technique of Momentums Moving Average Crossover, BUY when MA cross above signal line, SELL when crossdown signal line)
- Zero Crossover Line (BUY signal when crossover zero line, and SELL crossdown zero line)
2) Long Short TP and SL
- In strategies there is usually only 1 SL and 1 TP, and it is assumed that if a 2% SL giving a good profit %, then it would be best for both long and short. However this is not the case for many. Many markets/pairs, go down with much more speed then they go up with. Hence once we have a profitable backtesting setting, then we should start optimizing Long and Short SL's seperately. Once that is done, we should start optimizing for Long and Short TP's separately, starting with Longs first in both cases.
3) Enable and Disable Toggles of Long and Short Trades
- Many markets dont allow short trades, or are not suitable for short trades. In this case it would be much more feasible to disable "Short" Trading and see results of Long Only as a built in graphic view of backtestor provides a more easy to understand data feed as compared to the performance summary in which you have to review long and short profitability separately.
4) Custom Data Backtesting
- One of most crucial aspects while optimizing for backtesting is to check a strategies performance on uptrends, downtrend and sideways markets seperately as to understand the weak points of strategy.
- Once you enable custom date backtesting, you will see lines on the chart which can be dragged left right based on where you want to start and end the backtesting from and to.
Note:
- Not a financial advise
- Open to feedback, questions, improvements, errors etc.
- More info on how the squeeze momentum works visit LazyBear indicator link:
Happy Trading!
Cheers
M Tahreem Alam @mtahreemalam
Volatility Risk Premium (VRP) 1.0ENGLISH
This indicator (V-R-P) calculates the (one month) Volatility Risk Premium for S&P500 and Nasdaq-100.
V-R-P is the premium hedgers pay for over Realized Volatility for S&P500 and Nasdaq-100 index options.
The premium stems from hedgers paying to insure their portfolios, and manifests itself in the differential between the price at which options are sold (Implied Volatility) and the volatility the S&P500 and Nasdaq-100 ultimately realize (Realized Volatility).
I am using 30-day Implied Volatility (IV) and 21-day Realized Volatility (HV) as the basis for my calculation, as one month of IV is based on 30 calendaristic days and one month of HV is based on 21 trading days.
At first, the indicator appears blank and a label instructs you to choose which index you want the V-R-P to plot on the chart. Use the indicator settings (the sprocket) to choose one of the indices (or both).
Together with the V-R-P line, the indicator will show its one year moving average within a range of +/- 15% (which you can change) for benchmarking purposes. We should consider this range the “normalized” V-R-P for the actual period.
The Zero Line is also marked on the indicator.
Interpretation
When V-R-P is within the “normalized” range, … well... volatility and uncertainty, as it’s seen by the option market, is “normal”. We have a “premium” of volatility which should be considered normal.
When V-R-P is above the “normalized” range, the volatility premium is high. This means that investors are willing to pay more for options because they see an increasing uncertainty in markets.
When V-R-P is below the “normalized” range but positive (above the Zero line), the premium investors are willing to pay for risk is low, meaning they see decreasing uncertainty and risks in the market, but not by much.
When V-R-P is negative (below the Zero line), we have COMPLACENCY. This means investors see upcoming risk as being lower than what happened in the market in the recent past (within the last 30 days).
CONCEPTS:
Volatility Risk Premium
The volatility risk premium (V-R-P) is the notion that implied volatility (IV) tends to be higher than realized volatility (HV) as market participants tend to overestimate the likelihood of a significant market crash.
This overestimation may account for an increase in demand for options as protection against an equity portfolio. Basically, this heightened perception of risk may lead to a higher willingness to pay for these options to hedge a portfolio.
In other words, investors are willing to pay a premium for options to have protection against significant market crashes even if statistically the probability of these crashes is lesser or even negligible.
Therefore, the tendency of implied volatility is to be higher than realized volatility, thus V-R-P being positive.
Realized/Historical Volatility
Historical Volatility (HV) is the statistical measure of the dispersion of returns for an index over a given period of time.
Historical volatility is a well-known concept in finance, but there is confusion in how exactly it is calculated. Different sources may use slightly different historical volatility formulas.
For calculating Historical Volatility I am using the most common approach: annualized standard deviation of logarithmic returns, based on daily closing prices.
Implied Volatility
Implied Volatility (IV) is the market's forecast of a likely movement in the price of the index and it is expressed annualized, using percentages and standard deviations over a specified time horizon (usually 30 days).
IV is used to price options contracts where high implied volatility results in options with higher premiums and vice versa. Also, options supply and demand and time value are major determining factors for calculating Implied Volatility.
Implied Volatility usually increases in bearish markets and decreases when the market is bullish.
For determining S&P500 and Nasdaq-100 implied volatility I used their volatility indices: VIX and VXN (30-day IV) provided by CBOE.
Warning
Please be aware that because CBOE doesn’t provide real-time data in Tradingview, my V-R-P calculation is also delayed, so you shouldn’t use it in the first 15 minutes after the opening.
This indicator is calibrated for a daily time frame.
ESPAŇOL
Este indicador (V-R-P) calcula la Prima de Riesgo de Volatilidad (de un mes) para S&P500 y Nasdaq-100.
V-R-P es la prima que pagan los hedgers sobre la Volatilidad Realizada para las opciones de los índices S&P500 y Nasdaq-100.
La prima proviene de los hedgers que pagan para asegurar sus carteras y se manifiesta en el diferencial entre el precio al que se venden las opciones (Volatilidad Implícita) y la volatilidad que finalmente se realiza en el S&P500 y el Nasdaq-100 (Volatilidad Realizada).
Estoy utilizando la Volatilidad Implícita (IV) de 30 días y la Volatilidad Realizada (HV) de 21 días como base para mi cálculo, ya que un mes de IV se basa en 30 días calendario y un mes de HV se basa en 21 días de negociación.
Al principio, el indicador aparece en blanco y una etiqueta le indica que elija qué índice desea que el V-R-P represente en el gráfico. Use la configuración del indicador (la rueda dentada) para elegir uno de los índices (o ambos).
Junto con la línea V-R-P, el indicador mostrará su promedio móvil de un año dentro de un rango de +/- 15% (que puede cambiar) con fines de evaluación comparativa. Deberíamos considerar este rango como el V-R-P "normalizado" para el período real.
La línea Cero también está marcada en el indicador.
Interpretación
Cuando el V-R-P está dentro del rango "normalizado",... bueno... la volatilidad y la incertidumbre, como las ve el mercado de opciones, es "normal". Tenemos una “prima” de volatilidad que debería considerarse normal.
Cuando V-R-P está por encima del rango "normalizado", la prima de volatilidad es alta. Esto significa que los inversores están dispuestos a pagar más por las opciones porque ven una creciente incertidumbre en los mercados.
Cuando el V-R-P está por debajo del rango "normalizado" pero es positivo (por encima de la línea Cero), la prima que los inversores están dispuestos a pagar por el riesgo es baja, lo que significa que ven una disminución, pero no pronunciada, de la incertidumbre y los riesgos en el mercado.
Cuando V-R-P es negativo (por debajo de la línea Cero), tenemos COMPLACENCIA. Esto significa que los inversores ven el riesgo próximo como menor que lo que sucedió en el mercado en el pasado reciente (en los últimos 30 días).
CONCEPTOS:
Prima de Riesgo de Volatilidad
La Prima de Riesgo de Volatilidad (V-R-P) es la noción de que la Volatilidad Implícita (IV) tiende a ser más alta que la Volatilidad Realizada (HV) ya que los participantes del mercado tienden a sobrestimar la probabilidad de una caída significativa del mercado.
Esta sobreestimación puede explicar un aumento en la demanda de opciones como protección contra una cartera de acciones. Básicamente, esta mayor percepción de riesgo puede conducir a una mayor disposición a pagar por estas opciones para cubrir una cartera.
En otras palabras, los inversores están dispuestos a pagar una prima por las opciones para tener protección contra caídas significativas del mercado, incluso si estadísticamente la probabilidad de estas caídas es menor o insignificante.
Por lo tanto, la tendencia de la Volatilidad Implícita es de ser mayor que la Volatilidad Realizada, por lo cual el V-R-P es positivo.
Volatilidad Realizada/Histórica
La Volatilidad Histórica (HV) es la medida estadística de la dispersión de los rendimientos de un índice durante un período de tiempo determinado.
La Volatilidad Histórica es un concepto bien conocido en finanzas, pero existe confusión sobre cómo se calcula exactamente. Varias fuentes pueden usar fórmulas de Volatilidad Histórica ligeramente diferentes.
Para calcular la Volatilidad Histórica, utilicé el enfoque más común: desviación estándar anualizada de rendimientos logarítmicos, basada en los precios de cierre diarios.
Volatilidad Implícita
La Volatilidad Implícita (IV) es la previsión del mercado de un posible movimiento en el precio del índice y se expresa anualizada, utilizando porcentajes y desviaciones estándar en un horizonte de tiempo específico (generalmente 30 días).
IV se utiliza para cotizar contratos de opciones donde la alta Volatilidad Implícita da como resultado opciones con primas más altas y viceversa. Además, la oferta y la demanda de opciones y el valor temporal son factores determinantes importantes para calcular la Volatilidad Implícita.
La Volatilidad Implícita generalmente aumenta en los mercados bajistas y disminuye cuando el mercado es alcista.
Para determinar la Volatilidad Implícita de S&P500 y Nasdaq-100 utilicé sus índices de volatilidad: VIX y VXN (30 días IV) proporcionados por CBOE.
Precaución
Tenga en cuenta que debido a que CBOE no proporciona datos en tiempo real en Tradingview, mi cálculo de V-R-P también se retrasa, y por este motivo no se recomienda usar en los primeros 15 minutos desde la apertura.
Este indicador está calibrado para un marco de tiempo diario.
Ehlers AM Detector [CC]The AM Detector was created by John Ehlers (Stocks and Commodities May 2021 pg 14) and this is his first volatility indicator I believe. Since this is a more informational indicator rather than a buy or sell signal generator, I have included buy and sell signals for a simple moving average but feel free to use this in combo with any other system you use. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like to see me publish!
IFR2The IFR2 strategy is based on the RSI indicator.
If the two period RSI is less than the overbought level (25 is the default, but you can configure it to be lower), a long position is placed at the close of the candle. If you are doing it live, you'd have to enter the market ~ 10 minutes before it closes, check the RSI, and buy if it is lower than your overbought level. This generates a discrepancy in the backtesting, but since it is a very small difference, it can be disregarded. Higher overbought levels generate more signals, but they mostly are unreliable. Lower values generates better yields, but they won't occur very often. This strategy is designed to be used in a daily graph, and I don't recommend using it in intraday periods, since you'll make too little money to compensate for the operational cost.
The strategy exits when the high price of two previous candles is reached. If the exit price is higher than the closing price of when you entered, you'll be at a profit, otherwise you'll be at a loss. The exit price is plotted in the graph and it's colors depends on the current open profit: positive values will be green, negative will be red.
This strategy completely disregards the current trend. Long orders will be placed even if you are at a strong down trend. This may seem odd, but you have to keep in mind that this is a volatility based strategy , not a trend following one.
This setup was designed by Alexandre Wolwacz, a.k.a. Stormer.
Volatility BandsWe used Marc Chaikin’s Chaikin Volatility as somewhat of a baseline for this indicator and then built on it. Like Chaikin Volatility, our indicator draws primarily upon high-low spreads to quantify a security’s volatility. It also has similarities to Keltner Channels as it uses ATR rather than standard deviations in its calculation of the different bands.
Inputs:
int ‘len0’, lookback window for fast EMA of high-low ranges.
int ‘len1’, lookback window for slow EMA of high-low ranges.
int ‘len2’, lookback window for slow EMA of closing prices.
float ‘m0’, ATR multiplier for first upper and lower volatility bands.
float ‘m1’, ATR multiplier for second upper and lower volatility bands.
float ‘m2’, ATR multiplier for third upper and lower volatility bands.
int ‘lenATR’, window length for ATR calculation.
Output: 3 Upper and Lower Volatility Bands (6 total).
1. Compute High Low Spread for current period.
hlr = (high – low)
2. Calculate Exponential Moving Average of HLR at length len0
fastEMA = ema(hlr, len0)
3. Calculate Exponential Moving average of HLR at length len1 (where len1 > len0)
slowEMA = ema(hlr, len1)
4. Get EMA of closing prices at length len2(where len2 > len1 and len1 > len0)
priceEMA = ema(close, len2)
5. Use adjusted Chaikin Volatility Formula to quantify volatility
v = (fastEMA – slowEMA) / slowEMA
6. Calculate three upper and three lower volatility bands (6 total):
ex:
upper0 = priceEMA + ((1 – cv) * (atrMult0 * atr(lenATR)))
lower0 = priceEMA – ((1 – cv) * (atrMult0 * atr(lenATR)))
One possible way to use this indicator is to enter a long position when the security’s price falls below the lowest volatility band and then exit when it crosses above the third upper band. This seems to get the best results for quick, high frequency trading. Another approach is to enter a position when the bands begin to break out from a compact state and the width between them increases.
Still tweaking the idea, so any feedback would be appreciated.
Specter Alpha-Omega Volatility Index™Meet the Alpha-Omega Volatility custom indicator by Specter
This premium volatility indicator uses a series of models to compare historical volatility, and by using a series of noise reduction techniques, it only gives you the very best signals. This indicator shows you aggressive reversals, which are often the most profitable.
The customization options already come with pre-sets, and it's as simple as one click. It comes with Aggressive, Moderate, Conservative and Ultra Conservative behaviors filters.
Also, it offers an interest zone indicator so you can start paying attention to the chart before it happens when trading extra volatile stocks timing is crucial and you want to be ready before the action begins.
The way you use it is pretty simple, you look for divergences. When you have a bullish movement, and you see high negative volatility appearing in the Alpha-Omega indicator, it means a strong reversal/spike is coming. The same goes for bearish reversals, just the opposite logic. You also get an extra layer of confirmation which is the Alpha/Omega characters; they only appear with the most robust volatility prediction. It's up to your trading strategy to decide how conservative you are and which signals you will follow.
It works on any market/security/asset/timeframe.
Ready to ride some spikes?
Normalized Average True RangeThis indicator was originally developed by John Forman (Stocks & Commodities, V.24:6 (May, 2006): "Cross-Market Evaluations With Normalized Average True Range").
Mr. Forman uses a normalized average true range indicator to analyze tradables across markets.
Good luck!