Skip to main content
← Back to M Definitions

Mesa adaptive moving average

What Is Mesa Adaptive Moving Average?

The Mesa adaptive moving average (MAMA) is a sophisticated technical indicator designed to adapt its responsiveness to changing market trends and conditions. Unlike traditional moving average variants that use a fixed smoothing period, the MAMA dynamically adjusts its calculation based on the underlying market’s cyclical behavior. This makes it a tool within the broader field of technical analysis, aiming to provide a more timely indication of trend direction and potential reversals by reducing the inherent lag found in many other indicators. The Mesa adaptive moving average is often accompanied by a complimentary line, the Following Adaptive Moving Average (FAMA), which acts as a smoother version of the MAMA, and their crossover can generate trading signals.

History and Origin

The Mesa adaptive moving average (MAMA) was developed by John F. Ehlers, an electrical engineer and quantitative analyst known for applying digital signal processing techniques to financial markets. Ehlers introduced the MAMA in his book "Rocket Science for Traders" and subsequently in the September 2001 issue of Technical Analysis of Stocks & Commodities magazine. H26is objective was to create a moving average that could swiftly react to significant price movements, often referred to as a "fast attack," while simultaneously exhibiting a "slow decay" during periods of consolidation, thereby minimizing whipsaw trades. E24, 25hlers built upon his prior work with the Hilbert Transform Discriminator to measure the rate of change of phase within market cycles, which then informs the adaptive nature of the MAMA.

22, 23## Key Takeaways

  • The Mesa adaptive moving average (MAMA) is a responsive technical indicator that adjusts its speed to market conditions.
  • It was developed by John F. Ehlers, applying concepts from digital signal processing to financial price action.
  • MAMA aims to reduce the lag common in traditional moving averages, providing timelier trend indications.
  • It typically appears with a companion indicator, the Following Adaptive Moving Average (FAMA), where crossovers can signal trend changes.
  • The adaptive nature helps in minimizing false signals during choppy markets while reacting quickly to strong trends.

Formula and Calculation

The Mesa adaptive moving average (MAMA) builds upon the concept of the exponential moving average (EMA), but with a dynamically adjusting smoothing constant, (\alpha). The core idea is to vary (\alpha) based on the detected phase rate of change in the market, derived from the Hilbert Transform.

The formula for the Mesa adaptive moving average is:

MAMAt=αtPricet+(1αt)MAMAt1\text{MAMA}_t = \alpha_t \cdot \text{Price}_t + (1 - \alpha_t) \cdot \text{MAMA}_{t-1}

Where:

  • (\text{MAMA}_t) = Current Mesa adaptive moving average value.
  • (\text{Price}_t) = Current closing price of the asset.
  • (\text{MAMA}_{t-1}) = Previous Mesa adaptive moving average value.
  • (\alpha_t) = The adaptive smoothing factor at time (t).

The crucial component is (\alpha_t), which adapts based on the market's volatility and cycle phase. Ehlers set limits for (\alpha_t) with a FastLimit (e.g., 0.5) and a SlowLimit (e.g., 0.05). The (\alpha) value is typically calculated as FastLimit / DeltaPhase, where DeltaPhase is the rate of change of the Hilbert Transform's homodyne discriminator. This ensures that MAMA is more responsive when the phase changes rapidly (indicating a strong trend) and less responsive when it changes slowly (indicating a sideways or choppy market).

20, 21The Following Adaptive Moving Average (FAMA) is then calculated by applying the MAMA formula to the MAMA line itself, providing an even smoother, slightly lagged version:

FAMAt=αtMAMAt+(1αt)FAMAt1\text{FAMA}_t = \alpha_t \cdot \text{MAMA}_t + (1 - \alpha_t) \cdot \text{FAMA}_{t-1}

Interpreting the Mesa Adaptive Moving Average

Interpreting the Mesa adaptive moving average involves observing its direction, slope, and its interaction with the FAMA line. When the MAMA line is rising, it generally indicates an uptrend, while a falling MAMA suggests a downtrend. The steepness of the MAMA's slope can also provide insight into the strength of the trend. Because of its adaptive nature, the MAMA will quickly latch onto new trends, appearing to "ratchet" or move in a staircase pattern, then slow down as the trend matures or the market becomes less directional.

18, 19A key method of interpretation involves the crossover of the MAMA and FAMA lines. A buy signal is often considered when the MAMA crosses above the FAMA, indicating a potential upward shift in momentum and trend. Conversely, a sell signal may be generated when the MAMA crosses below the FAMA, suggesting a potential downward shift. T17his dual-line system helps filter out some of the noise that might generate false trading signals with a single moving average. Traders also use MAMA and FAMA lines as dynamic support and resistance levels.

16## Hypothetical Example

Consider a hypothetical stock, "DiversiCo Inc." (DCO), trading at $100. A trader is using the Mesa adaptive moving average (MAMA) and its companion, FAMA, to identify trends.

  1. Initial State: DCO has been trading sideways for some time, and both MAMA and FAMA are flat, hovering around $100. The adaptive alpha for MAMA is low, indicating a slow response to small price changes, characteristic of low volatility periods.
  2. Uptrend Begins: DCO's price suddenly breaks out, moving rapidly from $100 to $105 over a few bars. Due to this sharp price increase, the MAMA's internal calculation of the phase rate of change significantly increases. Consequently, the adaptive smoothing factor (\alpha_t) rises, making the MAMA immediately more responsive.
  3. MAMA Reacts: The MAMA quickly "ratchets" up from $100, closely following the rising DCO price. It now shows a steep upward slope. Shortly after, the FAMA, following the MAMA, also begins to rise, albeit with a slight lag.
  4. Buy Signal: The MAMA crosses above the FAMA, signaling a strong upward trend identification. The trader might consider a long position in DCO based on this signal.
  5. Consolidation: After reaching $115, DCO enters a period of consolidation, moving between $113 and $116. The MAMA's alpha automatically decreases as the phase rate of change slows. The MAMA and FAMA flatten out, but remain above the price, indicating that the overall uptrend is still intact despite the pause.
  6. Downtrend Begins: DCO then breaks below its consolidation range, rapidly declining from $113 to $108. The MAMA's adaptive alpha increases again, causing it to quickly drop and follow the price downward.
  7. Sell Signal: The MAMA crosses below the FAMA, indicating a potential downtrend and a signal for the trader to consider exiting their long position or initiating a short one.

This example illustrates how the MAMA dynamically adjusts its responsiveness, providing quicker signals during strong trends and smoothing out during quieter periods, potentially reducing false signals.

Practical Applications

The Mesa adaptive moving average finds its primary utility in the realm of algorithmic trading and automated trading systems due to its dynamic nature. Its ability to adapt to varying market conditions and reduce lag makes it a valuable component for systems that require timely trend recognition.

15Investors and traders utilize MAMA for several practical applications:

  • Trend Following: MAMA helps identify the direction and strength of trends more effectively than many static moving averages. Its faster response during strong trends allows traders to enter and exit positions with improved timing.
    *14 Signal Generation: The crossover of MAMA and FAMA lines is a common method for generating buy and sell signals. When MAMA crosses above FAMA, it suggests an upward trend is strengthening, indicating a potential buying opportunity. Conversely, a cross below suggests a downward trend.
    *13 Filtering Market Noise: During choppy or sideways markets, the Mesa adaptive moving average's sensitivity decreases, which helps filter out minor price fluctuations that could lead to false signals from less adaptive indicators. T12his characteristic is particularly useful for avoiding unnecessary trades during periods of low conviction.
  • Dynamic Support and Resistance: The MAMA and FAMA lines can act as dynamic support and resistance levels, where price tends to bounce off these lines, offering potential entry or exit points for positions.
    *11 Integration with Other Indicators: While potent on its own, the Mesa adaptive moving average is often combined with other technical indicators to confirm signals and enhance the robustness of a trading strategy. For example, it might be used alongside volume indicators or oscillators to provide a more comprehensive view of market dynamics.

10## Limitations and Criticisms

Despite its advanced design and adaptive capabilities, the Mesa adaptive moving average (MAMA), like all technical indicators, has limitations and is subject to criticism. One primary drawback is its complexity; the underlying mathematical concepts, particularly the Hilbert Transform, can be challenging for many traders to fully grasp, making it less intuitive than simpler moving averages.

9Another criticism is that while MAMA aims to reduce lag, it cannot eliminate it entirely. In very rapidly changing markets or during sudden reversals, even an adaptive indicator can still provide signals with some delay, potentially leading to missed opportunities or sub-optimal entry/exit points. F8urthermore, some studies on adaptive moving averages, while acknowledging their theoretical appeal, have not consistently demonstrated a significant practical advantage over simpler methods in terms of overall trading returns, especially when accounting for transaction costs.

7Like all trend-following tools, the Mesa adaptive moving average may perform less effectively in prolonged sideways or range-bound markets, even with its adaptive slowing mechanism. Although designed to reduce whipsaw trades, it can still generate them if market conditions are extremely volatile and erratic. Critics also point out that relying solely on any single indicator, including MAMA, is not advisable, as market behavior is influenced by a multitude of factors beyond what a single mathematical formula can capture. A comprehensive quantitative analysis often involves a combination of tools and methods.

Mesa Adaptive Moving Average vs. Adaptive Moving Average

While the Mesa adaptive moving average (MAMA) is a specific type of adaptive moving average, the term "Adaptive Moving Average" (AMA) often refers to a broader category of indicators that dynamically adjust their smoothing period or sensitivity based on market conditions, with the Kaufman Adaptive Moving Average (KAMA) being a well-known example.

The key differences lie in their methodology:

FeatureMesa Adaptive Moving Average (MAMA)Adaptive Moving Average (AMA) (General Category, e.g., KAMA)
Core Adaptation LogicBased on the rate of change of phase measured by the Hilbert Transform Discriminator, often appearing "staircase" in nature.6 Typically based on market "efficiency" or noise, often measured by [volatility] or directional movement.
OriginatorJohn F. EhlersVarious, e.g., Perry Kaufman for KAMA.
AppearanceOften has a "fast attack" and "slow decay," giving it a stepped or ratcheting appearance, accompanied by FAMA.4 Can appear smoother than simple MAs, adapting sensitivity but not always exhibiting a "staircase" pattern.
Primary GoalReduce lag and whipsaws by relating phase rate of change to smoothing factor.3 Adapt to market speed/noise by adjusting smoothing to filter out noise or respond to trends.

In essence, MAMA uses a sophisticated signal processing approach to its adaptation, specifically focusing on market cycles, whereas other AMAs might use different metrics, such as market "efficiency" (ratio of net price change to total price movement over a period) to drive their adaptability. Both aim to overcome the inherent lag of traditional moving average indicators by becoming more responsive in trending markets and less reactive in choppy ones.

1## FAQs

What problem does the Mesa adaptive moving average solve?

The Mesa adaptive moving average (MAMA) primarily aims to address the problem of lag and whipsaw in traditional moving average indicators. By adapting its speed based on market conditions, it attempts to provide more timely trading signals and reduce false signals during choppy periods.

Can the Mesa adaptive moving average predict future prices?

No, the Mesa adaptive moving average, like all technical indicators, is a derivative of past price data and does not predict future prices. It helps in identifying current market trends and potential changes in momentum, but it cannot guarantee future price movements. Financial markets are complex and influenced by numerous factors.

Is the Mesa adaptive moving average suitable for all markets?

While designed to adapt to varying market conditions, the Mesa adaptive moving average performs best in trending markets where it can quickly identify and follow price movements. In extremely flat or highly erratic, non-trending markets, it may still generate some false signals, although its adaptive nature aims to minimize this. It is generally applied to liquid assets such as stocks, commodities, and forex.

How is the FAMA related to the Mesa adaptive moving average?

FAMA (Following Adaptive Moving Average) is a companion indicator to MAMA. It is essentially a smoothed version of the MAMA line, calculated by applying the MAMA's adaptive formula to the MAMA itself. Traders often look for crossovers between the MAMA and FAMA lines as signals for trend changes or reversals.

Can the Mesa adaptive moving average be used for automated trading?

Yes, the adaptive and quantitative nature of the Mesa adaptive moving average makes it well-suited for integration into algorithmic trading systems. Its clear signals and dynamic responsiveness can be programmed to automate entry and exit strategies, though careful backtesting and optimization are essential for any automated system.