mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-17 18:18:04 +00:00
doc headers
This commit is contained in:
+18
-1
@@ -1,4 +1,21 @@
|
||||
# AGC: Ehlers Automatic Gain Control
|
||||
# AGC: Ehlers Automatic Gain Control
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `decay` (default 0.991) |
|
||||
| **Outputs** | Single series (AGC) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `1` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Automatic Gain Control normalizes any oscillating signal to the \[-1, +1\] range through exponential peak tracking.
|
||||
- Parameterized by `decay` (default 0.991).
|
||||
- Output range: Tracks input.
|
||||
- Requires `1` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The purpose of the AGC is to normalize the amplitude of any indicator to unity." — John F. Ehlers, TASC January 2015
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# ALAGUERRE: Ehlers Adaptive Laguerre Filter
|
||||
# ALAGUERRE: Ehlers Adaptive Laguerre Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `length` (default 20), `medianLength` (default 5) |
|
||||
| **Outputs** | Single series (ALaguerre) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Adaptive Laguerre Filter extends Ehlers' four-element all-pass cascade by replacing the fixed damping factor with a per-bar adaptive alpha deri...
|
||||
- Parameterized by `length` (default 20), `medianlength` (default 5).
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The best filter is one that knows when to listen closely and when to smooth aggressively." -- John F. Ehlers (paraphrased)
|
||||
|
||||
@@ -107,7 +124,7 @@ O(1) per bar. Four recursive stages with precomputed gamma constant. ~38 cycles/
|
||||
|
||||
| Operation | Vectorizable? | Notes |
|
||||
| :--- | :---: | :--- |
|
||||
| Laguerre stage recursion | No | Each stage L[k][n] depends on L[k-1][n] and L[k][n-1] |
|
||||
| Laguerre stage recursion | No | Each stage `L[k][n]` depends on `L[k-1][n]` and `L[k][n-1]` |
|
||||
| Weighted combination | No | Only 4 terms; SIMD overhead not worthwhile |
|
||||
|
||||
Cascaded IIR stages cannot be vectorized. Batch throughput: ~38 cy/bar.
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# BK: Baxter-King Band-Pass Filter
|
||||
# BK: Baxter-King Band-Pass Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `pLow` (default 6), `pHigh` (default 32), `k` (default 12) |
|
||||
| **Outputs** | Single series (BaxterKing) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The **Baxter-King Band-Pass Filter** is a symmetric finite impulse response (FIR) filter that approximates the ideal spectral band-pass by truncati...
|
||||
- Parameterized by `plow` (default 6), `phigh` (default 32), `k` (default 12).
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The business cycle is whatever remains after you strip away the trend and the noise. Baxter and King figured out the stripping."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# BESSEL: Bessel Filter
|
||||
# BESSEL: Bessel Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `length` |
|
||||
| **Outputs** | Single series (Bessel) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Bessel Filter is a 2nd-order low-pass IIR filter designed to preserve the **shape** and **timing** of price moves.
|
||||
- Parameterized by `length`.
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> When you care more about *when* the market turns than how aggressively you can torture the noise, you reach for a Bessel.
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# Bilateral Filter
|
||||
# Bilateral Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period`, `sigmaSRatio` (default 0.5), `sigmaRMult` (default 1.0) |
|
||||
| **Outputs** | Single series (Bilateral) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Bilateral Filter is a non-linear, edge-preserving, and noise-reducing smoothing filter.
|
||||
- Parameterized by `period`, `sigmasratio` (default 0.5), `sigmarmult` (default 1.0).
|
||||
- Output range: Tracks input.
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Smoothing without blurring edges? It's not magic, it's just math."
|
||||
|
||||
|
||||
+18
-1
@@ -1,4 +1,21 @@
|
||||
# BPF (Bandpass Filter)
|
||||
# BPF (Bandpass Filter)
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `lowerPeriod`, `upperPeriod` |
|
||||
| **Outputs** | Single series (BPF) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `Math.Max(lowerPeriod, upperPeriod)` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The **BPF** (BandPass Filter) is a second-order IIR architecture designed to surgically excise specific frequency components from a time series.
|
||||
- Parameterized by `lowerperiod`, `upperperiod`.
|
||||
- Output range: Tracks input.
|
||||
- Requires `Math.Max(lowerPeriod, upperPeriod)` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Most market data is noise. A sliver is signal. The rest is just detailed evidence of human panic."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# BUTTER2: Ehlers 2-Pole Butterworth Filter
|
||||
# BUTTER2: Ehlers 2-Pole Butterworth Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period` |
|
||||
| **Outputs** | Single series (Butter2) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `4 * period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The 2-Pole Butterworth Filter (BUTTER2) is a signal processing tool designed to provide maximally flat frequency response in the passband.
|
||||
- Parameterized by `period`.
|
||||
- Output range: Tracks input.
|
||||
- Requires `4 * period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Maximally flat frequency response in the passband."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# BUTTER3: Ehlers 3-Pole Butterworth Filter
|
||||
# BUTTER3: Ehlers 3-Pole Butterworth Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period` |
|
||||
| **Outputs** | Single series (Butter3) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `6 * period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The 3-Pole Butterworth Filter (BUTTER3) extends the classic Butterworth design to third order, providing -60 dB/decade rolloff compared to -40 dB/d...
|
||||
- Parameterized by `period`.
|
||||
- Output range: Tracks input.
|
||||
- Requires `6 * period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Steeper rolloff demands a third pole."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# CFITZ: Christiano-Fitzgerald Band-Pass Filter
|
||||
# CFITZ: Christiano-Fitzgerald Band-Pass Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `pLow` (default 6), `pHigh` (default 32) |
|
||||
| **Outputs** | Single series (Cfitz) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `2` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The **Christiano-Fitzgerald Band-Pass Filter** is an asymmetric full-sample filter that approximates the ideal spectral band-pass by using time-var...
|
||||
- Parameterized by `plow` (default 6), `phigh` (default 32).
|
||||
- Output range: Tracks input.
|
||||
- Requires `2` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
## Overview
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# CHEBY1: Chebyshev Type I Lowpass Filter
|
||||
# CHEBY1: Chebyshev Type I Lowpass Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period`, `ripple` (default 1.0) |
|
||||
| **Outputs** | Single series (Cheby1) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Chebyshev Type I filter minimizes the error between the idealized and the actual filter characteristic over the range of the passband, but with...
|
||||
- Parameterized by `period`, `ripple` (default 1.0).
|
||||
- Output range: Tracks input.
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
The Chebyshev Type I filter minimizes the error between the idealized and the actual filter characteristic over the range of the passband, but with ripples in the passband. This type of filter has a steeper rolloff and more passband ripple (type I) or stopband ripple (type II) than Butterworth filters.
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# CHEBY2 (Chebyshev Type II / Inverse Chebyshev)
|
||||
# CHEBY2 (Chebyshev Type II / Inverse Chebyshev)
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period`, `attenuation` (default 5.0) |
|
||||
| **Outputs** | Single series (Cheby2) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- A Chebyshev Type II filter (also known as Inverse Chebyshev) with O(1) complexity.
|
||||
- Parameterized by `period`, `attenuation` (default 5.0).
|
||||
- Output range: Tracks input.
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
A Chebyshev Type II filter (also known as Inverse Chebyshev) with O(1) complexity. Unlike the Type I filter, Type II is maximally flat in the passband (like Butterworth) but has equiripple in the stopband.
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# EDCF: Ehlers Distance Coefficient Filter
|
||||
# EDCF: Ehlers Distance Coefficient Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `length` (default 15) |
|
||||
| **Outputs** | Single series (Edcf) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The **Ehlers Distance Coefficient Filter (EDCF)** is a nonlinear adaptive FIR filter created by John F.
|
||||
- Parameterized by `length` (default 15).
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
## Overview
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# ELLIPTIC: 2nd Order Elliptic Lowpass Filter
|
||||
# ELLIPTIC: 2nd Order Elliptic Lowpass Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period` |
|
||||
| **Outputs** | Single series (Elliptic) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Elliptic filter (or Cauer filter for the history buffs) is the uncompromising extremist of linear filtering.
|
||||
- Parameterized by `period`.
|
||||
- Output range: Tracks input.
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "If you want a vertical cliff, you have to accept a few bumps on the plateau."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# Gauss: Gaussian Filter
|
||||
# Gauss: Gaussian Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `sigma` (default 1.0) |
|
||||
| **Outputs** | Single series (Gauss) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- Gauss (Gaussian Filter) is a smoothing filter that applies a Gaussian kernel to time series data.
|
||||
- Parameterized by `sigma` (default 1.0).
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "SMA smears data like cheap paint. Gaussian filtering respects the signal's soul."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# Hann: Hann FIR Filter
|
||||
# Hann: Hann FIR Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `length` |
|
||||
| **Outputs** | Single series (Hann) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- Hann (Hann Filter) is a Finite Impulse Response (FIR) smoothing filter that applies a Hann window to time series data.
|
||||
- Parameterized by `length`.
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The Hanning window whispers where the Boxcar screams. Smoothness is not just an aesthetic; it's a mathematical necessity."
|
||||
|
||||
|
||||
+19
-2
@@ -1,4 +1,21 @@
|
||||
# HP - Hodrick-Prescott Filter
|
||||
# HP - Hodrick-Prescott Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `lambda` (default 1600.0) |
|
||||
| **Outputs** | Single series (HP) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Hodrick-Prescott (HP) filter is a widely used tool in macroeconomics for separating the cyclical component of a time series from raw data.
|
||||
- Parameterized by `lambda` (default 1600.0).
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Trends are not lines; they are curves that we simplify for our sanity, often at the cost of reality."
|
||||
|
||||
@@ -94,4 +111,4 @@ TValue trend = hp.Update(new TValue(time, price));
|
||||
// Static batch calculation
|
||||
double[] prices = ...;
|
||||
double[] trend = new double[prices.Length];
|
||||
Hp.Calculate(prices, trend, 1600);
|
||||
Hp.Calculate(prices, trend, 1600);
|
||||
|
||||
+18
-1
@@ -1,4 +1,21 @@
|
||||
# HPF: Ehlers Highpass Filter
|
||||
# HPF: Ehlers Highpass Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `length` (default 40) |
|
||||
| **Outputs** | Single series (HPF) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The 2-Pole Highpass Filter (HPF) is designed to separate high-frequency components (like cycles and noise) from the underlying trend.
|
||||
- Parameterized by `length` (default 40).
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Noise is just signal you haven't figured out how to filter yet. Or maybe, it's the only signal that matters."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# Kalman Filter (KALMAN)
|
||||
# Kalman Filter (KALMAN)
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `q` (default 0.01), `r` (default 0.1) |
|
||||
| **Outputs** | Single series (Kalman) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `10` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The **Kalman Filter** is a recursive algorithm that estimates the state of a dynamic system from a series of incomplete and noisy measurements.
|
||||
- Parameterized by `q` (default 0.01), `r` (default 0.1).
|
||||
- Output range: Tracks input.
|
||||
- Requires `10` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Prediction is very difficult, especially if it's about the future." — Niels Bohr. The Kalman Filter doesn't just predict; it optimally estimates the present by balancing what it thinks should happen with what actually happened.
|
||||
|
||||
@@ -108,4 +125,4 @@ Kalman.Calculate(inputs, outputs, q: 0.05, r: 0.5);
|
||||
// Chaining
|
||||
var source = new TSeries();
|
||||
var kf1 = new Kalman(source, q: 0.01, r: 0.1);
|
||||
var kf2 = new Kalman(kf1, q: 0.001, r: 0.1); // Double smoothing
|
||||
var kf2 = new Kalman(kf1, q: 0.001, r: 0.1); // Double smoothing
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
# LAGUERRE: Ehlers Laguerre Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `gamma` (default 0.8) |
|
||||
| **Outputs** | Single series (Laguerre) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `WarmupBars` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Laguerre Filter is a four-element IIR (Infinite Impulse Response) filter designed by John F.
|
||||
- Parameterized by `gamma` (default 0.8).
|
||||
- Output range: Tracks input.
|
||||
- Requires `WarmupBars` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The problem with conventional filters is that they use unit delays. All-pass filters replace unit delays with frequency-dependent delays, and that changes everything." — John F. Ehlers
|
||||
|
||||
## Introduction
|
||||
|
||||
+18
-1
@@ -1,4 +1,21 @@
|
||||
# LMS: Least Mean Squares Adaptive Filter
|
||||
# LMS: Least Mean Squares Adaptive Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `order` (default 16), `mu` (default 0.5) |
|
||||
| **Outputs** | Single series (LMS) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `order + 1` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The **Least Mean Squares (LMS) Adaptive Filter** is the Widrow-Hoff adaptive FIR filter, the simplest and most widely deployed adaptive algorithm i...
|
||||
- Parameterized by `order` (default 16), `mu` (default 0.5).
|
||||
- Output range: Tracks input.
|
||||
- Requires `order + 1` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The filter that learns from its mistakes, one gradient step at a time."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# Loess: Locally Estimated Scatterplot Smoothing
|
||||
# Loess: Locally Estimated Scatterplot Smoothing
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period` |
|
||||
| **Outputs** | Single series (Loess) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `Period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- Locally Estimated Scatterplot Smoothing (LOESS) applies a weighted linear regression over a localized window of nearest neighbors.
|
||||
- Parameterized by `period`.
|
||||
- Output range: Tracks input.
|
||||
- Requires `Period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "When global models fail, act locally. LOESS fits the data by ignoring the noise and embracing the neighborhood."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# MODF: Modular Filter
|
||||
# MODF: Modular Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period`, `beta` (default 0.8), `feedback` (default false), `fbWeight` (default 0.5) |
|
||||
| **Outputs** | Single series (MODF) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- MODF is a dual-path adaptive filter that maintains separate upper and lower EMA bands with conditional state selection.
|
||||
- Parameterized by `period`, `beta` (default 0.8), `feedback` (default false), `fbweight` (default 0.5).
|
||||
- Output range: Tracks input.
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "alexgrover designed a filter with two paths — one tracks uptrends, one tracks downtrends — and a state machine that picks between them. Add a beta knob for aggression and an optional feedback loop, and you get one of the most versatile adaptive filters on TradingView."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# Notch Filter
|
||||
# Notch Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period`, `q` (default 1.0) |
|
||||
| **Outputs** | Single series (Notch) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Notch Filter is a band-stop filter with a narrow bandwidth.
|
||||
- Parameterized by `period`, `q` (default 1.0).
|
||||
- Output range: Tracks input.
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> Sometimes the best way to improved signal clarity isn't amplification, but rather the surgical removal of a specific annoyance.
|
||||
|
||||
|
||||
+18
-1
@@ -1,4 +1,21 @@
|
||||
# NW: Nadaraya-Watson Kernel Regression
|
||||
# NW: Nadaraya-Watson Kernel Regression
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period` (default 64), `bandwidth` (default 8.0) |
|
||||
| **Outputs** | Single series (Nw) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- NW computes the Nadaraya-Watson kernel regression estimator with a Gaussian kernel, producing a nonparametric smooth of the price series.
|
||||
- Parameterized by `period` (default 64), `bandwidth` (default 8.0).
|
||||
- Output range: Tracks input.
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Nadaraya and Watson independently discovered the same thing in 1964: weight each observation by how close it is, normalize, and average. Fifty years later, it became one of the most popular nonparametric smoothers on TradingView. The math did not change; only our ability to compute it in real time."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# OneEuro — One Euro Filter
|
||||
# OneEuro — One Euro Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `minCutoff` (default 1.0), `beta` (default 0.007), `dCutoff` (default 1.0) |
|
||||
| **Outputs** | Single series (OneEuro) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `1` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The **One Euro Filter** (1€ Filter) is a speed-adaptive first-order low-pass filter designed to balance jitter removal against responsiveness.
|
||||
- Parameterized by `mincutoff` (default 1.0), `beta` (default 0.007), `dcutoff` (default 1.0).
|
||||
- Output range: Tracks input.
|
||||
- Requires `1` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
The **One Euro Filter** (1€ Filter) is a speed-adaptive first-order low-pass filter designed to balance jitter removal against responsiveness. It uses an adaptive cutoff frequency: at low signal speed, a low cutoff stabilizes the signal by reducing jitter; as speed increases, the cutoff rises to reduce lag.
|
||||
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
# RLS: Recursive Least Squares Adaptive Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `order` (default 16), `lambda` (default 0.99) |
|
||||
| **Outputs** | Single series (RLS) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `order + 1` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Recursive Least Squares (RLS) adaptive filter is the Rolls-Royce of adaptive FIR filters.
|
||||
- Parameterized by `order` (default 16), `lambda` (default 0.99).
|
||||
- Output range: Tracks input.
|
||||
- Requires `order + 1` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The man who has no patience has no wisdom." — but waiting is not the same as convergence. RLS converges where LMS merely approaches.
|
||||
|
||||
## Introduction
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# RMED: Ehlers Recursive Median Filter
|
||||
# RMED: Ehlers Recursive Median Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period` (default 12) |
|
||||
| **Outputs** | Single series (Rmed) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- RMED applies exponential smoothing to a 5-bar running median, creating a nonlinear IIR filter that rejects impulsive spike noise while providing sm...
|
||||
- Parameterized by `period` (default 12).
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "John Ehlers combined two tools that rarely meet: the median (nonlinear, spike-resistant) and the EMA (smooth, recursive). The median kills the spikes, the EMA smooths the survivors. Together they produce a filter that is both resistant and smooth."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# ROOFING: Ehlers Roofing Filter
|
||||
# ROOFING: Ehlers Roofing Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `hpLength` (default 48), `ssLength` (default 10) |
|
||||
| **Outputs** | Single series (ROOFING) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The **Roofing Filter** is John Ehlers' bandpass architecture designed specifically for oscillator construction.
|
||||
- Parameterized by `hplength` (default 48), `sslength` (default 10).
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The trend is your friend until it overwhelms the signal. The noise is your enemy until you mistake it for alpha."
|
||||
|
||||
|
||||
+18
-1
@@ -1,4 +1,21 @@
|
||||
# SGF: Savitzky-Golay Filter
|
||||
# SGF: Savitzky-Golay Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period`, `polyOrder` (default 2) |
|
||||
| **Outputs** | Single series (Sgf) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- SGF (Savitzky-Golay Filter) is a digital signal processing technique that smoothes data by fitting successive sub-sets of adjacent data points with...
|
||||
- Parameterized by `period`, `polyorder` (default 2).
|
||||
- Output range: Tracks input.
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "SMA smoothes. Savitzky-Golay understands."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# SPBF: Ehlers Super Passband Filter
|
||||
# SPBF: Ehlers Super Passband Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `shortPeriod` (default 40), `longPeriod` (default 60), `rmsPeriod` (default 50) |
|
||||
| **Outputs** | Single series (SPBF) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The **Super Passband Filter** is John Ehlers' wide-band bandpass constructed by differencing two z-transformed EMAs with Ehlers-style smoothing ($\...
|
||||
- Parameterized by `shortperiod` (default 40), `longperiod` (default 60), `rmsperiod` (default 50).
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Two EMAs walk into a frequency domain. The difference between them is the only thing worth trading."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# SSF2: Ehlers 2-Pole Super Smoother Filter
|
||||
# SSF2: Ehlers 2-Pole Super Smoother Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period` |
|
||||
| **Outputs** | Single series (Ssf2) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The 2-Pole Super Smooth Filter (SSF2) is a 2-pole Butterworth filter designed by John Ehlers.
|
||||
- Parameterized by `period`.
|
||||
- Output range: Tracks input.
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Noise is the enemy of the trend follower. The Super Smooth Filter is the silencer."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# SSF3: Ehlers 3-Pole Super Smoother Filter
|
||||
# SSF3: Ehlers 3-Pole Super Smoother Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period` |
|
||||
| **Outputs** | Single series (Ssf3) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `6 * period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The 3-Pole Super Smoother Filter (SSF3) extends Ehlers' Super Smoother concept to third order, providing -60 dB/decade rolloff compared to -40 dB/d...
|
||||
- Parameterized by `period`.
|
||||
- Output range: Tracks input.
|
||||
- Requires `6 * period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Three poles, one sample. Maximum smoothing, minimum ceremony."
|
||||
|
||||
|
||||
+18
-1
@@ -1,4 +1,21 @@
|
||||
# USF: Ehlers Ultimate Smoother Filter
|
||||
# USF: Ehlers Ultimate Smoother Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period` |
|
||||
| **Outputs** | Single series (Usf) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Ultimate Smoother Filter (USF) is a zero-lag smoothing filter introduced by John Ehlers in the April 2024 issue of *Technical Analysis of Stock...
|
||||
- Parameterized by `period`.
|
||||
- Output range: Tracks input.
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The Ultimate Smoother achieves superior smoothing by subtracting high-frequency components using a high-pass filter, resulting in zero lag in the passband."
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# VOSS: Ehlers Voss Predictive Filter
|
||||
# VOSS: Ehlers Voss Predictive Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period` (default 20), `predict` (default 3), `bandwidth` (default 0.25) |
|
||||
| **Outputs** | Single series (VOSS) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Voss Predictive Filter is a two-stage signal processing pipeline that extracts a dominant cycle from noisy price data and then predicts its fut...
|
||||
- Parameterized by `period` (default 20), `predict` (default 3), `bandwidth` (default 0.25).
|
||||
- Output range: Tracks input.
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The best filter is one that tells you what is about to happen, not what already did." — paraphrasing Ehlers
|
||||
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
# WAVELET: Denoising Wavelet Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `levels` (default 4), `threshMult` (default 1.0) |
|
||||
| **Outputs** | Single series (Wavelet) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Wavelet Denoising Filter applies an *à trous* (with holes) Haar wavelet decomposition with soft thresholding to remove high-frequency noise fro...
|
||||
- Parameterized by `levels` (default 4), `threshmult` (default 1.0).
|
||||
- Output range: Tracks input.
|
||||
- Requires 1 bar of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The wavelet transform is to the Fourier transform what a microscope is to a telescope: same math, different scale."
|
||||
|
||||
## Introduction
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
# Wiener Filter
|
||||
# Wiener Filter
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Filter |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period`, `smoothPeriod` (default 10) |
|
||||
| **Outputs** | Single series (Wiener) |
|
||||
| **Output range** | Tracks input |
|
||||
| **Warmup** | `Math.Max(period, smoothPeriod)` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Wiener Filter is an optimal linear filter that attempts to minimize the mean square error between the estimated random process and the desired ...
|
||||
- Parameterized by `period`, `smoothperiod` (default 10).
|
||||
- Output range: Tracks input.
|
||||
- Requires `Math.Max(period, smoothPeriod)` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "The signal is the truth. The noise is just an opinion."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user