This update presents a significant enhancement to the script. In this version, the author has implemented adjustable skewness and kurtosis elements, complete with damping mechanisms that allow for refined control over the tail behavior and asymmetry in the distribution of price movements.
Key Enhancements
Adjustable Skewness and Kurtosis
The updated model now includes parameters to adjust skewness and kurtosis with corresponding lookback windows. These parameters are extraordinarily sensitive to market dynamics, particularly gap ups and gap downs. The author has provided the following means of modulation:
Skewness/Kurtosis Lookback Window: The default is set to 30 bars. If the signal exhibits instability — for example, projections that become excessively outlandish — it is recommended to reduce the lookback window by increments of 5, with the minimum allowable window being ten bars.
Damping Mechanism: The damping factor applied to the skewness and kurtosis elements can be adjusted. A lower numerical value (e.g., 0.001 instead of 0.003) increases the dampening effect, ensuring that overly volatile signals are moderated.
Adaptive Stability Measures
Recognizing that both skewness and kurtosis are highly responsive to abrupt market changes, additional suggestions include:
If adjusting the lookback window and damping parameters is insufficient, consider reducing the volatility lookback periods along with the overall volatility settings.
Users should note that each adjustment significantly affects projection outputs; therefore, careful tuning is necessary to maintain the utility of the indicator under highly volatile market conditions.
Mathematical Underpinnings
Skewness
Skewness is a measure of asymmetry in the distribution of returns. Mathematically, for a sample {x1,x2,…,xn}{x1,x2,…,xn} with mean μμ and standard deviation σσ, skewness is defined as:
Skewness=1n∑i=1n(xi−μσ)3
Skewness=n1i=1∑n(σxi−μ)3
A positive skew indicates a longer right tail, while a negative skew signifies a longer left tail. Adjusting the skewness in the model allows it to better capture and reflect asymmetries in market behavior.
Kurtosis
Kurtosis measures the “tailedness” of the distribution compared to a normal distribution. Its formula for a sample is:
Kurtosis=1n∑i=1n(xi−μσ)4
Kurtosis=n1i=1∑n(σxi−μ)4
A normal distribution has a kurtosis of 3 (excess kurtosis of 0 when subtracting 3). Adjusting kurtosis is crucial for managing the risk associated with extreme price moves or “fat tails.”
Distribution Insights
Normal Distribution: A symmetric distribution with a kurtosis of 3, where most values cluster around the mean.
Leptokurtic Distribution: Characterized by a sharper peak and fatter tails (excess kurtosis > 0). This phenomenon indicates a higher probability of extreme outcomes, often referred to in the financial industry as “fat tails.” Proper modeling of this behavior is important to manage the risk of substantial deviations from the average trend.
Platykurtic Distribution: Exhibits a flatter peak and thinner tails (excess kurtosis < 0), suggesting fewer extreme outcomes relative to a normal distribution.
The author's update ensures that the model can dynamically adjust to reflect these distribution characteristics. Notably, the implementation of these adjustments has revealed a distinct "kurtosis smile" in the chart—an observation where the curvature of the kurtosis plot becomes more pronounced when accounting for adjusted skewness and kurtosis. This phenomenon aligns with market behaviors where distribution tails and peaks vary nonlinearly, offering deeper insights into market volatility.
Practical Adjustments & Usage
For optimal performance:
Instability Issues: When projections become unstable (e.g., disappearing due to outlandish price projections), try reducing the skewness/kurtosis lookback window by 5 bars (ensuring it does not drop below 10 bars).
Increasing Dampening: If the lookback adjustment does not stabilize the signal, enhance the damping effect by reducing the damping constant from 0.003 to 0.001.
Further Adjustments: If neither modification suffices, consider reducing the volatility lookback periods to accommodate highly volatile market conditions where the indicator might otherwise lose its predictive utility.
Conclusion
This update offers a more nuanced and dynamic approach to price projection modeling by incorporating damped, adjustable skewness and kurtosis. The refined control over these parameters provides traders with the ability to adjust their models to various market conditions—particularly when facing sudden price gaps or increased volatility. As always, thorough testing and individual tuning are essential for aligning the model with one's specific trading strategy and market observations. NOTE: The default settings have been set to only show the EV, with 55 bars in to the future. If you would like to continue to see that far, be sure to add more instances of the indicator to your chart. After adding a new instance of the indicator, turn off the EV line and turn on a different line, such as upper or lower confidence bands. TradingView will not display any more than 55 bars ahead, so only one line at a time can be turned on when looking that far ahead, but adding more instances of the indicator makes getting around this easier. Enjoy! Anchored version will receive updates soon.