# Mesa9 Indicators

ICE Data Services -

MESA Indicators

Introduction

MESA9 is a program that gives accurate trading signals based on the measurement of short-term cycles in the market. Cycles exist on every scale from the atomic to the galactic. Therefore, we have every reason to believe cycles exist in the market.

It has been said that the market is characterized by the famous random walk problem. Based on this, proponents that assert the market is basically efficient. This is clearly wrong because there have been a number of consistently successful traders. However, looking deeper, we see that the market is analogous to a constrained random walk. That is because time can only move forward and prices can only move up and down. The constrained random walk is called the "drunkard’s walk" because it describes the staggering as the "drunk" moves from point A to point B.

There are two solutions to the drunkard’s walk problem. In the first case, the "drunk" flips a fair coin to determine whether he steps to the right or left as he steps forward. The random variable is direction. The solution to this formulation of the problem is a rather famous partial differential equation called the Diffusion Equation. It describes natural phenomena, such as heat flowing up the stem of a silver spoon when it is placed in a hot cup of coffee or smoke flowing from a smokestack.

In the second case, the "drunk" asks himself whether he should take the next step in the same direction as the last one or whether he should reverse his direction depending on the outcome of the coinflip. In this case, the random variable is momentum and the solution is another rather famous partial differential equation called the Telegraphers Equation. Among other things, the Telegraphers Equation describes waves on a telegraph wire or the meandering of any river in the world.

Thus, the Drunkards Walk describes the two market modes. The Trend Mode is similar to smoke from a smokestack, having a general direction and a fine grain randomness. The Cycle Mode is analogous to the meandering of a river. As surely as water flows downstream, time moves forward. You can almost imagine being on a raft in the river. Once you enter a given meander, you can accurately project where that meander will take your raft. And, so it is with cycles in the market. Cycles can be accurately measured scientifically. Knowing the cycle content, that content can be subtracted from the composite to produce the trend.

Market cycles can be measured several ways. Perhaps the simplest is to count the number of bars between successive lowest lows or highest highs. The resulting bar count is the cycle period. Cycle periods can also be measured using a frequency discriminator after taking a Hilbert Transform of the data. Fast Fourier Transforms (FFT) are often (and inappropriately) used. FFTs are inappropriate for the measurement of market cycles because the constraints and resulting resolution are overlooked.

The Maximum Entropy Spectral Analysis (MESA) approach was first developed in the 1960s to process seismic information for oil exploration. MESA can make a high resolution measurement of a market cycle using less than one cycle's worth of data. Using a small amount of data is critical because it increases the probability of the data being stationary during the measurement period. Stationary data is crucial for accurate measurements. Put another way, you need to know that you are in a river meander to know where that meander is going to take your raft.

1. Measurement of the dominant cycle. This lets you know the distance between successive peaks or valleys. If you have just passed a peak, then it is reasonable to expect the next valley to be about a half cycle into the future. The dominant cycle (or a fraction of it) can be used to dynamically adjust other indicators. For example, Stochastics and RSIs work their best when a half cycle is used to peak their performance.  MESA9 shows you the entire spectrum over a 20 decibel range, with the strength of the cycle period ranging from white-hot to ice-cold.  The brightest yellow region in this display is the dominant cycle.

2. Bandpass filter.  This is a filter that is automatically tuned to the measured dominant cycle on a dynamic basis.  A Lowpass filter is a smoother.  A Highpass filter is a detrender.  The Bandpass filter has the features of both, allowing signals to pass that are only near the measured dominant cycle.

3. The Detrend indicator removes the trend from the closing prices and rescales these prices between the plus one sigma and minus one sigma points.  This enables you to assess overbought and oversold conditions statistically at a glance.  The background color over the range from minus one sigma to plus one sigma is blue so you can see those conditions that are likely to result in a return to the mean.

4. The Heatmap shows you the trend strength relative to the amplitude of the cycles over the full range of likely cycle periods.  Green means the uptrend is strong.  Red means the downtrend is strong.  Yellow signifies the best opportunities to trade the cycles not in the direction of the trend.

5. Sine and LeadSine Oscillator. The Sine Indicator is just plotting the sine of the measured dominant cycle. The LeadSine Indicator is a plot where the phase is simply advanced 45 degrees. The crossing of the Sine and LeadSine Indicators are buy and sell points because they anticipate the turning points when the market is in a cycle mode

The advantage of the Sine and LeadSine indicators is that, unlike conventional indicators, the LeadSine can be artificially advanced to form a prediction in a sense.  That is, the crossings of the Sine and LeadSine indicators anticipate cyclic turning points.

6. Signal to Noise Ratio (SNR) indicator measures the dominant cycle amplitude compared to the short term volatility.  The short term volatility contains no useful information for trading and is therefore considered to be noise.  If the signal wave amplitude is less than twice that of the noise, it is advisable to not trade.  (Twice the wave amplitude is 6 deciBels).  The region for the SNR being less than 6 dB is shown as a blue background for the indicator.

7. Instantaneous Trendline and low lag Filter. The Instantaneous Trendline is created by filtering out the dominant cycle, leaving the residual as the trend. This procedure produces a trendline that looks like a moving average, and its advantage is that it has a minimum lag.

the smoothing filter line is a data smoother that has minimal lag. when the market is in a cycle mode, the filter line will criss-cross the instantaneous trendline every half cycle. therefore, if the filter line fails to cross the instantaneous trendline within a half dominant cycle, you can declare the trend mode to be in force. the trend mode ends when the filter line next crosses the instantaneous trendline.

8. the trend vigor indicator is similar to the heatmap, except it shows the relative strength of the trends versus the measured dominant cycle only.  the background to the line indicator is blue, indicating the times when it is best to swing trade without consideration of the trend.

theoretical waveforms

mesa indicators
are as easy to use as any of the standard indicators. as opposed to fixed rule indicators, all mesa indicators dynamically adjust to current market conditions.

it is essential for any cycle-measuring program to prove that complex cycles are actually being accurately measured. in addition, you should become aware of the theoretical capabilities and limitations of your market analysis tools. this section addresses these two goals.

the sinewave example of figure 1 is a trivial measurement. the 24-bar cycle length can be determined simply by measuring the distance between successive lows or successive highs. the factors that make cycle analysis difficult are noise mixed with the cycle, shifts in the cycle over a period, combinations of several simultaneous cycles and combinations of these effects. we prove that mesa indicators handle these cases using deterministic theoretical waveforms. we also challenge any other trading program to make comparable analyses.

figure 1 has four major segments. these are the price bars, the sinewave indicator, the phase of the measured dominant cycle and the dominant cycle segment. the mode is not displayed because the market is obviously only in the cycle mode for this theoretical example.

1. price bar segment
the blue price bars extend from the high of the day to the low of the day. the opening price is indicated as a tick on the left side of the bar and the closing price is indicated as a tick on the right side of the bar. the scale for the prices is at the right of the display. the instantaneous trendline (the straight red line) and the low lag filter (the cyan line closely following the price midpoints) are used to indicate a trend mode. when in the cycle mode, the low lag filter line crosses the instantaneous trendline every half cycle. failure to make this crossing denotes the onset of a trend. the trend is over when these two lines again cross.

2. sinewave indicator segment
the sinewave indicator is formed as the sine of the measured phase of the dominant cycle. the leading curve uses the phase advanced by 45 degrees (1/8th of a cycle) while the lagging curve uses the unaltered phase. as a result, the curves cross prior to every cycle turn, and provide an advance indication.

The indicator curves should look similar to sinewaves at the time of the signal, one indication the market is in a cycle mode. When the market is in a trend mode, the curves will wander around erratically and will tend to run parallel. Trades entered on the basis of the indicator crossings should be exited immediately when a trend mode is identified if the trend is in the opposite direction of your cycle mode trade.

3. Measured Phase Segment
The third display segment displays phase of the measured dominant cycle. One definition of a cycle is a phenomenon that has a constant rate change of phase. For example, a cycle completes 360 degrees, or one full rotation, every cycle. Therefore, a perfect 10-day cycle would have a rate change of 36 degrees per day. If the cycle is not perfect, then the rate change of phase will not be constant. This is a particularly sensitive way to detect whether the market is in a cycle mode or a trend mode. Failure of the phase to increase linearly is a sensitive indication that a cycle mode can be failing.

4. Dominant Cycle Segment
The bottom display segment shows the ebb and flow of the cycles in the market by displaying the measured dominant cycle length synchronized with the price bars. In this segment, the length of the cycle is indicated by the vertical scale of the segment. The fact that the indicated dominant cycle length is 24 bars shows the theoretical cycle has been accurately measured.

variations of the cycle frequency pose real problems for spectral estimators. the difficulty arises from the data not being stationary over the observation period. in statistical communication theory, stationary data means that the probability distribution of the data is independent of the selection of the time origin. in our case, this means the cycle is not stable and consistent over the observation period. the shorter mesa indicators observation period achieves a nearly stable cycle condition with a higher probability than with other spectral estimators, such as fast fourier transforms.

we next examine the effect of nonstationarity on the mesa indicators displays. figure 2 shows a theoretical sinewave whose period is continuously increasing at a slow rate. the very important point is that the continuously varying period of the cycle is accurately measured by mesa indicators on a bar-by-bar basis. there is no course appraisal similar to estimating the period by counting the bars between successive lowest lows. the mesa indicators measurement is continuous.

figure 2 shows that mesa indicators accurately measure the cycle periods over the range from 8-bar cycles to 40-bar cycles. in addition, figure 2 demonstrates that the sine and leadsine signals have a constant amplitude and consistent phase relationship over the entire range of the chirp cycle periods. this means their crossings give accurate cycle mode turning point signals over the full range of cycles that are likely to be encountered.

we have vigorously exercised the measurement capabilities of mesa indicators. as a result, you have gained some insights into the strengths and limitations of the program. recognizing these, you will know best how to apply the displays to your trading. you can also compare the analysis capabilities of mesa indicators to any other cycles program on a deterministic basis. the theoretical waveforms free you from relying on anecdotal evidence. you should never forget that if analysis becomes too complex or confusing it is perfectly acceptable to stand aside until the confusing issues are resolved.

MESA Indicators automatically adapt to current market conditions by using the MESA Indicators cycle measurement. The cycle measurement is best when the cycle length is constant. This means you have stationary data and well focused cycle energy. When the data are stationary the Sine and LeadSine indicators give an early indication of a cyclic turning point, approximately one-eighth of a cycle early. The price bars are overlaid with two adaptive moving averages, the Trendline and the low lag filter. The crossing of these adaptive moving averages signals the direction shift of the trend.

The following discussions are tips on how best to put them to work for you.

LOOK AT THE DOMINANT CYCLE

The dominant cycle plot is the best way to assess the validity of the cycle measurement. We urge caution using the cycle measurements when the cycle period is changing and is not stable at a single cycle period.

THE SINE and LEADSINE GIVES THE EARLIEST SIGNAL

The Sine and LeadSine Indicator is designed to give a signal ahead of a cyclic turning point. The best signals occur when the indicator lines look similar to a sinewave at the time the crossing occurs. The Sinewave Indicator has an erratic pattern when the market is in a trend mode. Unlike most oscillators, the Sinewave tends not to produce false whipsaw signals.

The Indicator should look much like a sinewave at the time the trading signal is taken. A check on this condition is that signal crossover occurs near the 90% point for short entries (and long exits) and near the 10% point for long entries (and short exits).

Remember that the Sinewave Indicator gives signals that are approximately one-eighth of a cycle early. The period of the measured cycle determines how long you should wait to make your entry. If an 8 day cycle is measured, the turning point will likely be the next day, so you must make a quick decision. However, if the measured cycle is 40 days, the indicator will be 5 days early. In this case, you should ignore your urge to trade immediately.