v2
Added:
exponential(_src, _lookback, startAtBar)
Exponential Kernel - A weighted average of the source series with exponential decay.
Parameters:
_src (float): <float series> The source series.
_lookback (simple int): <simple int> The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars.
startAtBar (simple int)
Returns: yhat <float series> The estimated values according to the Exponential Kernel.
linear(_src, _lookback, _startAtBar)
Linear Weighting Kernel - Applies a linearly decreasing weight to past values.
Parameters:
_src (float): <float series> The source series.
_lookback (simple int): <simple int> The number of bars used for the estimation.
_startAtBar (simple int): <simple int> Starting bar index for the calculation to mitigate volatility.
Returns: yhat <float series> The weighted average of the past values with linearly decreasing weights.
sigmoid(_src, _lookback, _alpha, _c, startAtBar)
Sigmoid Kernel - Models non-linear phenomena with an S-shaped curve, similar to neural network activation functions.
Parameters:
_src (float): <float series> The source series.
_lookback (simple int): <simple int> The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars.
_alpha (simple float): <simple float> The slope parameter of the sigmoid function, controlling the steepness of the curve.
_c (simple float): <simple float> The intercept parameter of the sigmoid function, adjusting the midpoint of the S-shaped curve relative to the lookback window.
startAtBar (simple int)
Returns: yhat <float series> The estimated values according to the Sigmoid Kernel.