Direct Answer
A band-pass filter keeps cycles near a chosen center period and attenuates both longer and shorter cycles. In John Ehlers' form it is a two-pole recursive filter set by a center period and a fractional bandwidth. The output oscillates around zero and is strongest when price contains a cycle near the center period.
Band-Pass Filter: Formula, Meaning, Signals, Examples and How to Use It
How Is Band-Pass Filter Calculated?
A band-pass filter keeps cycles near a chosen center period and attenuates both longer and shorter cycles. In John Ehlers' form it is a two-pole recursive filter set by a center period and a fractional bandwidth.
Formula: beta = cos(2*pi/P); gamma = 1 / cos(4*pi*delta/P); alpha = gamma - sqrt(gamma^2 - 1); BP = 0.5*(1 - alpha)*(price - price[2]) + beta*(1 + alpha)*BP[1] - alpha*BP[2]
Inputs:
- Close prices
- Center period P in bars
- Fractional bandwidth delta (for example 0.1)
Worked example. For a center period of 20 bars, the coefficient beta is 0.9511. The inputs are illustrative numbers, not market data.
Reading it. The output oscillates around zero and is strongest when price contains a cycle near the center period. Its zero crossings and turns are read as phases of that cycle, and the amplitude shows how much cycle energy is present there.
Limits. Only cycles near the chosen period are shown, so a wrong center period yields a weak output. Narrower bandwidth rings longer after shocks, and recursive output depends on start values.
What is Band-Pass Filter?
A band-pass filter keeps cycles near a chosen center period and attenuates both longer and shorter cycles. In John Ehlers' form it is a two-pole recursive filter set by a center period and a fractional bandwidth.
How to use Band-Pass Filter
The output oscillates around zero and is strongest when price contains a cycle near the center period. Its zero crossings and turns are read as phases of that cycle, and the amplitude shows how much cycle energy is present there. A reading alone is never a buy or sell signal; it needs context from price structure, volume, volatility and the broader market regime.
Strengths
- Center period and fractional bandwidth are separate inputs, so the target cycle and the width of cycles retained are tuned independently.
- The two-pole form passes cycles near the center period while removing both slower trend and faster noise in one step.
- Reproducible when the formula and data convention are fixed.
Weaknesses and limitations
- A filter centered on one period gives no direct way to see which period is dominant, so it must be paired with a separate cycle measurement.
- Output amplitude depends on how closely the market cycle matches the center period, so swings can change size for reasons unrelated to price movement.
- Correlated indicators can create false confidence by repeating the same underlying information.
Editorial and risk note
This page is educational content, not individualized investment advice. It should not imply guaranteed prediction, accuracy or outperformance.
Frequently Asked Questions
Is Band-Pass Filter a buy or sell signal?
No. The output oscillates around zero and is strongest when price contains a cycle near the center period. Only cycles near the chosen period are shown, so a wrong center period yields a weak output. A trade built on it still needs a trigger, an invalidation rule, a position size and realistic execution assumptions.
What is the best setting for Band-Pass Filter?
Band-Pass Filter takes these inputs: close prices; center period P in bars; fractional bandwidth delta (for example 0.1). There is no universal best setting for the tunable ones, so test them across instruments, regimes and out-of-sample periods and favor stable parameter regions over one historical winner.
Can Band-Pass Filter be used by itself?
Only cycles near the chosen period are shown, so a wrong center period yields a weak output. Narrower bandwidth rings longer after shocks, and recursive output depends on start values. For that reason it is read next to measures of direction, participation, valuation, liquidity and risk, not alone.
Does Band-Pass Filter work on every timeframe?
The calculation (beta = cos(2*pi/P); gamma = 1 / cos(4*pi*delta/P); alpha = gamma - sqrt(gamma^2 - 1); BP = 0.5*(1 - alpha)*(price - price[2]) + beta*(1 + alpha)*BP[1] - alpha*BP[2]) can be run on any bar size, but behavior is not portable: a reading on a five-minute chart describes a very different market window from the same reading on a daily chart. Validate the exact timeframe before relying on it.
Why does Band-Pass Filter give false signals?
A filter centered on one period gives no direct way to see which period is dominant, so it must be paired with a separate cycle measurement. Output amplitude depends on how closely the market cycle matches the center period, so swings can change size for reasons unrelated to price movement. Lag, noise and regime changes add to this, because market participants react to new information after the reading is calculated.
How should Band-Pass Filter be backtested?
Rebuild Band-Pass Filter from close prices using point-in-time data, write the rules before testing, include delisted securities where relevant, model realistic fills and costs, reserve a validation sample and compare with a simpler baseline.