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.
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!