Dalal Street Blogs provides information for educational purposes only and does not constitute investment advice. Please consult a SEBI-registered investment adviser before making any investment decisions.
CAUTION: Dalal Street Blogs publishes market news and educational content only. We do not promote, recommend or endorse any stock, and nothing here is a solicitation to buy or sell securities. Please consult a SEBI-registered adviser before investing.
Technical Analysis

Ehlers Cyber Cycle Indicator: Isolating the Cycle and Trading Its Turns

3995
By Dalal Street Blogs EditorialUpdated 8 min read

Most oscillators we use on Indian charts were built for a market that either trends or chops. The Ehlers cyber cycle indicator starts from a different idea. John Ehlers, whose MESA Software papers cover a long list of filter-based tools for traders, treats price as two things stacked on top of each other: a trend and a cycle. Strip the trend away, and what is left should swing up and down in a rhythm you can time. That leftover swing is what he calls the Cyber Cycle.

This guide covers where the indicator comes from, the exact formula, what each piece of it does, a bar-by-bar worked example you can check with a calculator, and the honest list of things that go wrong when you use it on NSE stocks.

In this article
  1. Where the Ehlers cyber cycle indicator comes from
  2. The formula, line by line
  3. The trigger line and the basic signal
  4. Worked example: a cyber cycle on a made-up ₹500 stock
  5. Adding the Inverse Fisher Transform
  6. Using it on Indian charts
  7. A simple rule set to test, not to trust blindly
  8. Limits of the Cyber Cycle

Where the Ehlers cyber cycle indicator comes from

The cleanest public description is in Ehlers’ own article The Inverse Fisher Transform, which is hosted on his MESA Software papers page. In it he writes that his simplified model of the market consists of a trend component and a cycle component, that the cycle component can be isolated by filtering, and that he calls the result the Cyber Cycle. The same article points readers to his book Cybernetic Analysis for Stocks and Futures (John Wiley) for the background.

Two descriptive points from that article are worth holding on to. First, like the RSI, the Cyber Cycle is an oscillator-type indicator. Second, and unlike the RSI, it has cyclic swings with variable amplitude. There is no fixed 0 to 100 box. A big, violent swing in price gives a big reading; a quiet market gives a small one. That one difference drives most of what follows.

If you have read our piece on the Ehlers Sinewave indicator, the family resemblance will be obvious. Both try to work out the cyclical part of price rather than react to the trend part.

The formula, line by line

Ehlers publishes the indicator as EasyLanguage code. Translated into plain notation, with [1] meaning “one bar ago” and [2] meaning “two bars ago”, it has three steps.

Step 1: choose the price and the alpha

The default input price is the bar’s midpoint, (High + Low) / 2, not the close. The default alpha is 0.07. Alpha is the only real tuning knob. It appears in the coefficients of the recursive part of the formula, so changing it changes how much of the slower movement is let through.

Step 2: smooth the price

Smooth = (Price + 2 × Price[1] + 2 × Price[2] + Price[3]) / 6

This is a four-bar weighted average with weights 1, 2, 2, 1. The weights add up to 6, which is why the sum is divided by 6. Its job is simply to knock off bar-to-bar jitter before the main filter sees the data.

Step 3: the cycle filter

Cycle = (1 − 0.5α)² × (Smooth − 2 × Smooth[1] + Smooth[2]) + 2 × (1 − α) × Cycle[1] − (1 − α)² × Cycle[2]

Look at the bracket in the middle: Smooth − 2 × Smooth[1] + Smooth[2]. That is a second difference. Feed it a perfectly straight line, say 100, 102, 104, and it returns 104 − 204 + 100 = 0. A steady trend disappears. What survives is the bending, the speeding up and slowing down of price. That is how the formula pulls the cycle out of the trend.

The last two terms make the filter recursive. Today’s Cycle value depends on its own values one and two bars ago. This is what gives the output its smooth, wave-like shape, and it is also why the indicator needs time to settle, which we come to in a moment.

With alpha at 0.07, the three coefficients work out to:

  • (1 − 0.035)² = 0.931225
  • 2 × (1 − 0.07) = 1.86
  • (1 − 0.07)² = 0.8649

The start-up rule

A recursive filter needs earlier values of itself, which do not exist on the first few bars. Ehlers’ code handles this with a plain rule: while the bar count is below 7, Cycle is set to (Price − 2 × Price[1] + Price[2]) / 4. From bar 7 onward, the full formula takes over.

The second difference in the middle of the formula returns zero for a perfectly straight trend. Whatever the Cyber Cycle shows you is the bending of price, not its direction.

The trigger line and the basic signal

Ehlers suggests trading the Cyber Cycle using the crossing of the indicator and the indicator delayed by one bar. So the trigger line is just yesterday’s Cycle value. When Cycle crosses above its trigger, the cycle has turned up. When it crosses below, the cycle has turned down.

Because the trigger is only one bar behind, crossovers come early compared with a signal line built from a multi-bar moving average, such as the one on MACD. The price of that speed is more crossovers, and some of them will be noise.

Worked example: a cyber cycle on a made-up ₹500 stock

Here is a hypothetical stock whose bar midpoints run for 17 sessions. The numbers are invented to show the arithmetic, not taken from any real share. Alpha is 0.07.

BarMidpoint (₹)SmoothCycleTrigger (Cycle[1])
3507n/a0.250.00
4510505.00−0.250.25
5512508.17−0.25−0.25
6511510.33−0.75−0.25
7508510.67−2.89−0.75
8504509.00−6.58−2.89
9501506.00−10.99−6.58
10499502.83−14.90−10.99
11500500.67−17.28−14.90
12504500.50−17.39−17.28
13509502.67−15.23−17.39
14513506.50−11.73−15.23
15516510.67−8.34−11.73
16515513.67−6.45−8.34
17512514.50−6.80−6.45

Bars 1 and 2 had midpoints of ₹500 and ₹503. Bars 3 to 6 use the start-up rule. For bar 6, that is (511 − 2 × 512 + 510) / 4 = −3 / 4 = −0.75.

Checking bar 7 by hand

Smooth on bar 7 = (508 + 2 × 511 + 2 × 512 + 510) / 6 = 3,064 / 6 = 510.67.

The second difference = 510.67 − 2 × 510.33 + 508.17 = −1.83.

Cycle = 0.931225 × (−1.83) + 1.86 × (−0.75) − 0.8649 × (−0.25) = −1.71 − 1.40 + 0.22 = −2.89 (rounded).

Checking bar 13, the turn

Smooth on bar 13 = (509 + 2 × 504 + 2 × 500 + 499) / 6 = 3,016 / 6 = 502.67. The second difference is 502.67 − 2 × 500.50 + 500.67 = 2.33. Then:

Cycle = 0.931225 × 2.33 + 1.86 × (−17.39) − 0.8649 × (−17.28) = 2.17 − 32.34 + 14.94 = −15.23.

On bar 12 the Cycle (−17.39) was still below its trigger (−17.28). On bar 13 it is at −15.23 against a trigger of −17.39. That is the cross above the trigger, the indicator’s buy-side signal. Price had bottomed at ₹499 on bar 10 and the midpoint was already ₹509 by bar 13, so the turn arrived after the low, not at it.

The opposite cross shows up on bar 17: Cycle −6.80 slips under its trigger of −6.45, right after the midpoint peaked at ₹516 on bar 15.

What the example actually teaches

Look at how long the whole thing stays negative. Price went from ₹499 back up to ₹516, yet the Cycle never crossed zero in these 17 bars. That is the recursive filter still settling from its start-up values. In a real platform you would load a few hundred bars of history so that this warm-up period is far behind you before you read any signal. On a stock that listed recently, there may not be enough history for the readings to mean much.

On a fresh series the Cyber Cycle spends its first stretch settling down. Read signals only once the warm-up is well behind you.

Adding the Inverse Fisher Transform

In the same article, Ehlers applies the Inverse Fisher Transform to the Cyber Cycle to make the signals sharper. The transform is:

IFish = (e2x − 1) / (e2x + 1)

He explains that inputs between −0.5 and +0.5 come out nearly unchanged, while large inputs are squashed so the output stays between −1 and +1. His code plots reference lines at +0.5 and −0.5 as sell and buy references. Our Fisher Transform indicator guide covers the forward version of this maths.

Here is the catch for Indian users, and our example shows it clearly. The Cyber Cycle is measured in rupees. On our ₹500 stock, readings of −6 to −17 are already far too big for the transform, so the IFish value sits pinned at −1.00 from bar 8 to bar 17. It tells you nothing. Ehlers himself says the swings need sufficient amplitude for the transform to work, and the flip side is that they must not be so large that everything saturates.

The practical fix is to scale the Cycle before transforming it. Some traders divide it by the price, others normalise it against its own recent range. Whatever you choose, a single setting will not behave the same way on a ₹50 PSU stock and a ₹15,000 large cap. Check the scaling on each chart before trusting the ±0.5 lines.

Using it on Indian charts

A few practical points from using cycle tools on NSE data:

  • Match the timeframe to the swing you want. On daily candles, the Cyber Cycle will pick up swings of a few days to a few weeks. For intraday Nifty futures, 15-minute bars are a more sensible starting point than 1-minute bars, where noise dominates.
  • Respect the trend. The formula deliberately throws the trend away. That is its strength in a range, and its weakness in a strong move. In a sustained rally, sell-side crosses keep appearing and keep failing. Many traders only take crosses in the direction of a longer moving average.
  • Watch the midpoint input. Because the default price is (High + Low) / 2, a gap-up open followed by a quiet session can look different on the Cyber Cycle than on a close-based oscillator.
  • Keep alpha stable. It is tempting to tune alpha separately for every stock until the backtest looks perfect. That usually just fits the past.

A simple rule set to test, not to trust blindly

If you want a starting point for a paper-trading test on daily charts, something like this keeps the logic honest:

  1. Load enough history so the indicator has passed its warm-up.
  2. Define the trend with a longer average, for example a 50-day moving average.
  3. Go long only when the Cycle crosses above its trigger while price is above that average.
  4. Exit when the Cycle crosses back below its trigger, or at a stop placed below the recent swing low.
  5. Log every trade, including the ones that whipsaw, before judging the rule.

Nothing here is magic. The Cyber Cycle is a filter, and filters are only as good as the regime they are used in. In a choppy, range-bound market it can be very good at timing turns. In a one-way trend it will keep calling turns that do not come.

Limits of the Cyber Cycle

First, it lags. Our example caught the upturn three bars after the low, and the downturn two bars after the high. That is normal for any filter. Second, its amplitude is not bounded, so you cannot set universal overbought and oversold levels without scaling. Third, its recursive design makes it sensitive to the amount of history loaded, so two platforms can show slightly different values on the same stock. And finally, Ehlers’ own examples in the article were on US ETFs like SPY and QQQ, not on Indian stocks, so any edge on NSE names is something you have to test for yourself.

Used with those limits in mind, it is a neat tool to have: a way to look at the rhythm of a stock without the trend drowning it out. For the bigger picture on combining indicators, our technical analysis for Indian stocks guide is the place to start.

Disclaimer: This article is for educational purposes only and is not investment advice. The stock and prices in the worked example are hypothetical and used only to explain the calculation. Technical indicators do not guarantee results; consult a SEBI-registered investment adviser before making investment decisions.

Leave a Reply

Join the conversation

Commenting is open to registered readers. Sign up with just your email — no password needed, and it takes under a minute.

Sign up to comment Log in