What is the Swiss Army Knife filter?
The Swiss Army Knife filter is John Ehlers' name for a single generalized second-order recursive filter that becomes many different indicators depending only on which coefficient set is plugged in. One equation, five coefficients: choose them one way and it behaves like an EMA; choose them other ways and it becomes a two-pole Gaussian or Butterworth style smoother, a high-pass detrender, a band-pass that isolates one cycle wavelength, or a band-stop that removes one. Ehlers published it as a teaching and toolbox piece to show that most of the smoothers and detrenders traders use are the same machine wearing different settings.
The insight behind it is that a second-order recursion (two delayed inputs, two delayed outputs) spans a large share of practical filter behavior. Rather than maintaining separate code and separate mental models for an EMA, a smoother, and a detrender, a trader can maintain one filter and a coefficient table indexed by filter type and period. This makes side-by-side comparison honest: switching from low-pass to band-pass changes nothing except the coefficients, so differences in output reflect the filter response and not implementation quirks.
It is worth being clear about what the tool is not. It contains no adaptation and no new signal; each configured instance is a fixed filter with the ordinary tradeoffs of its type, including lag for the low-pass settings and ringing risk for the sharper band settings. Its value is architectural: a compact, uniform way to build and swap the standard responses inside larger systems.
How it's calculated
Every configuration is the same generalized second-order recursion; only the coefficients change:
Ehlers' article supplies the coefficient formulas per filter type (EMA, two-pole smoothers, high-pass, band-pass, band-stop), each parameterized by the period P.
Setting b1 = b2 = a2 = 0 with matched b0 and a1 reduces the recursion to a standard EMA.
Seed the recursion with the first outputs equal to price; sharper band settings need more warm-up bars before the output is trustworthy.
How traders use it
- As a filter workbench: traders prototype a strategy against several response types (smoother, detrender, band-pass) by swapping coefficient sets, isolating which spectral behavior actually carries the edge.
- The high-pass configuration serves as a detrender ahead of oscillators and cycle tools, similar in role to the roofing filter's first stage.
- The band-pass configuration isolates an assumed dominant cycle for timing entries in rangebound conditions; this inherits all the fragility of assuming a stable cycle, so it is usually paired with dominant cycle detection rather than a fixed period.
- In production code, one well-tested biquad routine replaces a drawer of separate indicator implementations, which reduces subtle bugs when comparing filters. The limitation is unchanged physics: no coefficient choice removes the lag-versus-smoothness tradeoff.
Swiss Army Knife filter vs related tools
Ehlers SuperSmoother: The SuperSmoother is one specific, fixed low-pass design. The Swiss Army Knife is the general chassis that can be configured into that style of smoother plus several entirely different response types.
Butterworth filter: A two-pole Butterworth is one row in the Swiss Army Knife's coefficient table. Reaching for the named filter or the generalized form produces the same line; the difference is packaging.
Gaussian filter: Likewise one configuration among several. The Gaussian setting emphasizes overshoot-free smoothing, while other settings of the same recursion detrend or band-limit instead.
Concept family
Trend
100 concepts mapped · 100 in the Library
Swiss Army Knife Filter FAQ
Is the Swiss Army Knife filter an indicator I trade directly?
Not really. It is a framework: each configuration reproduces a familiar filter whose output you would trade the same way you trade that filter. Its value is uniform implementation and easy comparison.
Who created it?
John Ehlers, who published the generalized filter and its coefficient tables in the technical-analysis literature as a way to unify the common second-order filters used on price data.
Does it adapt to market conditions?
No. Every configuration is a fixed-coefficient filter for a chosen period. Adaptation, if wanted, has to be added on top by recomputing the period input from a market measurement.
Why only second order?
Second order covers most practical single-band responses with modest lag. Sharper needs are met by cascading two or more of these sections rather than raising the order of one equation.
Build Swiss Army Knife Filter your way.
Quant writes, tests, and refines it with you — then it runs on LuxAlgo charting or ports to TradingView.