Hilbert and Ehlers Cycle Analytics
8 algorithms in Statistical Time Series · 8 with asserted arithmetic.
In this family#
-
Hilbert Transform Dominant Cycle Period verified
Estimates the dominant cycle length in bars from the bar-to-bar change in the Hilbert phase angle, clamping each raw estimate into the 6-to-50 bar range and smoothing it with a 0.2 / 0.8 exponential update. Any contract failure is rethrown as an
Errorwhose message beginstopic calculation failed:.hilbertTransformDominantCyclePeriod(input) -
Hilbert Transform Dominant Cycle Phase verified
Returns the instantaneous Hilbert phase angle in radians as
atan2(quadrature, in_phase), where both components come from a four-tap filter over the residual ofcloseagainst its 4-bar EMA. Any contract failure is rethrown as anErrorwhose message beginstopic calculation failed:.hilbertTransformDominantCyclePhase(input) -
Hilbert Transform Phasor Components verified
Exposes the raw phasor behind the Hilbert cycle family: the in-phase component, its quadrature partner from the four-tap filter, and the amplitude and angle they form. Any contract failure is rethrown as an
Errorwhose message beginstopic calculation failed:.hilbertTransformPhasorComponents(input) -
Hilbert Transform SineWave verified
Turns the Hilbert phase angle into the classic sinewave pair, the sine of the phase and a lead sine shifted a quarter turn ahead, whose crossings are the usual cycle-turn signal. Any contract failure is rethrown as an
Errorwhose message beginstopic calculation failed:.hilbertTransformSinewave(input) -
Hilbert Transform Trend/Cycle Mode verified
Labels each bar
trendorcycleby asking whether the distance fromcloseto its exponential trend exceeds 1.5 times the current Hilbert phasor amplitude. Any contract failure is rethrown as anErrorwhose message beginstopic calculation failed:.hilbertTransformTrendCycleMode(input) -
Ehlers Cyber Cycle verified
Runs
closethrough a two-pole high-pass filter tuned toperiod, then smooths the residual with an EMA of the same span, leaving an oscillator centred on zero that tracks the shorter-than-periodswings. Any contract failure is rethrown as anErrorwhose message beginstopic calculation failed:.ehlersCyberCycle(input) -
Ehlers Roofing Filter verified
Stacks the two halves of a roof: a two-pole high-pass filter tuned to
periodremoves the slow drift, and an Ehlers Super Smoother run at half that span removes the fast noise, leaving the band in between. Any contract failure is rethrown as anErrorwhose message beginstopic calculation failed:.ehlersRoofingFilter(input) -
Ehlers Decycler verified
Subtracts a two-pole high-pass residual from
close, leaving a trend line with the sub-periodwiggle removed and far less lag than a moving average of the same span. Any contract failure is rethrown as anErrorwhose message beginstopic calculation failed:.ehlersDecycler(input)
What they share#
Every topic here is a record-transform, so once you have
called one the rest follow the same shape. Import paths differ only in the final segment:
import { hilbertTransformDominantCyclePeriod } from "fintech-algorithms/statistical-time-series/hilbert-and-ehlers-cycle-analytics/hilbert-transform-dominant-cycle-period";
import { hilbertTransformDominantCyclePhase } from "fintech-algorithms/statistical-time-series/hilbert-and-ehlers-cycle-analytics/hilbert-transform-dominant-cycle-phase";Read them in the order above — the sequence is pedagogical, not alphabetical.
Where this sits#
Statistical Time Series collects 37 algorithms across 6 families. For the concept behind this family rather than the call signatures, see the concept guides.