2.42 Designing an Indicator by Specifying Its Phase First

Design an indicator by stating the phase (lag) you want, then solving for the filter. Causality couples magnitude to phase, so you move lag around the spectrum but never delete it. Zero-lag, buried.

2.42 Designing an Indicator by Specifying Its Phase First

Every article in this pillar so far took an indicator and read off its behavior: write the filter, derive its frequency response, see what it keeps and how late it reports. The old article "The Frequency Response of Trading Indicators" made reading that response routine. This article runs the machine backwards. A trader does not care about coefficients; a trader cares about lag, and lag is phase. So why not specify the phase response you want, low lag in the band that matters, and solve for the indicator that delivers it? You can, and the attempt teaches the deepest constraint in causal filtering: you are not allowed to choose phase freely, because causality has already spent half your freedom.

The honest goal: pick the lag, then find the filter

The old article "How to Think About Indicator Lag Before Backtesting" framed lag as a budget you must meet, and phase is where lag lives, phase divided by frequency is lag in bars. The forward way to hit a lag target is trial and error: build a filter, measure its phase, adjust, repeat. The backward way is to state the target phase response across the frequency band as the design specification and solve for the filter that realizes it. That is design by phase: decide that you want near-zero lag from period 20 to period 40 and tolerable lag elsewhere, then ask what indicator has that phase. It is the right question because it starts from the thing you actually care about instead of from coefficients you do not.

Causality couples the real and imaginary parts

Here is where the attempt collides with a law. A filter's frequency response is a complex number at each frequency, a real part and an imaginary part, and together they encode both the magnitude (how much each cycle survives) and the phase (how late it arrives). You might hope to dial magnitude and phase independently. You cannot, if the filter is causal, meaning it uses only past and present data, which every tradeable indicator must. Causality forces a fixed relationship between the real and imaginary parts: fix one and the other is determined.

$$ H_I(\omega) = -\frac{1}{2\pi}\int_{-\pi}^{\pi} H_R(\lambda)\,\cot\!\left(\frac{\omega - \lambda}{2}\right) d\lambda $$

The imaginary part is a fixed integral transform of the real part, a Hilbert relation. This is the discrete cousin of the Kramers-Kronig relations that physicists use, and it is not a guideline, it is a consequence of the filter not being allowed to respond before its input arrives. The phase is then the angle of that complex response.

$$ \tan\varphi(\omega) = \frac{H_I(\omega)}{H_R(\omega)} $$

So the moment you specify a phase response, the coupling pins down the magnitude response too, and vice versa. You get to design one freely; the other is handed to you by causality. There is no causal filter with an arbitrary phase and an arbitrary magnitude.

What this means for the dream of zero lag

This is the rigorous burial of every zero-lag fantasy, and it is more fundamental than the lag-reduction caveats in earlier articles. Suppose you specify the dream: gain of one across your cycle band, like a perfect bandpass, and zero phase everywhere, no lag at all. The coupling says that pairing is impossible for a causal filter. Demand zero lag in your band and the real-imaginary relation forces a magnitude response you did not ask for and probably do not want, gain that overshoots, rings, or amplifies noise where you wanted it flat. Push the phase down in one band and it pops up elsewhere, because the total is conserved by the transform. You are moving lag around the spectrum, never deleting it. The old articles said zero-lag claims are lag reduction in disguise; this says why, from the structure of causality itself.

That makes design-by-phase a real tool with an honest ceiling. You can shape the phase to put your low lag where your strategy trades and accept worse lag and a compromised magnitude in bands you do not use, which is a legitimate and powerful optimization. What you cannot do is wish lag away across the board. The discipline that follows is concrete. Specify the phase only in the band that matters, and inspect the magnitude the coupling forces on you before committing, because a beautiful phase with a ringing, noise-amplifying magnitude is a worse indicator than an honest laggy one. Read both halves of the complex response, always, because causality will not let you ignore the half you did not design. The reward for respecting the constraint is an indicator tuned to your actual lag budget. The punishment for ignoring it is a filter that meets your phase spec and feeds your model garbage.

KEY POINTS

  • Design-by-phase runs the frequency-response reading of the old article "The Frequency Response of Trading Indicators" backwards: specify the phase (hence lag) you want across the band, then solve for the indicator that delivers it.
  • It starts from what traders actually care about, lag, which is phase divided by frequency, the budget framed in the old article "How to Think About Indicator Lag Before Backtesting."
  • A causal filter's frequency response is complex (real and imaginary parts), and causality forces the imaginary part to be a fixed Hilbert transform of the real part. Fix one and the other is determined.
  • Therefore magnitude and phase cannot be chosen independently. The phase is the angle of the coupled response (tan phi equals imaginary over real), so specifying phase pins down magnitude and vice versa.
  • The zero-lag dream (flat gain plus zero phase) is impossible for a causal filter. Demanding low lag in one band forces an unwanted magnitude (overshoot, ringing, noise gain) and pushes lag elsewhere. You move lag around the spectrum, never delete it.
  • Used honestly it is powerful: shape low lag into the band you trade, accept worse lag where you do not, and always inspect the magnitude causality forces before committing.

References