Free Dominant Cycle Period Finder
Detect the dominant cycle periods in any price series using Goertzel spectral analysis — the same algorithm used by institutional cycle analysts.
Shortest cycle to detect
Auto-limited to data_length / 2.5
One price per line or comma-separated
What Is Cycle Period Detection?
Every financial market contains recurring patterns — cycles of buying and selling pressure that repeat at semi-regular intervals. Cycle period detection uses spectral analysis to identify these hidden rhythms in price data. The dominant cycle is the single most powerful repeating pattern in the data, and knowing its period gives you an edge in timing entries and exits.
This tool uses the Goertzel algorithm — the same spectral analysis method used by institutional cycle analysts and platforms like WhenToTrade. Unlike the FFT (Fast Fourier Transform) which calculates power at all frequencies simultaneously, the Goertzel algorithm efficiently targets specific frequency bands, making it ideal for financial cycle detection where you care about a specific range of periods.
How the Goertzel Algorithm Detects Cycles
The detection process follows four steps:
- Detrending: Raw prices are converted to log returns to remove trend bias. A strong uptrend can mask the underlying cycle structure, so detrending is essential for accurate detection.
- Spectral Analysis: The Goertzel algorithm computes the spectral power at each candidate period within your specified range. Higher power means stronger cyclical behavior at that period.
- Peak Detection: Local maxima in the power spectrum are identified as candidate cycles. Not every peak represents a tradeable cycle — some are harmonics or noise.
- Ranking: Detected cycles are ranked by their normalized spectral power, giving you a clear picture of which cycles dominate the data.
Goertzel vs FFT: Why We Use Goertzel
The FFT is the most common spectral analysis tool, but it has limitations for trading applications. FFT requires the data length to be a power of 2, and it calculates all frequencies — most of which are irrelevant for cycle trading. The Goertzel algorithm lets you focus on a specific range (e.g., 5-200 bars) and produces more precise results with fewer data points.
John Ehlers, one of the pioneers of digital signal processing in trading, has published extensively on the advantages of targeted spectral methods over generic FFT for market data. The Goertzel approach also avoids the spectral leakage problems that plague short-window FFT analysis.
Interpreting Results
- High Significance (Green): Strong, consistent cycle with high spectral power. This is a dominant rhythm in the data worth incorporating into your analysis.
- Medium Significance (Yellow): Moderate cycle present but not dominant. Use alongside other analysis for confluence.
- Low Significance (Gray): Weak or possibly spurious cycle. Validate with the Bartels significance test before relying on it.
Best Practices for Cycle Detection
- Use enough data: For reliable detection of a 50-bar cycle, provide at least 250-500 bars (5-10 complete cycles). Short data produces noisy spectra.
- Set appropriate period bounds: The minimum period should be at least 5 bars. The maximum should not exceed data_length / 2.5 — the tool enforces this automatically.
- Validate detected cycles: Always run the Bartels significance test on detected periods to confirm they are statistically genuine.
- Check for harmonics: If you find cycles at 20 and 40 bars, the 40-bar cycle may be the fundamental and 20-bar is its harmonic. Both are valid but represent the same underlying rhythm at different scales.
- Consider the Hurst exponent: A Hurst exponent near 0.5 (random walk) means cycles are unlikely to be persistent. Values above 0.5 suggest trending behavior where cycles are more reliable.