L&S Volatility Index Refurbished█ Introduction
This is my second version of the L&S Volatility Index, hence the name "Refurbished".
The first version can be found at this link:
The reason I released a separate version is because I rewrote the source code from scratch with the aim of both improving the indicator and staying as close as possible to the original concept.
I feel that the first version was somewhat exotic and polluted in relation to the indicator originally described by the authors.
In short, the main idea remains the same, however, the way of presenting the result has been changed, reiterating what was said.
█ CONCEPTS
The L&S Volatility Index measures the volatility of price in relation to a moving average.
The indicator was originally described by Brazilian traders Alexandre Wolwacz (Stormer) and Fábio Figueiredo (Vlad) from L&S Educação Financeira.
Basically, this indicator can be used in two ways:
1. In a mean reversion strategy, when there is an unusual distance from it;
2. In a trend following strategy, when the price is in an acceptable region.
As an indicator of volatility, the greatest utility is shown in first case.
This is because it allows identifying abnormal prices, extremely stretched in relation to an average, including market crashes.
How the calculation is done:
First, the distance of the price from a given average in percentage terms is measured.
Then, the historical average volatility is obtained.
Finally the indicator is calculated through the ratio between the distance and the historical volatility.
According to the description proposed by the creators, when the L&S Volatility Index is above 30 it means that the price is "stretched".
The closer to 100 the more stretched.
When it reaches 0, it means the price is on average.
█ What to look for
Basically, you should look at non-standard prices.
How to identify it?
When the oscillator is outside the Dynamic Zone and/or the Fixed Zone (above 30), it is because the price is stretched.
Nothing on the market is guaranteed.
As with the RSI, it is not because the RSI is overbought or oversold that the price will necessarily go down or up.
It is critical to know when NOT to buy, NOT to sell or NOT to do anything.
It is always important to consider the context.
█ Improvements
The following improvements have been implemented.
It should be noted that these improvements can be disabled, thus using the indicator in the "purest" version, the same as the one conceived by the creators.
Resources:
1. Customization of limits and zones:
2. Customization of the timeframe, which can be different from the current one.
3. Repaint option (prints the indicator in real time even if the bar has not yet closed. This produces more signals).
4. Customization of price inputs. This affects the calculation.
5. Customization of the reference moving average (the moving average used to calculate the price distance).
6. Customization of the historical volatility calculation strategy.
- Accumulated ATR: calculates the historical volatility based on the accumulated ATR.
- Returns: calculates the historical volatility based on the returns of the source.
Both forms of volatility calculation have their specific utilities and applications.
Therefore, it is worthwhile to have both approaches available, and one should not necessarily replace the other.
Each method has its advantages and may be more appropriate in different contexts.
The first approach, using the accumulated ATR, can be useful when you want to take into account the implied volatility of prices over time,
reflecting broader price movements and higher impact events. It can be especially relevant in scenarios where unexpected events can drastically affect prices.
The second approach, using the standard deviation of returns, is more common and traditionally used to measure historical volatility.
It considers the variability of prices relative to their average, providing a more general measure of market volatility.
Therefore, both forms of calculation have their merits and can be useful depending on the context and specific analysis needs.
Having both options available gives users flexibility in choosing the most appropriate volatility measure for the situation at hand.
* When choosing "Accumulated ATR", if the indicator becomes difficult to see, there are 3 possibilities:
a) manually adjust the Fixed Zone value;
b) disable the Fixed Zone and use only the Dynamic Zone;
c) normalize the indicator.
7. Signal line (a moving average of the oscillator).
8. Option to normalize the indicator or not.
9. Colors to facilitate direction interpretation.
Since the L&S is a volatility indicator, it does not show whether the price is rising or falling.
This can sometimes confuse the user.
That said, the idea here is to show certain colors where the price is relative to the average, making it easier to analyze.
10. Alert messages for automations.
Ls_volatility_index
LS Volatility Index█ OVERVIEW
This indicator serves to measure the volatility of the price in relation to the average.
It serves four purposes:
1. Identify abnormal prices, extremely stretched in relation to an average;
2. Identify acceptable prices in the context of the main trend;
3. Identify market crashes;
4. Identify divergences.
█ CONCEPTS
The LS Volatility Index was originally described by Brazilian traders Alexandre Wolwacz (Stormer) , Fabrício Lorenz , and Fábio Figueiredo (Vlad)
Basically, this indicator can be used in two ways:
1. In a mean reversion strategy , when there is an unusual distance from it;
2. In a trend following strategy , when the price is in an acceptable region.
Perhaps the version presented here may have some slight differences, but the core is the same.
The original indicator is presented with a 21-period moving average, but here this value is customizable.
I made some fine tuning available, namely:
1. The possibility of smoothing the indicator;
2. Choose the type of moving average;
3. Customizable period;
4. Possibility to show a moving average of the indicator;
5. Color customization.
█ CALCULATION
First, the distance of the price from a given average in percentage terms is measured.
Then, the historical average volatility is obtained.
Finally the indicator is calculated through the ratio between the distance and the historical volatility.
To facilitate visualization, the result is normalized in a range from 0 to 100.
When it reaches 0, it means the price is on average.
When it hits 100, it means the price is way off average (stretched).
█ HOW TO USE IT
Here are some examples:
1. In a return-to-average strategy
2. In a trend following strategy
3. Identification of crashes and divergences
█ THANKS AND CREDITS
- Alexandre Wolwacz (Stormer), Fabrício Lorenz, Fábio Figueiredo (Vlad)
- Feature scaler (for normalization)
- HPotter (for calc of Historical Volatility)