pine files

This commit is contained in:
Miha Kralj
2026-01-31 14:05:53 -08:00
parent 51e885a4a6
commit 5ed4b6c0fc
102 changed files with 2883 additions and 593 deletions
+4 -18
View File
@@ -9,26 +9,12 @@ namespace QuanTAlib;
/// REMA: Regularized Exponential Moving Average
/// </summary>
/// <remarks>
/// REMA combines exponential smoothing with a regularization term that penalizes
/// deviations from the previous trend direction. This produces a smoother output
/// than standard EMA while maintaining responsiveness to genuine price changes.
/// Combines EMA smoothing with regularization term penalizing trend direction changes.
/// Lambda controls blend: 0 = pure momentum, 1 = standard EMA.
///
/// Calculation:
/// alpha = 2 / (period + 1)
/// ema_component = alpha * (source - rema) + rema
/// reg_component = rema + (rema - prev_rema) // momentum continuation
/// REMA = lambda * (ema_component - reg_component) + reg_component
///
/// Parameters:
/// - period: Controls the EMA decay rate (alpha = 2/(period+1))
/// - lambda: Regularization strength (0 = max regularization, 1 = standard EMA)
///
/// O(1) update:
/// Only requires previous REMA and prev_prev_REMA values.
///
/// IsHot:
/// Becomes true after sufficient warmup similar to EMA.
/// Calculation: <c>REMA = λ×(EMA_comp - REG_comp) + REG_comp</c>.
/// </remarks>
/// <seealso href="Rema.md">Detailed documentation</seealso>
[SkipLocalsInit]
public sealed class Rema : AbstractBase
{